Compiling a new module

I’ve created a Vassal module. I’ve got it working from the mod file which has the images & build file in the same folder, but I’m stuck at this point. How does one compile the module back into a proper .vmod file.
Also, when I open the build file with Notepad its all computer gibberish.
Thx.
Cavan

Thus spake cpcunningham via messages:

I’ve created a Vassal module. I’ve got it working from the mod file
which has the images & build file in the same folder,

If the images are in the same directory as the buildFile, I’m surprised
that works. (In fact, I suspect that it doesn’t, and you’re seeing
images from the tile cache, not the images in the same directory as the
buildFile.)

but I’m stuck at
this point. How does one compile the module back into a proper .vmod
file.

The module needs to be structured this way:

buildFile
images/
img1.png
img2.png

I.e., images need to be a in a directory called “images”, which is
itself in the same directory as the buildFile. Compress that with
a ZIP archiver, so that you have a ZIP archive where the buildFile
and the images directory are in the root of the ZIP archive.

Also, when I open the build file with Notepad its all computer
gibberish.

Yes, it is. That’s what’s in the buildFile.


J.

Sorry. Didn’t mean that literally. The image file & build file are separate files within the mod file. I’ve created a Zip archive. Vassal doesn’t recognize it as a valid file (even with .vmod extension).

When I open other build files I see the contents in Java format ( I’m assuming) whereas in my mods build file its unreadable (ASCII ?).

Thus spake cpcunningham via messages:

Sorry. Didn’t mean that literally. The image file & build file are
separate files within the mod file. I’ve created a Zip archive. Vassal
doesn’t recognize it as a valid file (even with .vmod extension).

When I open other build files I see the contents in Java format ( I’m
assuming) whereas in my mods build file its unreadable (ASCII ?).

Upload your module file somewhere I can get it. I’ll need to see it
in order to assist further.


J.

I have it in a dropbox file. If there is an email to send the link to, I can do that.
Cavan

Thus spake cpcunningham via messages:

I have it in a dropbox file. If there is an email to send the link to, I
can do that.
Cavan

uckelman@nomic.net is mine.


J.

Thanks Joel. Dropbox link sent.
Cavan

What’s the problem you’re having exactly? I had no problem opening the module two which you sent me a link.

I’m going to load the file zipped.
When I zipped it and then gave it a .vmod extension Vassal didn’t recognize it. When I opened the build file with Notepad it was all gibberish instead of the Java format I found when I opened other build files. So I assumed there was more to compiling a Vassal mod into the single-file format we find on game site.
I just realized that what I uploaded, the mod un-compiled, is what I’ve been using & yes it’s been working fine.
Thx

Cavan

Thus spake cpcunningham via messages:

I’m going to load the file zipped.
When I zipped it and then gave it a .vmod extension Vassal didn’t
recognize it. When I opened the build file with Notepad it was all
gibberish instead of the Java format I found when I opened other build
files. So I assumed there was more to compiling a Vassal mod into the
single-file format we find on game site.
I just realized that what I uploaded, the mod un-compiled, is what I’ve
been using & yes it’s been working fine.
Thx

I don’t know what you mean by “Java format” or “un-compiled”. Modules
are just ZIP archives with a particular structure (namely, the buildFile
in the root, and images in the images directory). The file I downloaded
is a ZIP archive with that structure, whih is why I’m able to load it.


J.

Joel. I guess what I am asking is:
After the the mod file is considered finished, does it have to be “Zip archived” to produce the Vassal module we download from the web site (i.e. 2nd Fleet = “2nd Fleet13.vmod” or Bobby Lee = “Bobby_Lee-v7.vmod”) with the Vassal logo?
If so, my attempts to “ZIP” the parent file and open it in Vassal, or to do that then add the “vmod” extension & open it in Vassal isn’t working. I can only open it in Vassal if I don’t “Zip” it & leave it as is, with the image file & root directory accessible.

I’ve uploaded two images as illustration. One is of the messages I get when I try to open the “zip” & “vmod” versions of the mod file; the 2nd is a comparison of what I see when I open my Midway buildFile & when I open the buildFile for the Battle for Moscow module (just for example).

No, absolutely not–you shouldn’t be doing this. Effectively what you are doing in this case is zipping a zipfile. If you are creating modules using the Editor, the output you should be getting is a file ending in .vmod–no file extension modification should be done, and no further compression. Upload this file to the site and it should be fine.

OK. Great. Thanks. Exactly was I was looking for. I was confused because all I have is a regular file as it appears containing the image file & buildFile inside & nothing automatically ending in .vmod.
I guess, since my plan was to pass this by Michael at Avalanche, I’ll pass it onto him & if they choose to make it public they can follow that route (or ask me to do it). Thanks again for your time.
Cavan

Windows has a “helpful” feature by default that hides file extensions for known types–so they have them, but if it’s for a file type that is registered so Windows knows what it is, the file browser doesn’t show it. You have to actively disable this setting in order to always see file extensions.