Counting Victory Points

Ok. I’ve got pretty much everything I need for my module. The only thing I want to do now is create a deck that players can put their Victory Cards into and have a counter that automatically adds up their victory points based on the VP value of a card. I’ve been banging my head to comprehend this, but it’s just not sinking in.

So, here’s what I need. I have cards that range in victory point value anywhere from 0 to 5 points. When I place a card in the victory pile, I want the system to automatically calculate the Victory Point value and display it below the deck.

That’s the simple part…mostly. The harder part is that I have some cards that have values based on the number of certain types of cards in the player’s deck.

Can anyone help a poor, old man? :smiley:

Each player’s VP total can be a global property. The map where these piles of cards are located should be set to apply some keystroke to all pieces ending movement on that map. The cards should have a trigger that responds on this keystroke with a property match expression specifying that it must be in the zone/deck corresponding to this pile of scored cards. The trigger then fires a Set Global Property incrementing the player’s score by the proper amount. Have a Text Label trait on an immobile, invisible piece below your pile of scored cards, and have it display the current value of the player’s VP global property.

Yes, that does sound more involved.

Its very doable of course - just not with the information provided as is

Ok. Here’s the breakdown. I’m doing Marvel Legendary. I have a card that says “you get +1 VP for every Tech Hero in your deck at the end of the game”. I also have a card that says “worth 3 VP for each other Hydra card in your Victory Pile”.

I understand what Joel is saying above, but I have seen in another module where the Victory Points were calculate automatically when placed into a deck. That’s what I am looking for.

Don’t know what the module your referring to is but besides that, more or less you just want to follow what Joel was saying except you will need GP’s for all your different properties and then on your display piece use CP’s (referencing the relevant GP’s) to do your calculations for you and then display the sum of those various CP’s

For example using what you have provided above you would have a GP’s called EndOfGame, TechHero, HydraCount and so on.

One of your CP’s would be:

TechCountCP
if(EndOfGame = true,$TechHero$,0)

another would be:

HydraCP
sum($hydra$*3)

and finally you might have

TotalCP
sum($TechCountCP$+$HydraCP$+Whatever+this and so on…)

Textlabel: $TotalCP$

My syntax may not be totally accurate - its early and I’m not at full gear at the moment but that should give you the general gist even if its not totally correct

The game I am making into a module is “Legendary - A Marvel Deck Building Game”. I am by no means an expert of Vassal, so I am kinda understanding what you are saying. My question is you write “sum($hydra$*3)”. I get that I need to make a GP called hydra and assign that to my card to show that it’s a hydra card. But, shouldn’t the sum have more to it? like “sum($<deckname_hydra>$*3)” referencing my victory point pile?

I meant the other module you had seen with VP calculation, not yours sorry.
As I said my syntax may not be correct, Im just giving you a general idea of what you want to do. It’s not be exact and may have to be adjusted to situations

If you go with your sum the count will not be correct, do the math with your expression if you had three hydra in the deck

according to the card you get 3 points for each other hydra in the deck. The emphasis is important here. In other words the correct score should be:
3 x (2 x 3) = 18

with your formula you get 3 (number of cards) X 3 = 9 which would not score right

the correct formula therefore should be

sum (Decknum_hydra*((Decknum_hydra-1)*3))

I apologize for being dumb. But, I just am not getting this. I have the values but no matter what I do, instead of totaling up the total value of the points, it’s counting each card. So here is what I’ve tried. We’ll worry about the basic cards right now.

Card
Marker: VPValue=2

Player 1 Victory Pile
Activated counting properties = VPTotal:sum(Player1VPDeck_VPValue)
Token to display total VPs: Text Label = “$VPTotal$”)

I’ve tried making the Maker a Dynamic Value also. When I put a text label on the card and have it display it’s VPValue, it displays it properly. But, when the Token with the label displays it just counts 1 per card, no matter what it’s VPValue is. What am I doing wrong?

sum won’t work in CP – Vassal 3.2.11 returns an error “Calculated Property[value]={sum(brigade)}, Error=Command not found: sum( java.lang.String )”.