Turn Counter - how to jump directly to a turn?

As the topic states; How to jump directly to a turn?
In the reference manual for a Turn Counter, it states: Players can advance the turn forward or backward, or optionally jump directly to a turn.
How do I create An action that appears on the Menu Toolbar so I player can advance the Turn Counter to a specific Level?
I am new to Module Design so I am starting with modifying an existing module. Ihave a Turn Counter using a List of steps to the Turn
For example:
1.0 Roll weather
1.1 Roll initiative
1.2 Choose Color
2.0 Move
3.0 Attack
4.0 Unflip attackers
Then I want a button on the Toolbar that when clicked by any player, will advance\reset the Turn Counter to 1.2 Choose Color.
The button to be disabled when not at turn 4.0, the button onylyworks when at 4.0 Unflip Attackers.
I asked this type of question before in the Forum and I guess I had to many levels to the question so the answers went off on a tangent.
Again I am new so thing likes Action Buttons, Global HotKeys, Global Properties, and so on need to be explained to me in detail.
Thanks.

There is no way to force the Turn Counter to a specific turn via any outside means.

Plays can right-click on the Turn Counter and select ‘Set Turn’ and change the current values manually.

Not entirely true. There is a way which will involve GlobalKey and similar.

I assume what you have is a set of turns with specific phases, say, for the case of argument

  1. Turn
    • Reinforcements
    • Air support
    • Movement
    • Combat
  2. Turn (repeat the above phases).

You can set this up in VASSAL by having a TurnTracker with a Number sub-element, and a List sub-sub-element of the Number element. The Number element tracks the Turn number, while the List element tracks the Phases. If you have additional sub-phases, then you can add yet another List (or similar) element to the phase element. The Number element will define a global property called say Turn and the List sub-sub-element will define a global property called say Phase.

Suppose also that you defined a hotkey to advance the turn counter - say Alt-T. When the user presses Alt-T, the turn tracker will pass through the phases. Once it reaches the end of the phase list, it will increment the turn number and start on first phase in the list

1. Reinforcements -> Alt-T
1. Air support -> Alt-T
1. Movement -> Alt-T
1. Combat -> Alt-T
2. Reinforcements -> Alt-T
...

Now suppose you under certain conditions would like to skip the Air support phase (e.g., that optional rule is not used). Then you can add an action to the TurnTracker

key-command = skipAirSupport
condition = {Phase=="Air support" && !optionalAirSupport}    

and a global key

button-key-command = skipAirSupport 
key-command = Alt-T 

That means that the turn tracker will automatically skip over the Air support phase if optionalAirSupport is false.

Similarly, you can set up some piece on the map to receive commands on a specific turn or phase or combination thereof. Note that you should be relatively sure that the piece is on the map - for example a turn counter or some hidden unit. You could have, for example that on the start of the Air support phase, that a die is thrown, a counter records the die roll, etc.

Again, set-up an action on the TurnTracker a la

key-command = replenishAirPoints
condition = {Phase == "Air support"}

and a global key on the map

button-key-command = replenishAirPoints
key-command = replenishAirPoints 
condition = {BasicName == "GameTurn"}

The GameTurn counter can then have some trait (or traits) triggered by that key command (e.g., TriggerTrait, GlobalHotkey, or the like)

TriggerTrait
     key-command = replenishAirPoints
     action-key-command = [rollDie,assignAirPoints]
GlobalHotkeyTrait
    key-command = rollDie
    global-key-command = Alt-6  // Rolls die
GlobalHotkeyTrait
     key-command = assignAirPoints
     global-key-command = assignAirPoints 

Then the global assignAirPoints command will send a message to some piece - say AirPoints, which will use the value of the die roll (GetProperty("1d6_Result"), say) to send the piece to a specific location via a SendToTrait.

Side note: One cannot use the property 1d6_Result (the result of a die-roll) directly, since that would cause an error when loading the module. The reason seems to be that the global property 1d6_Result is not defined until the die was actually rolled. By using the indirect evaluation GetProperty, we can circumvent that race-condition.

If you want a tool-bar button to skip to a specific phase (or even turn and phase), then set up a global key command to send to some specific piece. The piece can then, upon receiving that command, use a TriggerTrait with loop conditions to sequentially send Alt-T, for example until

actionKeys = [Alt-T]
loop = untilConditionIsTrue
condition = {Turn==4 && Phase=="Combat"}

Similar techniques can be used to send in reinforcements, roll for weather, and so on. One can also limit certain actions on pieces using the Turn and Phase global properties (e.g., cannot declare combats in the Air support phase).

For some examples of how the turn tracker can be used for various things, see for example

Yours,
Christian