I have a game where there are leaders counters on the main map and leader mats on a private map.
The mats contain the combat units.
I’d like to sum the SPs of the combat units and show them on the leader.
I build a previous release of the game as few years ago with the old Sum function. It worked but was a bit sluggish. I ran the same module on a recent version of vassal and it worked much faster.
I am now rebuilding the module from scratch and would like to use the newer functions.
so I have a leader counter BasicName pd_leader_BELLGARDE
and a mat counter BasicName pd-mat-BELLGARDE
yes the - and _ are what they are.
I figured this should do the match
SumMap("MATSP","{BasicName==$BasicName$.replace(\"_leader_\",\"-mat-\")}")
If I just do SumMap(“MATSP”,“AutoAOD”)
It sums just fine but for all the mats on that board.
So I am confident that it is the property match expression that is incorrect.
If I put this expression in a text label the name looks correct.
`{$BasicName$.replace("_leader_","-mat-")}`
I tried to add .trim() but it caused an expression error.
cheers
Gus