VASSAL Reference Manual

Home > Module > Turn Counter


Turn Counter

A Turn Counter places a button and/or widget on the Toolbar of the Module window which keeps track of the current turn/phase/sub-phase, etc. of a game. Players can advance the turn forward or backward, or optionally jump directly to a turn.

To add a Turn Counter to your module, right click on the [Module] component at the very top of the Editor’s configuration window list, and select Add Turn Counter. Then, after configuring its fields appropriately, you will find your new component’s [Turn Counter] component entry at the bottom of the Module’s list of components. You can right-click on the [Turn Counter] component entry to add sub-components to represent levels within your Turn structure (see details and examples below).

TurnTrackerTurnWindow

TurnTrackerExample

|Description: A brief description of this turn level, which will appear in the Editor’s configuration window.

Property Name: The name of the global Property that will hold the value of this level. The Global Property will be updated whenever this level’s value changes.

Turn Level Format: A Message Format that specifies how the value of the level1, level2, etc property will appear in the Turn Counter’s Turn Name Format property.

List of Items: A list of text strings that the level will cycle through.

Allow players to hide items in this list: If selected, then players will be allowed to disable items in this list at game time.

Allow players to change which item goes first: If selected, then players will be allowed to change which should be the beginning item in the list, i.e. the item at which the parent level will be advanced. Example: If a List represents sides in a game, but the order in which sides move is not always fixed.

|TurnTrackerList|===

Counter

A Counter is a numeric turn level that advances by incrementing the value by a fixed amount. It can optionally loop around when it reaches its maximum value.

Description: A brief description of this turn level, which will appear in the Editor’s configuration window.

Property Name: The name of the global Property that will hold the value of this level. The Global Property will be updated whenever this level’s value changes.

Turn Level Format: A Message Format that configures how the value of the level1, level2, etc property will appear in the Turn Counter’s Turn Name Format property.

Start Value: The initial/minimum numeric value.

Increment By: The amount by which the numeric value increases when the level advances.

Loop: If selected, the level will return to its starting value after reaching the maximum value.

Maximum value: The maximum value, after which the level will loop.

TurnTrackerCounter

|Description: A brief description of this subcomponent, for display in the Editor’s configuration window.

Global Hotkey: The keyboard shortcut or Named Key Command: to fire. The module will respond exactly as if one of the players had pressed this key or selected a menu item corresponding to a named key command.

Match Properties: A Property Expression that specifies when to fire the hotkey or Named Key Command. If the expression is true after any level of the Turn Counter advances, the hotkey will fire.

Report Format: A Message Format that will be echoed to the chat log when the hotkey fires. |TurnTrackerGlobalHotkey|===