Cleaning up vassal modules.

I’ve built a module for a game I am designing and have gone through several different updates including the new icons and maps.

I noticed the file size keeps growing and the old images remain. Is there a way to prune out the unused images from the VASSAL file to reduce its size?

I was told before that a module is simply a zipfile with a different file extension and to rename the module from ModuleName.vmod to ModuleName.zip. Then open the zipfile, go into the images/ folder it contains, and delete any stale/unwanted images. When finished, to change the file extension back to .vmod

I’ve tried this on both my mac and pc but after I convert my VASSAL module to a zip file, unzip it, delete the unneeded images, rezip it, and change the extension back to .vmod, I can’t open it in VASSAL. I get an error: Invalid VASSAL module; The file ‘/Users/josephchacon/Desktop/Vietnam Firefights v04’ is not a valid VASSAL module.

I am using the latest version of 3.2.11. Does anyone have an suggestions on how else to clean up a vassal module?

Thanks, I appreciate the help.

Joe

Joseph Chacon

Nevermind.

I bit of looking and I found the answer at: https://forum.vassalengine.org/t/reducing-mod-size-remove-old-images/2730/1

As the previous topic mentioned, the tricky is to zip the file inside the Unzip folder at the same level as the BuildFile that consists of all the files you want to include in the new module. (What you don’t want to do is select the entire Unzip folder from outside the folder and just zip it. This will produce an invalid module.)

Thanks to previous posters.

Joe

Thus spake jlchacon:

I’ve built a module for a game I am designing and have gone through
several different updates including the new icons and maps.

I noticed the file size keeps growing and the old images remain. Is
there a way to prune out the unused images from the VASSAL file to
reduce its size?

I was told before that a module is simply a zipfile with a different
file extension and to rename the module from ModuleName.vmod to
ModuleName.zip. Then open the zipfile, go into the images/ folder it
contains, and delete any stale/unwanted images. When finished, to change
the file extension back to .vmod

What you’ve described to this point is correct.

I’ve tried this on both my mac and pc but after I convert my VASSAL
module to a zip file, unzip it, delete the unneeded images, rezip it,
and change the extension back to .vmod, I can’t open it in VASSAL. I
get an error: Invalid VASSAL module; The file
‘/Users/josephchacon/Desktop/Vietnam Firefights v04’ is not a valid
VASSAL module.

This is the sort of error you’d get if you’re not rezipping the module
correctly. What files are in the root directory of the ZIP archive you
created?


J.