Stack Size Display

Just a simple question here: how do I display the number of items in a stack without relying on players to mouse over the stack? Like, think Risk where you can have multiple armies in a location. If you had 3 blue army pieces, I would want both mouse over the stack to show the 3 pieces, but also a text label near the stack with “3” on it. The latter I can’t figure out how to do, since I don’t know how to reference a stack with a textlabel or what property I would need to reference.

AFAIK, there’s no way to do this. However, an alternative is to do what was done in the Axis & Allies module. Individual pieces have layers that include a number–1, 2, 3, 4, etc.–indicating how many there are of each piece in the stack, which is shown in a little number next to the ‘stack’.

So to players, it looks like a stack of pieces, but to Vassal it’s really a single piece, with layer commands allowing you to increase/decrease the number that each ‘stack’ represents. No mouseover required.

Very clever idea that works really well for games where pieces wouldn’t be physically stacked anyway, like A&A, where the pieces are li’l plastic soldiers.

In the Mouse Over Stack viewer dialog box there is an check option for Display
Text.

Enable that and in the summary text select the sum(propertyname) option.

From the manual:
In addition to standard Properties, you can include a property with the name
sum(propertyName) where propertyName is a property defined on a Game Piece.� The
numeric values of this property for all included pieces will be substituted.

So give each piece a marker trait�property with a value of 1 and a name such as
ArmyCount, then in the MOS viewer dialog, turn on the display text with the
field saying $sum(ArmyCount)$


From: Galis corseth_df@hotmail.com
To: messages@vassalengine.org
Sent: Tue, September 7, 2010 3:01:00 PM
Subject: [messages] [Module Design] Stack Size Display

Just a simple question here:� how do I display the number of items in a
stack without relying on players to mouse over the stack?� Like, think
Risk where you can have multiple armies in a location.� If you had 3
blue army pieces, I would want both mouse over the stack to show the 3
pieces, but also a text label near the stack with “3” on it.� The latter
I can’t figure out how to do, since I don’t know how to reference a
stack with a textlabel or what property I would need to reference.


Read this topic online here:
https://forum.vassalengine.org/t/stack-size-display/3250/1

On Sep 7, 2010, at 1:45 PM, Timothy Mccarron wrote:

In the Mouse Over Stack viewer dialog box there is an check option
for Display Text.

Enable that and in the summary text select the sum(propertyname)
option.

From the manual:
In addition to standard Properties, you can include a property with
the name sum(propertyName) where propertyName is a property defined
on a Game Piece. The numeric values of this property for all
included pieces will be substituted.

So give each piece a marker trait property with a value of 1 and a
name such as ArmyCount, then in the MOS viewer dialog, turn on the
display text with the field saying $sum(ArmyCount)$

So I presume this will show the count when you mouse over the stack.

I’m guessing there isn’t any way to show the stack size without using
the mouse over. So I don’t think the OP can get what he wants.

From: Galis corseth_df@hotmail.com
To: messages@vassalengine.org
Sent: Tue, September 7, 2010 3:01:00 PM
Subject: [messages] [Module Design] Stack Size Display

Just a simple question here: how do I display the number of items
in a
stack without relying on players to mouse over the stack? Like, think
Risk where you can have multiple armies in a location. If you had 3
blue army pieces, I would want both mouse over the stack to show the 3
pieces, but also a text label near the stack with “3” on it. The
latter
I can’t figure out how to do, since I don’t know how to reference a
stack with a textlabel or what property I would need to reference.


Read this topic online here:
https://forum.vassalengine.org/t/stack-size-display/3250/1


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages