Rotating First Turn

I have 2 modules where the first player to move each turn is determined on a rotating basis. (If the game has 3 players, Blue, Green and Red, then if Blue is the first player on Turn 1, on Turn 2, Green goes first, and on Turn 3, Red.) In the RL versions of these games, this is not a big deal to track. On Turn 1, the first player (determined randomly) gets a card that says First Player. When the turn ends and everyone has gone, he simply passes the First Player card to the player on his left, who then becomes first player for Turn 2, and then looping. But there is no ‘player to your left’ in Vassal, so it becomes trickier. One game uses player numbers (Player 1, Player 2) and one game uses piece colors, but the concept is the same.

Right now both modules use the pass-the-card system, inherited from the RL games…but it means the players have to manually pass the card to the first player each turn. (Also, adding to the complexity is the variable number of players in the game–some games might have Blue and Red, some games might have Blue, Red and Green.)

Instead, I am trying to build something in Vassal to automate this, something that requires no player intervention each turn. Ideally, once you told it who Player 1 was for Turn 1, the module would automatically determine the turn order at the start of each subsequent turn and then announce the new order when the turn counter was incremented, and also not include inactive sides in the turn order announcement. (The sequence itself can be the same each turn, btw–it’s just the starting point in the sequence that changes each turn.)

Any thoughts or advice on how to implement this would be greatly appreciated.

I have to run in a few minutes so I’m just going to throw out some conceptual ideas that crossed my mind.

Create a Global Property called CurrentPlayer. It’s initial value could be a specific color which will always start the game or you can leave it blank and have some other way of randomly determining which color starts …but that’s a different ball of wax.

You’ll also need to set up a Region Point (Irregular Grid) in front of each player to send the turn marker to. You could call these points: BlueTurn, GreenTurn, RedTurn

Then you could set up an “End Round” or “New Round” button that can be clicked to go to the next round.

In the traits for this button, you can have a Set Global Property trait with 3 key commands

ALT B - set to “Blue”
ALT G - set to “Green”
ALT R - set to “Red”

Then include a series of Trigger Actions with the property filters

CurrentPlayer = Blue
-----Trigger ALT G, SHIFT S

CurrentPlayer = Green
-----Trigger ALT R, SHIFT S

CurrentPlayer = Red
-----Trigger ALT B, SHIFT S

You would also include a Global Key Command to accept the SHIFT S and send a CTRL S to the player turn marker.

The player turn marker would then have a Send to Location trait that receives a CTRL S and sends the piece to region point $CurrentPlayer$Turn

Thanks, that seems pretty straightforward and I will try it out. I’ll probably put the grid on a hidden map because there’s no need to see it, and then set up reporting so it announces each time the first player changes.

The tricky bit for me is what happens if there’s less than a full complement of players, that is, what if there’s no Green player? Ideally, I’d like it to skip inactive sides. In the actual game, there are six colored sides to choose from, so this will probably happen often.

I do similar stuff in the mods I’m working on. Let me give this one some thought and experiment a bit but it’s certainly doable. Back later.

Here’s a sample that should do what you’re looking for. Included is a vmod and notes.

Thanks so much for this, DrN! This is way more detailed than I could have asked for, especially with the explanatory notes. I’ll try and fit it into my two modules and let you know how they work out.