Add points in zone

I want to automatically calculate the total combat level and display it on the screen.

Combat level comes from every card (I’ve Marker- Value every card) in a certain zone of a map. All i need to do is add up the value of every card in that zone (this is their armor level), add in the players game level (1-9) and display it on screen. Players will continue to remove/add cards to this zone, so i will need it to update and display the new score.

Can anyone guide me through this?

Spent all day, still really stuck on this.

Hoping Tim, Brent, or Uckelman can maybe walk me through this very quick! Thank you.

Not sure this will work but you can give it a try:

Replace your basic marker property with a Calculated property on all your
cards that goes something like:

Property name: SetArmorValue
Property Value: If(CurrentZone = NameOfYourSpecialZoneHere,
TheCardsArmorLevel#Here, 0)

What this does is set in realtime the values of your card to either 0 if
they are not in the special zone you are talking about or to the value of
the armor level you put into the statement for each card.

Then put some blank counter on your map somewhere with a text label that
displays the property $WhatsMyTotalArmorValue$
give it a calculated property called WhatsMyTotalArmorValue that evaluates
Sum(SetArmorValue).

Hopefully what this is doing is looking for the sum of all the SetArmorValue
properties in the entire module which should be either 0 if they are not in
that zone or something else as specified by the armor level value if the
card is in the zone. Because it calculates realtime using this method there
is no need for keystrokes, triggers etc…

its been awhile since I worked in Vassal so Im not sure if sum works across
the entire module or just the component level. Worth a shot

-----Original Message-----
From: messages [mailto:messages-bounces@vassalengine.org] On Behalf Of
cjmeate
Sent: Monday, August 05, 2013 3:21 PM
To: messages@vassalengine.org
Subject: Re: [messages] [Module Design] Add points in zone

Spent all day, still really stuck on this.

Hoping Tim, Brent, or Uckelman can maybe walk me through this very quick!
Thank you.


Read this topic online here:
https://forum.vassalengine.org/t/add-points-in-zone/6187/2

Tim, thank you so much for that thorough answer. I appreciate you taking the time to help me…

I am looking to calculate the individual combat levels, per side. In simpler terms, players total level + card values in their armor zone.

As this is a module of Munchkin, players total level come from killing monsters, which would be completely independent of their armor value. I just need to add it to the cumulative value of the cards in the armor zone. Do you get what i mean or am i still not communicating this properly

Thanks again man. You are a life saver

Hi Tim. I just was able to try your solution, but i seem to be having trouble. I need the number to reset every time a card leaves that zone. It seems to just be staying the same when I remove a bonus, and then keeps going up as I add others. Also, I was unsure how to add text to a blank counter (do you mean turncounter with a counter added to it?) so I just used an at-start-stack with a basic piece and a label on it. But I was confused as to what commands to even put on it.

I have spent the last 10 hours trying to figure this out, but no luck. Do you think you could maybe please guide me through this, or someone else who maybe has an idea why the total value is not going back down when the card leaves the zone? Thanks

Also, I keep getting an infinite loop doing it like this. Could someone maybe build a really quick setup that I can go off ? All I need is a zone where every card put in there adds to a total which is displayed on the screen. When cards are taken out of it, it goes back down by that many. Each card has its own value. Is there a SumZone() command or something?

send it to me and I’ll look at it


From: cjmeate mikeebmusic@aim.com
To: messages@vassalengine.org
Sent: Wednesday, August 7, 2013 11:44 AM
Subject: Re: [messages] [Module Design] Add points in zone

Also, I keep getting an infinite loop doing it like this. Could someone
maybe build a really quick setup that I can go off ? All I need is a
zone where every card put in there adds to a total which is displayed on
the screen. When cards are taken out of it, it goes back down by that
many. Each card has its own value. Is there a SumZone() command or
something?


Read this topic online here:
https://forum.vassalengine.org/t/add-points-in-zone/6187/6