Accessing map-level property outside of the map

I want to access a deck counter (_numPieces) from outside the map where the deck is, since I’m on another map it is out of scope, is there a way to replicate this value globally to all maps?

I’ve found an easy way to do this in my game.

What I did was make a phantom At-Start stack piece on the map with the card deck. The piece is 10x10 and transparent and tagged as non-selectable and non-movable so, from a players perspective, the piece doesn’t exist.

Then I have a way to send a command to that piece to Set Global Property (named CardCount, for example) with (_numPieces). I can then use a Text Label trait to display $CardCount$ where ever I want.

Great. This should work.

One thing that is bugging me with VASSAL, is the the order of execution of commands. From what I imagine:

  • Trigger Action commands are fired sequentially and waiting for each fired command to return before executing the next;
  • Piece traits called by the same command are executed based on order of creation (instead of trait order, I’ve found that in a post somewhere here).
  • Stacked pieces seems to be processed from the bottom up (the first piece is in the bottom of the stack), but I can’t guarantee it.
  • Multiple stacked selections are executed one stack after the other, having a stack fully processed before going to the next stack, this I can’t also verify.