dmarcuse / fvtt-adventure-bundler

Export and import Foundry adventures, assets included!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Renaming the files to asset(x)

Cybsjan opened this issue · comments

Hi!

One thing that I'd like to see different is renaming everything to asset(x). Especially when you want to share adventures with people, it's nicer to have the names of the assets in place. That way a user can browse the files and find files. Instead of having to open and look at everything because they're named asset...

Sure thing! I'm planning on adding an export dialog to allow tweaking what's included and how, so this seems like a natural addition. Do you have any other specific details in mind - i.e. do you want to preserve the directory structure as well, or just the filename?

Oeh! That's a good question. Directory structure would be a logical thing as well to include.

I forgot to mention that this module is wonderful for a community I'm in. We've been struggling to share updates to a shared world to each other and now with this module, it gets a whole lot easier.

I'm glad to hear that!

Wonderful stuff. Would second the idea of an option to let me rename all assets from wherever in the Foundry hierarchy to asset(x), maybe a 3 checkbox for also rename Foundry / modules / URLs maybe under subfolder adventure-name but you might need a copyright disclaimer to the effect "I confirm I have the right to share/distribute this content with who I distribute the adventure to".

There's already a setting to include module files (with a copyright disclaimer), but I'm not sure about offering settings for including core Foundry files or files from URLs. In the case of Foundry files, these should always be available by default anyways - there isn't really any benefit to bundling them.

There's already a setting to include module files (with a copyright disclaimer), but I'm not sure about offering settings for including core Foundry files or files from URLs. In the case of Foundry files, these should always be available by default anyways - there isn't really any benefit to bundling them.

Yes, I hadn't seen that setting, thats great, even better than I hoped. I was thinking it would be a way of having the zip still work if the location of the foundry assets changed, but maybe their asset hierarchy will remain unchanged through the versions.

I would be surprised if Foundry asset locations changed as it would potentially break a lot of modules. There is actually a hidden setting already implemented in the module to bundle core foundry assets, but it's mostly intended for debugging. If you really want to include them anyways, you can open your Foundry world and press F12 (or otherwise open the developer tools in your browser) and enter the following snippet of code to enable it for the current world:

await game.settings.set("adventure-bundler", "bundleAssetCoreFile", true)

I don't recommend this since it unnecessarily duplicates asset files that are already in Foundry, and could run into copyright issues though. If you want to disable it, paste in this snippet:

await game.settings.set("adventure-bundler", "bundleAssetCoreFile", false)

I was just thinking of forking the project to preserve filenames myself, but might be getting in over my head. Any progress on this front?

Unfortunately not, I haven't had the time to refactor the project like I was hoping. If you do fork the project, I'm happy to offer input into how it works under the hood, and review PRs if you were hoping to merge them back upstream.

Thanks, I'll take you up on that sometime soon.