Refresh a GP from a calculated property

Hi,
I already asked that question in another post but for other needs.
I have a 4 players game with a total of 5 maps: 1 global map, 1 for each player.
Using calculated properties, labels and zones, each player map (or board) displays numbers of pieces in a graphical table. This wors fine.

As a synthesis, I try to display that same info on the main map.

But the same label can’t be shown on 2 different maps. So I’d need to get its info from a Global Property.
My problem is the Global property is not refreshed in real-time when something changes on a map. I’d need a trigger for that. And I’d need to change the labels on each individual map so they are populated by calculated property (real-time) but they refresh the GP based on some triggers.

If I only use actions, buttons, and keystrokes, then it’s ok to trigger the GP.
But if someone grabs a piece manually to drop it somewhere else, the calculated property is ok to show the zone content and changes, but there is no trigger for the GP.

What would you do ?

I think I will trigger the main map update after the end of a player’s turn. This means the main map will show obsolete info until the end of current player’s turn. But I really wanted to make it dynamic :frowning:.

There is an option on each map to fire a key command whenever a piece ends its movement on that map. Just trigger the GP update from that on all the maps players can drop pieces on.

Yes I use that option too. Thanks.
I’m afraid this would trigger too many reactions, and make the whole thing heavy, based on the total number of pieces I would have at the end.

Interesting. I thought that having Calculated Properties directly displayed on Text Labels might have more impact on performance, than recalculating some of them when moving pieces. But I’m not sure. And I’d like to see comments on this topic from vassal developers.

Referencing a Calculated Property in an omnipresent Text Label absolutely had crippling performance impacts for me–even used sparingly (two labels). Brian pointed me in the right direction, which was to have Dynamic Properties that update at the needed times with the CP value, and display the DP in labels.

That point is interesting, Joel !
Going 1 step beyond,
You suggest to use a CP to do the maths, and name the CP in the DP to be displayed in labels.
What about using the CP formula directly in the DP definition ? If the Calculated Property has no other reason (in my dev) than to be displayed, it would be even better, no?

Why is this too many triggers? Are all 4 players selecting and moving giant stacks of pieces simultaneously? In most turn-based games, only a single player is manipulating a single stack at a time. I say this because every module I’ve designed uses CPs on each piece that update GPs with map-based movement triggers and I’ve had zero performance issues…

I was not talking about the big stacks moved at once, but about the multiple locations I wanted to display the labels.
But I found my way out, thanks to the help here.
Working with GP without initial value, I can even have my players scores (many labels to display) not showing anything if I have less than 4 players ! As soon as a player is in, the scores and labels are being displayed with zeros everywhere (at first, then they will evolve)