Deleting Module contents

Hey everyone,

Quick question about deleting graphic files (.png) from a module. My understanding (based on what I read somewhere) is that Vassal keeps a copy of a file in the module even if it has been deleted. This can cause a little bloat if a the graphics keep being swapped out and changed. Am I correct about this?

If so, is it possible to unzip the module (using Unarchiver or the like), remove the old graphics, and then re-zip the contents and rename it to .vmod?

I am working on a module and it’s possible I am going to have to resize all of the markers I’ve created. I would ideally like to keep the base module and map I’ve made and just re-input the markers. But I don’t want to do that if it’s going to clutter it up.

Thanks for helping out a programming noob.

Yes, a .vmod is a .zip file. Depending on the program you use, you can either just unzip it, remove the graphic, and zip if back up or change the .vmod extension to .zip first and then unzip, remove, re-zip and rename.

Once you have it unzipped, this is very easy to do with Windows batch programming and ImageMagick:

setlocal EnableDelayedExpansion

for %%a in (*.png) do (

	rem echo %%a

	convert %%a -resize [b]your size x your size[/b] %%a


Backup your files first–the above script replaces original files with resized ones. Should anything go wrong…

Thank you for the fast replies guys!

When rearchiving, be sure you only keep the subfolders and files, not the original folder. Some archive tools want to create a parent folder before they create the archive, and this won’t work for vassal.

Once you’re familiar with the compress/uncompress or archive/unarchive process, you may want to enter in the xml file of your module … one day :slight_smile: and discover the great power of bulk edition with a simple text editor !!!

Enjoy :slight_smile: