I have a vmod for a game. It has an incorrect image. I unpacked the mod and replaced the image. Replacement images is same type and size. I repack the mod with 7zip, rename the mod *****.vmod. When I attempt to run it I get “an invalid vmod” error. Is there any special way to pack the files?
The buildFile, and the moduledata file, and the images directory must be in the root directory of the ZIP archive. The most likely cause of problems like the one you’re seeing is that these are not in the root directory, but rather inside a directory in the root directory (i.e., one level up).
In general, never unpack a module unless you have to because when you repack it, you often get crap included that you didn’t want like hidden files. I’ve seen a repacked mod contain another copy of the vmod, for example.
Since you are using 7zip, you don’t have to unpack. When you run 7zip, you see two panels. One shows the guts of your vmod. Double click the images folder to go down to your vmod’s images.
The other panel shows a folder on your computer. Use the controls to navigate to the folder where your replacement image is. Click on that image file and click on “copy” to copy it to your vmod’s images folder. You’re done. No unpacking needed.
Tip. You want your replacement file to have the same name as your original because once you copy, you are truly done when you exit 7zip. If the names are different, you will need to edit your vmod to change the file name you use, and then you probably will want to delete the original file from your vmod, which you can do with a vassal tool or deleting it in 7zip (no unpacking!).
Thanks Shilinski you jogged my memory. I did not have the 2 window mode, I changed that. Then on the third try I got it to do what I wanted. Mod starts up and shows correct image. It was changed after the game was released but not in the vmod.
You made me remember I did something similar a few decades ago. I played a game called Empire Deluxe on the PC. It was available for several computers. I got a hold of a .zip file that would not unzip. Some of the files had maps for another computer system with a 4 letter extension (Amiga?). No one knew how to get it to unpack. Then I found the delete command within ZIP and deleted the 3 files with the wonky names. It unzipped perfectly after that.
I knew I was over looking something. Thanks again.