different options for different numbers of players

Game development with Board Game Arena Studio
Post Reply
User avatar
Nisterius
Posts: 26
Joined: 23 June 2020, 04:36

different options for different numbers of players

Post by Nisterius »

Is there a way to have different options available depending on the number of players?

Since you can say, e.g., "2 to 3 players" - I'm not even sure what that would look like.
The game I'm working on can be played with 2 players, usually to 100 points; but when played by 3 players it isn't played to a target score.

I wanted to offer the three player version a number of hands, 3,6,9,12,15; but offer the two player version 100 points (usual) or 50 points (short).
User avatar
Volker78
Posts: 66
Joined: 29 April 2020, 21:37

Re: different options for different numbers of players

Post by Volker78 »

I had something similar:

Code: Select all


    100 => [
        'name' => totranslate('Players'),
        'values' => [
            0 => [
                'name' => totranslate('Default (3-5)'),
                'maxplayers' => 5,
            ],
            1 => [
                'name' => totranslate('Extended (3-6)'),
                'description' => totranslate('For 6 players...')
            ]
        ],
        'startcondition' => [
            0 => [
                [
                    'type' => 'maxplayers',
                    'value' => 5,
                    'message' => totranslate('Default mode is available for 5 players maximum.')
                ]
            ],
            1 => [],
        ],
    ],
    
User avatar
LaszloK
Posts: 36
Joined: 05 January 2018, 19:00

Re: different options for different numbers of players

Post by LaszloK »

There is also the 'displaycondition' element - it's generally more elegant if you can solve the problem using that (i.e. rather than prevent the game from starting when the options picked are incompatible, prevent the user from picking an incompatible set of options in the first place). The game options in hungariantarokk contain a few examples.
Post Reply

Return to “Developers”