Removing Unused Pictures

I’ve fallen into the trap of naming each version of a map or component with a new name, and I have several unused pictures in my module some of which are rather large.

How does one remove them?

Or should I consider starting over with the module from scratch?

Thanks.

Thus spake pawnpusher:

I’ve fallen into the trap of naming each version of a map or component
with a new name, and I have several unused pictures in my module some of
which are rather large.

How does one remove them?

Modules are ZIP archives. Unzip the module, remove the images you don’t
want, rezip the module.


J.

Backup the module first in case you wreck it in the cleanup process, it’s best to unzip to a file into a directory then go clean out the items you don’t need. Then create a new compressed folder and copy the remaining data back into that compressed folder, then rename that folder back to the original game module name.

If you try and delete inside the zip file it will take forever! Just remember backup backup backup.

This needn’t be the case. If you use the compression tools built into Windows Explorer, this is true, because those tools are hideously broken. If you use a good 3rd party tool like 7zip, opening a ZIP archive and deleting files within it is a nearly instantaneous process as it should be–no complete unzip/rezip needed.

Thanks all!

I second using a third-party zip tool. I use 7zip all the time because I don’t have to unzip the files, and I can do mass image replacement (just make sure the files have the same name) without having to use the editor.

You have to be careful too when unzipping and rezipping because you can inadvertently pull in files (hidden files especially) that you don’t want. I’ve occasionally looked at mods I haven’t worked on, and sometime I’ve seen tons of obvious junk inside. Once I saw another entire copy of the vmod inside the vmod! I wonder if that vmod itself contained another vmod, and then that one too. Sort of a Russian dolls sort of thing. I never checked.

I downloaded and used the 7-zip app as suggested above. It worked great!

Thanks again!

I have the same problem of unwonted pictures. I saved the game as .zip and unzipped it and removed the unwonted pictures.
I zipped it up.
Changed .zip to .vmod in Win10 explorer. I cannot open it, it comes up with error message “The file ‘C:\Users\Charlie\Documents\Games\Vassal\Waterloo 20 VP\WaterlooV2R.vmod’ cannot be imported into VASSAL.”
Can anyone help me please. Thank you.

Thus spake DaveJM via messages:

I have the same problem of unwonted pictures. I saved the game as .zip
and unzipped it and removed the unwonted pictures.
I zipped it up.
Changed .zip to .vmod in Win10 explorer. I cannot open it, it comes up
with error message “The file
‘C:\Users\Charlie\Documents\Games\Vassal\Waterloo 20
VP\WaterlooV2R.vmod’ cannot be imported into VASSAL.”
Can anyone help me please. Thank you.

That sounds like you’re trying to open the module using Import instead
of Open. Import is for converting modules from a different file format.
Open is what you should be using.


J.

Thank you for your speedy reply. Unfortunately using open instead of import did not work.
I have tried using 7-Zip and PeaZip to zip up the files which have the suffix .zip, and the zip icon.
Used File Explorer to change from .zip to .vmod and the icon changed to the Vassal V.
Using Open, Import or double clicking on the icon produce the same result, does not open and the same error message.
I have tried using Import on the .zip with the same result.
Using Win 10 with Vassal 3.2.17.
Is there a step by step guide anywhere to remove unwonted graphics from Vassal modules as I think I must be making a silly error somewhere.
Thank you.

If you are using 7zip, you should immediately be able to spot the problem. Open the file that you believe to be your module using 7zip. If you don’t see items named “buildfile” and a folder named “images”, then your ZIP archive is not correctly constructed. I would guess you are zipping the wrong items, so the root level of your ZIP archive doesn’t contain the needed items VASSAL expects–for example, it’s a common error to right-click and zip up the parent folder that contains all the unzipped module’s contents. Ideally you should be multi-selecting the buildfile, the images folder, and any predefined setup files, and zipping up that group of items.

One of the main benefits of using 7zip is that you should not have to be changing file suffixes at all.

Thank you JoelCFC25.
Problem solved. Now to make a lot of my modules smaller.