Adding a counter in VASSAL/VASL

JimWhite

Elder Member
Joined
Feb 4, 2003
Messages
1,927
Reaction score
785
Location
Newark
Country
llUnited States
This is the first time I've attempted this...and it's not going well...:)

I am able to copy a counter (rename it as well) and add it to the tab...but when I click the Save or Save As button on the Module Editor then I get this:

Edit Error.jpg

If I click "Ignore, save anyway" then I get this:

Jave Error.jpg

If I click the Red X on the editor window to close it I simply get an option to "Save Module" with Yes / No / Cancel buttons. If I click Yes it appears that it works.

But when I reopen the module the new counter is not present.

What am I fouling up here?
 

jrv

Forum Guru
Joined
May 25, 2005
Messages
21,998
Reaction score
6,207
Location
Teutoburger Wald
Country
llIceland
The "Map Window" error is not a "real error" as far as I know. It can be ignored safely.

You have installed vasl in a place that is privileged to windows, "C:\Program Files\VASSAL-3.2.17\VASAL-6.4\vasl-6.4.0.vmod". Windows considers all files installed under "c:\Program Files" as secure. When you modify vasl it changes the .vmod file, or in your case, it tries to change it. You need to run vasl as an administrator to be able to alter files in "C:\Program Files". Doing that is probably complicated as you are probably running the vasl .bat file. The .bat file in turn calls java, and I think "running as administrator" is not transitive, i.e. even if the .bat file is running as administrator, programs that the .bat file starts will not be. The system is "working as designed;" files under "C:\Program Files" can't be changed without going through "extra effort."

You could also move vasl to another directory, e.g. under "My Documents".



JR
 
Last edited:

JimWhite

Elder Member
Joined
Feb 4, 2003
Messages
1,927
Reaction score
785
Location
Newark
Country
llUnited States
Thanks...I can actually run as Administrator just by clicking on my VASSAL shortcut now which allows me to save the edit.

Next question. Where are all the image files stored? I would like to create and/or clone a couple and stick them in there.

Thanks,
 

Sully

Senior Member
Joined
Feb 2, 2003
Messages
1,156
Reaction score
244
Location
Mpls, MN
Country
llUnited States
Where are all the image files stored? I would like to create and/or clone a couple and stick them in there.Thanks,
Rename the file from .vmod to .zip. Open the archive and you will see an images folder.
 

jrv

Forum Guru
Joined
May 25, 2005
Messages
21,998
Reaction score
6,207
Location
Teutoburger Wald
Country
llIceland
Thanks...I can actually run as Administrator just by clicking on my VASSAL shortcut now which allows me to save the edit.
I thought it would be more difficult. Glad to hear it was not.

Next question. Where are all the image files stored? I would like to create and/or clone a couple and stick them in there.
A vasl module file (.vmod) is really a .zip file. The images are inside there. I don't think there is any way to add new images in the editor. I think the only way is to rename the .vmod to .zip, unzip the archive, place your images in the directory tree, create a new .zip with all the old files plus your new ones, and rename it to .vmod. On the other hand, windows may allow "in-place" editing of the archive file. Rename your .vmod to .zip and see if you can insert the new image in without rebuilding the .zip archive.

At some point you may wish to look at creating an extension rather than editing your .vmod file. That way you can distribute your modifications and replace your .vmod with upgrades without having to re-do all the additions. The extension for bounding fire is an example of one that includes extra counters. A vasl extension (.vmdx or the earlier .mdx) is structured just like a module, i.e. it is a .zip file with a bunch of stuff in it. You can create a new empty extension in the VASSAL editor, add your image to it (as above) then use the VASSAL editor to fill in the rest of the details.

JR
 

JimWhite

Elder Member
Joined
Feb 4, 2003
Messages
1,927
Reaction score
785
Location
Newark
Country
llUnited States
Rename the file from .vmod to .zip. Open the archive and you will see an images folder.
That worked! Thanks.

At some point you may wish to look at creating an extension rather than editing your .vmod file. That way you can distribute your modifications and replace your .vmod with upgrades without having to re-do all the additions. The extension for bounding fire is an example of one that includes extra counters. A vasl extension (.vmdx or the earlier .mdx) is structured just like a module, i.e. it is a .zip file with a bunch of stuff in it. You can create a new empty extension in the VASSAL editor, add your image to it (as above) then use the VASSAL editor to fill in the rest of the details.

JR
I was just getting ready to ask questions on how to create an extension for the reasons you just stated...:)

So I'm going to give it a shot...more questions to follow I'm sure...LOL
 

JimWhite

Elder Member
Joined
Feb 4, 2003
Messages
1,927
Reaction score
785
Location
Newark
Country
llUnited States
Ok...I've muddled through creating an extension...seems convoluted...but then again I might not be doing it in the most efficient manner...LOL

Anyway...I know it's probably been discussed before but I didn't pay attention then...so what is the best recommended way to created image files to use as counters in VASSAL?

Thanks,
 

zgrose

Elder Member
Joined
Jun 13, 2004
Messages
4,247
Reaction score
961
Location
Kingwood, TX
First name
Zoltan
Country
llUnited States
Ok...I've muddled through creating an extension...seems convoluted...but then again I might not be doing it in the most efficient manner...LOL

Anyway...I know it's probably been discussed before but I didn't pay attention then...so what is the best recommended way to created image files to use as counters in VASSAL?

Thanks,
Grab the counter blanks out of the mod, copy paste your image into the blank area with your favorite drawing program and save the new image.
 
Top