Page 1 of 1

different options for different numbers of players

Posted: 20 August 2020, 05:17
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).

Re: different options for different numbers of players

Posted: 20 August 2020, 07:08
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 => [],
        ],
    ],
    

Re: different options for different numbers of players

Posted: 05 November 2020, 09:03
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.