I just got permission to work on a module for Westphalia. This has an interesting problem: Which player plays which role is decided by negotiation during the course of the game. I can see some relevant threads: Player sides - Request, Sides in Vassal 4. However I can see two possible approaches for tackling this in VASSAL 3 and I think I should consider carefully before picking an approach.
In the game role selection works as follows: There is a deck of 6 role cards which are dealt out to the players: Austria, Sweden, Spain, France, Dutch republic and Bavaria. Then each player can negotiate to get a different role:
So once role selection is complete the roles are fixed and cannot be changed.
The only super-duper secret bit of the game is the Austrian goal card. There is a deck of 6. The Austria player deals 3 and chooses 1. The other 5 cards are removed from the game.
I have two alternative implementation ideas: The Convener and Greek to Side mapping.
There are some commonalities between the two implementations which I will state first.
There is a Role Selection window with the 6 role cards as a deck. There are 6 plaques with the players’ names defined on them (like how the Pax Renaissance module does it). The person setting up the game (Convener or Alpha depending on implementation), deals out these cards to the plaques. They announce it to the players who can negotiate. Once these negotiations are complete the deals are implemented and a button is pressed locking the cards into place. (See page 59 in the designer’s guide).
Each of the 6 game sides has a window (Map Window or Private Hand depending on implementation). The Austrian window has a deck of 6 Austrian goal cards. However only “Austria” can see the face up side of an Austrian goal card. There is a command to deal 3 Austrian goals cards and this also removes the other 3 cards from the game. Each card also has a key/menu command which selects one and removes the others from the game. Only “Austria” can see this command. Of course what “Austria” means depends on the implementation.
Implentation plan 1: The convener
There are 7 sides: The Convener, Austria, Bavaria, Sweden, France, Dutch, Spain. The Convener side is only used during the preliminary negotiations. All the other sides have a private window which is owned by them and the Convener. In fact the Convener jointly owns everything except for the Austrian goal cards. All private windows are publicly visible.
The way this works in practice is that the Convener sets up the game. The other players log on as observers (not especially crucial if playing PBEM as the convener could just send out a picture of the Role-Selection window.) Only the Convener can press the “role selection lock” button. Once this button is pressed the players log on as their respective sides.
Implentation plan 2: Greek to Side mapping
There are 6 sides: Alpha, Beta, Gamma, Delta, Epsilon, Zeta. Alpha has control of the “role selection lock” button and also the turn counter apparatus. There are number of global properties that map the Greek side name to the “in-game” side name. These properties are set by the role-selection lock process. There is a calculated property that says what the current “in-game” side name is.
In this implementation the only way I can mask the Austrian goal cards is using layers though I believe that is doable. I cannot restrict access to most objects though I do not see that as a fatal issue.
The way this works in practice is that the Alpha player sets up the game. Other players log on as the other greeks. Any player can implement the preliminary negotiation deals, but Alpha is responsible for checking that everyone has had their say and that the deals have been implemented correctly. When Alpha is satisfied they press the “role selection lock” button and the game begins in practice.
So help me, please?
Can anyone see any issues with either plan? In particular I only play PBEM so there may be issues in real-time play I have not thought of. The biggest issue in the Convener implementation I can see is someone logging on prematurely as a normal side but I cannot see that they can do any real damage. The biggest issue I can see with the Greek implementation is that someone might deal the Austrian goal cards prematurely but that can simply be undone.