Pass number of players at startup in Battlestar Galactica

So I have no clue if this can be done, and if it can be what the correct way to do it is.

Now that I have the Battlestar Galactica modules working in 3.6.6, I want to clean up how the set up at the beginning of the game is done. In BSG, there are two things that modify the set up of the board/decks. One is what objective you are playing, and the other is how many people are playing (can be from 3 - 7 players). There are 3 main things that are modified.

1: Number/types of vipers and where they start: Based on objective
2: Number of Miracle tokens put out: Based on number of players
3: Number and types of loyalty cards put into loyalty deck: Based on number of players, cylon leader, and other options

Number 3 is currently done manually after choice is made. Since the group I usually play with almost always pick Ionian Nebula as our destination, we have some buttons on the main game board that say “Ionian Nebula 3p”, “Ionian Nebula 4p”, etc. Each of these buttons are a game piece that have a ton of triggers and other things in them that put the vipers in the correct plance, places the miracle tokens, and does other minor set up things including removing all the buttons once one is selected. I could do this for all of the setup options, but it would create about 30 buttons that cover the main game board when the game is first loaded. I have a way to clean it up, but I don’t know how to execute this, if it’s even possible.

First, the game would load with four buttons, one for each of the destinations. You click on one, and that will get all the vipers and other pieces (that are player count independent) in their correct places. After that is done, it loads a modal where I am able to type in/select the number of players, and check other options such as “play with cylon leader”, “play with fan made objectives”, etc. Once all of those options are set and I click on okay, it will build they loyality deck based on all the options chosen and then shuffle it. That way, the player only has to go grab one card from the top of the loyalty deck. It will also place out the correct number of miracle tokens (1 for each player).

So, can this be done, and how would I accomplish it? I’ve been told to use the “set global property” option, but I have no clue how to get it to take the number that is chosen, and then use that number to complete the steps. Any help would be greatly appreciated

You might want to take a look at Terraforming Mars; we pop up a “Game Settings” window when the game is initially loaded, where you set the various options and expansions you want to use. The game also automatically tracks how many players have joined the game, assigning each to a consecutive “Seat”, and then tracks which color belongs to each seat. When you click the “Start” button, a GKC is fired that removes all pieces belonging to unused player colors and whatever else is necessary to complete the set up for the selected options/expansions.

Note that while I’m the current maintainer for the English version, I did not write most of the module; I’ve just been adding to the pre-existing module, so I may not be able to explain the details of why/how some of it works!

That’s the exact situation I’m in. I picked up the module because it wasn’t working in Vassal 3.6+, and I wanted to make it work. Now I’m just trying to add some bonus features. I’ll check that module out though and see what I can pick up from it. Thank you.