Double Hex Counter - Example

Over on the Discord chat @jestew asked to see a module with an example of multi-hex counter handling that I mentioned. The example is in an update to the Flying Colors module that I hope to release on Vassal soon; meanwhile, find the latest test version here.

The module has three functions that address double-hex counters.

  1. Matching a marker counter to underlying ship counter (size, rotation and layer) so that the marker will stack with the ship…

Relevant components :

Global Properties (constants):
dX / dY map hex width and height
dXn / dYn (n= facing) offset pixels of “rear” hex of counter

Prototype: SOL Markers
key function: sets location properties on the ship marker

Prototype: Set Marker Layer
Referenced by all single/double marker pairs (see below). This trait does the alignment, driven by a trigger.

Game Piece Palette: Markers / Ship Markers
Single hex markers which, where applicable, will swap with a double hex size equivalent (from a hidden palette) and back again, The Adrift marker is typical:
Current Traits
Movement of the marker onto a ship counter triggers a check that may result in replacement of the marker and/or re-alignment (re-alignment is in prototype Set Marker Layer).

  1. Controlling a custom movement marker
    Game Piece Palette: Hidden Palette / Module Functions
    Movement Tracker - placed/controlled from ship counter movement. Will follow ship, even though it is not stacked and is at an offset location (linked through a serial id number which acts as a GKC target).

  2. Area of Effect
    Prototype: SOL Area of Effect
    Traits to create an Area of Effect around a second piece, placed so that the specified AoE is accurately drawn around the double-hex counter (ship or leader). Places a piece from the hidden palette (“Vzone2”) that provides the second, overlapping AoE. Without this, an AoE around the double-hex counter would be 1 hex short.

3 Likes

Original post updated to add 3rd double-hex function in the example module (Area of Effect).