Advanced markers
wiki > User Tutorials > Advanced Vassal > Markers & Properties
Markers & Properties
What are Markers & Properties
Markers and Properties are esentially two different names for the same thing. They are named values belonging to counters that can be referenced by VASSAL components to change the way that VASSAL affects that counter. If you are a programmer, you can think of them as constants. The new Dynamic Property component can be thought of as variables.
Marker is the original term for properties created and attached to counters using the Marker trait. Property is a more general term that includes named values that VASSAL generates for you.
How do you create a Marker?
Let's look at the original marker trait, to see how to create a basic Marker. Let's create a marker named Nationality that contains the value of the country that owns that counter.
Easy! Locate the Marker trait, add it to your counter and enter 'Nationality' in the Property Name and the name of the Country into the property value. To be of most use, you should add a marker like this to a Prototype and add the prototype to all counters belonging to that same country.
How do you use a Marker?
Display a Marker value in a label
You can have the value of a marker or property displayed by a Text Label. Just specify the name of the marker or property encased in dollar signs.
Here a Text Label has been added to a counter with the text set to $Attack$. This will be replaced when you view the counter by the value of the Attack property, which has been set to 3 by the Marker trait. The result is you will see the number 3 displayed as the text of this label on this counter.
Again, this technique is most useful when the Text Label is created in a Prototype that has been added to many counters.
Defining Game Piece Layers
The definition of Game Piece Layers to create different stacking levels within your module is based on the value of a named Marker.
Here the value of the Marker named 'Layer' is beig used to define one of two different stacking layers - Ground and Air. A unit with a Marker name Layer with a value of 'Ground' will be assigned to the bottom layer. If the marker has a value of 'Air', it will be assigned to the upper level.
Display a Marker value in an Auto Report
The value of any Marker can be displayed in a Chat Window report generated by a Report Format by including the name of the Marker within '$' signs. Here is an example from a Map window:
Selecting specific counters with Global Key Commands
The value of a Marker can be used in Property Filters in Global Key Commands to apply commands to Selected counters on a Map.
Here, the Ctrl-F key command is to be applied to all counters that have a Marker named 'Nationality' with a value of 'German'. NOTE that you do NOT use $ signs around the Marker name when using a marker value in the first part of a comparison in a Property Filter.
Trigger Action selection
Setting the radius of Area of Effect and Counter Global Key Commands
Both the Area of Effect and Counter Global Key Commands allow a radius to be specified. The radius can either be a fixed number, or can be specified to be the value of a Marker.