Create account / Log in

Dynamic pick list of current Player Names?

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

Dynamic pick list of current Player Names?

Postby jimbojimbo » September 28th, 2020, 6:14 am

Hello All -

I would like to create a pick list in a dynamic property, populated by all of the current players' names.

Has anyone tried to do something like this?

Is there a nuance in the difference between PlayerSide, PlayerId and PlayerName that I could exploit?

The game module I'm working on would always have between 5-10 players, so I suppose I could populate the list with 10 unique global property names (G1 - G10) and then have each of these global properties set as the playername somehow?
jimbojimbo
 
Posts: 13
Joined: July 2nd, 2020, 6:38 pm

Re: Dynamic pick list of current Player Names?

Postby marktb1961 » September 28th, 2020, 9:48 am

Pax Pamir 2nd Ed does something to collect Player Names and map to sides at the game startup. Not quite what you're asking but it might help you to take a look.
Platform used:
Vassal 3.4.10
MacOS Big Sur
iMac (27", mid-2020)
User avatar
marktb1961
 
Posts: 331
Joined: October 4th, 2018, 2:36 pm
Location: Liverpool, England

Re: Dynamic pick list of current Player Names?

Postby kerkael » November 17th, 2020, 4:49 pm

I use 2 GP per side plus 1 per seat. In a 5 players game I will use
- BlackNumber (populated from seat#) and BlackName (populated from PlayerName)
- Blue...
- ...
Then Seat1, Seat2, Seat3, Seat4, Seat5 : populated from Colors/Sides in game.
This allows to create traits and functions based on $PlayerSide$Number, finding the color/side assigned to a number from Seat#.
Module I developed: Terraforming Mars
Module I'm working on: Trismegistus
kerkael
 
Posts: 173
Joined: December 1st, 2017, 3:03 pm

Re: Dynamic pick list of current Player Names?

Postby kerkael » November 17th, 2020, 6:52 pm

Hi,

I'm sharing this module made of dropdown from seat numbers and player names.
To test it, I simulated the names and seats from buttons.

Right-click on the text to see the 2 options.
Attachments
PlayersModule.vmod
Small Module for demoing dropdown from playe names
(16.41 KiB) Downloaded 4 times
Module I developed: Terraforming Mars
Module I'm working on: Trismegistus
kerkael
 
Posts: 173
Joined: December 1st, 2017, 3:03 pm


Return to Module Design

Who is online

Users browsing this forum: No registered users and 4 guests