Aligning “Can Rotate” to game rules

A typical piece in a hex and counter game will have a Can Rotate trait defined with 6 facings. This works fine where the map and game rules align to Vassal’s set Facings, i.e. facing 1 is the north-facing side. Where the game alignment is offset from Vassal’s, the Can Rotate trait will need to be defined with 12 facings; if the game piece only has 6 facing sides, this will mean that players need to rotate the piece twice for each facing.

For example, on the Montmirail map in Jours De Gloire: Montmirail and Vauchamps 1814 the north-facing side is a flat edge but in this game, unit counters must face to a vertex:
Pasted Graphic 2
In Vassal terms, the counters in this picture are aligned to facing 11 but in game terms this is one of only 6 allowed facings.

To make a this type of hex grid operate as six-sided and vertex-aligned, use Trigger traits to “bump” each rotation step onto the next vertex. The benefit of this is that the user will only need to perform one rotation command for each facing change in the game, rather than two.

i) The Can Rotate trait is defined with 12 facings, as before
ii) For both Rotation commands (Clockwise and Counter-Clockwise), define a Trigger that actions an additional Rotation. The counter will be created aligned to Vassal facing 1, so put the following condition in the Trigger when properties match field so that the counter will not bump an extra step if it is starting on an edge facing:

{Rotate_Facing % 2 == 1}

(Rotate is the Rotator name, as defined by you in the Can Rotate trait. The condition is true when the Facing is an odd number).

Configuring for different map types
If you have maps with different hex grid orientations in the same module, you could define a map level global property so that the same rotation commands will work in either type of map. Adapting the previous example, dFace would be the map global property set to 0 or 1 depending on the hex orientation of the map:

{Rotate_Facing % 2 == dFace}

This solution can be further tailored to allow exceptions to the alignment. For example, the following Trigger condition evolved from the previous example to allow counters to be aligned vertically as well as to any vertex:

Vassal v3.6
Vassal v3.6 provides a more efficient solution via “Rotate direct to a facing” feature. Facing calculation/property can be entered directly in the Can Rotate trait, doing away with the need for a Trigger.