getNumberOfPlayers method?


I am trying to use Vassal API to add some automation to a module.

Is there a method that allows quickly to get the number of players currently playing?

Thank you

What I’ve usually done is create an initialization button for players after everyone is ready to go. Each player can then click that button to initialize their player side. You can use that button to increase a global property (something like: ActivePlayers) as well as set up other variables.


since my automatism is using a button, I could launch a message box that asks to input the number of players before executing the rest of the code, but I thought that such info could be retrievable from the API. Am I wrong?