cwoac / TTS-Manager

Import/Export Mods from Tabletop Simulator
MIT License
24 stars 10 forks source link

Req: Include the thumbnail in the archive #29

Closed bobpaul closed 3 years ago

bobpaul commented 4 years ago

As a user, I do not like that restored exports sometimes load in Tabletop Simulator showing a generic '?' instead of the author supplied thumbnail.

Background Workshop and Saves both consist of a *.json file as well as a like-named *.png thumbnail. As a user, I would like the pak file to include the thumbnail. This relates to #28 as TTS Mod Downloader provides this capability, and we should store thumbnails in the same fashion to ensure compatibility between the two applications.

Path for JSON: mods/workshop/{filename}.json Path for Thumbnail: Mods/Workshop/Thumbnails/{filename}.png

Separating the thumbnail into a subfolder seems unnecessary to me, but it doesn't it cause any harm doing it this way, and it makes compatibility easier.

We should be able to handle 3 situations gracefully:

If the above 3 situations are handled, no change to the Meta data should be necessary unless old version of TTS-Manager would do the wrong thing in the presence of a Thumbnails sub folder in the zip. So this should be tested with a meta data version bump if necessary.

bobpaul commented 4 years ago

So if the doesn't go in a folder, it'll unpack fine with old versions, but (probably) not with TTS-Manager. If it goes in a folder, it'll unpack fine with old versions, but create a Thumbnails folder in the dest which Tabletop Simulator doesn't read.

Bumping the version in the pak metadata doesn't affect the outcome since there's no assertion to prevent old apps from opening newer pak versions ¯\_(ツ)_/¯. so I guess my vote is include the folder, bump the version, and make the app warn if pak metadata shows Ver > 2 to prevent against future format changes causing weird behavior.