Trouble with Counting of property expressions

Hello All.

I am creating a vassal module for the game Guillotine. This is a card game. Players collect various cards, each which has a certain value.

I have added markers to each card that determine the value. Marker VP=1 for a card worth 1 point, VP=-1 for one that is worth negative points, etc. I also created a marker for color; Color=Blue.

Deck: -->Player1WinPile
I have checked the “Perform counting of property expression?” and have added the following (based on the game Dominion)
“VPCount1:VP=Calcuate”. I have placed two cards in this deck for now worth 5 VP each, both blue.

At-Start Stack: —>VP for Player1
I also created an at-start stack to report the VP value. So, it has VP: $Player1WinPile_VPCount1$ as the text value.

At-Start Stack: —>Color Count Blue for Player1
I also created an at-start stack to report the Color count, blue. This work and shows a value of 2.

For testing, I created a Toolbar button that activates a global property change to set change VP1 to “$Player1WinPile_VPCount1$” and reports this info.

So, I thought this would work, but it is not. The At-stack shows 0, and the toolbar runs one and shows my text, but nothing for VP1.

Is my syntax right for calculating the value of VP?

I was also wondering if I can use the “Calculated Property” Trait to track VP for certain cards that are worth more depending upon how many of that kind are in the current deck. So I need a formula to that counts how many of this card are in the current deck and sets this as the value. Something like “$Current_Deck$_PGCount” so if 3 are in the deck, VP is set to 3. Is there a value for current deck I can reference?


I have continued to work on this, and have come up with a solution. I have set a marker value for each card to indicate its value. Thus, value=VP5 for a 5 point card, value=VP4 for a four point card, etc. Then, I have a counter on the table with the "Calculated property value of TotalVP that takes Winpile1_VP55+Winpine1_VP44 (etc) and calculates the VP. Then a text label displays this with VP: $TotalVP$. Works great!