Is it Possible?

I am working on a module of my own that will have several hundred chits. I don’t really want several hundred image files so I was thinking of using a few base images that I can combine to make the chits. For example, I would have a background image, then a unit type image and finally a movement points/cost image. Does Vassal permit these to be layered on top of each other creating a composite image? My layers are PNG with alpha maps so they look fine in Photoshop but I need to know if they can be combined in Vassal.

Ideas?

Yes - use layer traits. Works exactly how you describe

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of DonMegel
Sent: Tuesday, August 30, 2011 7:36 PM
To: messages@vassalengine.org
Subject: [messages] [General Discussion] Is it Possible?

I am working on a module of my own that will have several hundred chits.
I don’t really want several hundred image files so I was thinking of
using a few base images that I can combine to make the chits. For
example, I would have a background image, then a unit type image and
finally a movement points/cost image. Does Vassal permit these to be
layered on top of each other creating a composite image? My layers are
PNG with alpha maps so they look fine in Photoshop but I need to know if
they can be combined in Vassal.

Ideas?


Read this topic online here:
https://forum.vassalengine.org/t/is-it-possible/4221/1

When I tried using layers it showed one and not the other but not all three.

1 layer trait for each sub part of the counter. For example 1 for the unit
symbol, 1 for the move etc… they combine and make the composite and all
will be visible

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of DonMegel
Sent: Tuesday, August 30, 2011 8:35 PM
To: messages@vassalengine.org
Subject: [messages] [General Discussion] Re: Is it Possible?

When I tried using layers it showed one and not the other but not all
three.


Read this topic online here:
https://forum.vassalengine.org/t/is-it-possible/4221/3

Here’s a sample of a piece with 2 layers and interactive buttons. It’s an enhanced version of a sample I posted recently. As you increase / decrease the kill count on the piece, one layer shows the kill count and one layer displays the rank of the piece based on the number of kills.

Just change the .zip to .vmod

It looks the same as the other sample. As the number goes up it changes the layer. I got that, it works great, but I was wondering if I could have two separate numbers, with two separate increase and decrease buttons.

The difference in that one is that I’m using a separate layer to display the number instead of using the Text trait but sure …you can have as many interactive layers as you want.

Here’s another sample of our friend the military leader. In this one, he has a value called Leadership in the upper left corner that’s independent of the Kill count. This value can be increased / decreased via the buttons or by right-clicking the unit like the kill count.

Thats all sorted out now, thank you for all of the help by the way, now I am having a time lining up the buttons. Vassal seems to start its coordinates from the center of the image while Photoshop starts from the corner. Is there an easy way to align the Action Button on the chit?

Also, is there a better way to test the function of a button than to save the module and load it up in Vassal? Its not a huge problem now but as the module gets bigger it could take longer to load.

I have a formula I use:

X offset = [width of piece / 2] - XPos (then change sign from positive to negative or vice versa)
Y offset = [height of piece / 2] - YPos (then change sign from positive to negative or vice versa)

For example: If I have a 100 x 100 piece and the button position on the piece is 25 x 60

X offset = 100 / 2 = 50 - 25 = 25 change sign so it would = -25
Y offset = 100 / 2 = 50 - 60 = -10 change sign so it would = 10

New question: can vassal preform an action based on a unit not moving. For example I would hit a button and only the units that did not move would preform a keystroke, thus changing the chit’s property.

Yes, provided you initiate said action through an Action button, Trigger,
Global key command etc like you describe… You would want to compare
against the built in engine property “Moved”
Values would be either true or false

vassalengine.org/wiki/Faq_modules#Properties

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of DonMegel
Sent: Tuesday, September 06, 2011 3:56 PM
To: messages@vassalengine.org
Subject: [messages] [General Discussion] Re: Is it Possible?

New question: can vassal preform an action based on a unit not moving.
For example I would hit a button and only the units that did not move
would preform a keystroke, thus changing the chit’s property.


Read this topic online here:
https://forum.vassalengine.org/t/is-it-possible/4221/10