Assign a Number to the players maybe from a dropdown

Hi, here is my issue today :slight_smile:

When the game is launched I have a MultiBoard map asking for the number of players in that game.
I want then the identified players to be assigned a number, from 1 to 5, in addition to their color.
How can I make this proposed from a dropdown list, or even from a random assignment?

What about the number of players in the game? Is there a predefined property for that or do I need to create it as a GP, or from the Map Question I asked?
I know $PlayerSide$ & $PlayerName$, but that’s for the current player. How can I create a loop to assign a GP for each of them, based on the choice at start for the number of players?

Thanks all for your help

What I would do is create a Initialization button for each player. Once they’ve picked a player side and entered the game, they would click this button to set themselves up. You can include a trait to update a Global Property by one. This not only counts the number of players in the game as they initialize but you can also include a trait to set a Global property for that playerside to be given that number.

Here’s a sample for using initialization buttons to set up a player side. (change the .zip to .vmod)

You have three sides: red, blue & green

You’ll see three buttons, one for each color. You’ll only be able to click the button for your color unless you change sides.

When you click a button, it will increase a global property that tracks the number of players and it will also assign that player a number that will be reported in the chat window.

Thx for the idea. As I’d like to make it as automatic as possible, I found a way for the Number of Players, but will investigate how I can do for the playerId. Maybe letting each player roll a dice to define who plays first … which in fact could be your initialization button, by the way …

For the number of players, I’m now using a Select Board option when we launch the game … and a startup GKC which will trigger a Set Global Property trait from an At-Start piece present in the board.
It does this : Global Property Name : NP / Key Command : runatstart / set value directly : {If($CurrentBoard$=~“5 Players”,5,If($CurrentBoard$=~“2 Players”,2,If($CurrentBoard$=~“3 Players”,3,If($CurrentBoard$=~“4 Players”,4,1))))}
I will then be able to use this GP in my formulas.

…; I just realized I should name my boards 1,2,3,4 and 5 ! and just use the $CurrentBoard$ as the value for my GP :smiley:

My previous answer was before I saw your answer. I just tested it. Ok, it’s quite obvious : you join, you click your color, you get an Id.
Thanks; I will adapt that to my module.

Great ! Thank you DrNostromo. The idea is very good, indeed. The sample module is fine.
I could adapt to what I exactly needed.