V4 Vassal Default Images

For V4, I suggest that any default images provided by Vassal be available for use (perhaps a new /default-img folder) in the module structure.

I’ve just implemented a “Normalized” d6 (rolls 3d6 and maps the result to 1-6) for less “swingy” results in a certain critical CRT.

I implemented this as a GKC and wanted to re-use the standard Vassal “die” symbol, but it is apparently hard coded into Vassal, rather than in the module images directory.

I agree, I would :+1: love to see this as well.

I guess you want to use this image: die

That can be found in Vengine.jar/images/die.gif. Thus, you can set the image of your global key command to images/die.gif and it should show the above image on the button. VASSAL will search for images both in it’s own resources (in the Vengine.jar) and the resources provided by the module.

If you want to see which images are included with VASSAL, just open the Vengine.jar file with your favorite ZIP viewer - e.g.,

file-roller vassal/lib/Vengine.jar 

.jar (Java ARchives) are simply ZIP archives, just like .vmod files are simple ZIP archives.

Yours,
Christian

3 Likes

While that is true, there is no actual way within the editor to set a toolbar button icon to a specific named image, you can only load new images.

I agree with the OP’s original request to have the in-built Vassal images available for easy use within the Vassal module.

On can, of course, simply open the .vmod with a Zip file browser, and open the buildFile.xml in a text editor - search for the button element (<VASSAL..build.module.SpecialDiceButton) and change the value of the icon attribute :slight_smile: and of course remember to save the changes.

Or, you can grab the image from above and put that in your module.

Finally, one can also go to the VASSAL GitHub repository and find the stuff you need - images are in vassal-app/src/main/resources/images.

Yours,
Christian