Game-Piece Sum as Dymanic Property

A game has an unmoveable game piece which displays a Food Count for a player. This Food Count must be decremented by the total number of a player’s game-pieces on the board at the end of each turn.

I see how to make a dynamic property for the Food Count and display it on the game-piece. I also see how to decrement it by a fixed numerical amount. But how do I decrement it by the number of a player’s game-pieces?

I tried giving the game-pieces markers, such as for nationality. Then an inventory window can show the total for each marker (such as sum_German), but I can’t see how to subtract such a value from the Food Count.

If the above makes sense, can anyone help, please?

you’ll need 2 things. A key on the DP that decrements the Food count by 1 and a universal GKC that activates all the related player game pieces (via marker property) to execute a counter GKC that points to the DP with matching key. How you invoke the sequence is dependent on when/where/how it should be applied. Would need more info for that

From: Kim messages@forums.vassalengine.org
To: messages@forums.vassalengine.org
Sent: Tuesday, April 7, 2009 6:52:18 AM
Subject: [Module Design]Game-Piece Sum as Dymanic Property

A game has an unmoveable game piece which displays a Food Count for a player. This Food Count must be decremented by the total number of a player’s game-pieces on the board at the end of each turn.

I see how to make a dynamic property for the Food Count and display it on the game-piece. I also see how to decrement it by a fixed numerical amount. But how do I decrement it by the number of a player’s game-pieces?

I tried giving the game-pieces markers, such as for nationality. Then an inventory window can show the total for each marker (such as sum_German), but I can’t see how to subtract such a value from the Food Count.

If the above makes sense, can anyone help, please?


Messages mailing list
Messages@forums.vassalengine.org (Messages@forums.vassalengine.org)
http://forums.vassalengine.org/mailman/listinfo/messages_forums.vassalengine.org

Post generated using Mail2Forum (mail2forum.com)

Let me see if my fuddled brain (v 0.4) has understood that. Do you mean that rather than finding the number of game-pieces and somehow subtracting that value from the Food Count, each relevant game-piece would be told to decrement the Food Count by 1?

Ideally, it would be carried out by clicking a button at the end of a player’s turn.

Correct. And your universal toolbar GKC that initiates the sequence is also your end turn button

From: Kim messages@forums.vassalengine.org
To: messages@forums.vassalengine.org
Sent: Tuesday, April 7, 2009 7:33:32 AM
Subject: [Module Design]Re: Game-Piece Sum as Dymanic Property

Tim M wrote:

Let me see if my fuddled brain (v 0.4) has understood that. Do you mean that rather than finding the number of game-pieces and somehow subtracting that value from the Food Count, each relevant game-piece would be told to decrement the Food Count by 1?

Ideally, it would be carried out by clicking a button at the end of a player’s turn.


Messages mailing list
Messages@forums.vassalengine.org (Messages@forums.vassalengine.org)
http://forums.vassalengine.org/mailman/listinfo/messages_forums.vassalengine.org

Post generated using Mail2Forum (mail2forum.com)

I set it up the way you instructed, and it works beautifully. Thank you for the help. :smiley: