[messages] [Module Design] Counting a variable number of pieces in a defined zone

Ektelioth ektelioth at gmail.com
Thu Jul 14 15:36:03 MST 2011


I am pretty new to Vassal, so my question may seem obvious, but the
problem is quite tough for me. I am currently developping a module in
which tokens have to be counted in several zones. I would like to
display the number of these tokens, sorted by zone and owner (each token
is owned by a player side), in a separate window. The point is that
every solution I have found for now in this forum concerns numbers of
tokens that can only increase (which could be done using global
properties, I think), whereas I would like to be able to refresh this
value even if some tokens are moved to another region (which can often

My map is a multi-zone grid defined manually and my tokens are (for the
moment) single pieces. Is there a way to count in a variable (maybe
linked to the zone?) the number of single pieces containing a certain
type? I have seen several times in different modules counters displayed
in text labels, but I was never able to find where the variables where
defined (for example in the Battlestar Galactica module, which is the
one I know best - even if far from perfectly -)

Thanks in advance and sorry again if that may seem obvious to more
experienced developpers :)

Read this topic online here:

More information about the messages mailing list