gameoptions enable/disable

Game development with Board Game Arena Studio
Post Reply
User avatar
Rudolf
Posts: 557
Joined: 24 December 2011, 23:04

gameoptions enable/disable

Post by Rudolf »

Hello,
I need to make some gameoptions dependant of other gameoptions,,,there are some funcitons for that, and its done in Race of Galaxy.
I just discover that I cannot see the code of race of galaxy ( not possible to put this one in readonly)
Is it possible to give me access to the gameoptions file of ROG? Or put the code here?
thanks
User avatar
galehar
Posts: 136
Joined: 29 March 2015, 00:12

Re: gameoptions enable/disable

Post by galehar »

What you're looking for are displaycondition and startcondition.

Here is the gameoptions for RFTG:

Code: Select all

$game_options = array(

    100 => array(
                'name' => totranslate('Expansion'),
                'values' => array(
                            1 => array( 'name' => totranslate('Base game'), 'tmdisplay'=> totranslate('Base game') ),
                            2 => array( 'name' => totranslate('The Gathering Storm'),  'tmdisplay' => totranslate('The Gathering Storm'),  'premium'=>true,  'nobeginner' => true ),
                            3 => array( 'name' => totranslate('Rebel vs Imperium + The Gathering Storm'),  'tmdisplay' => totranslate('Rebel vs Imperium + The Gathering Storm'),  'premium'=>true,  'nobeginner' => true ),
                            4 => array( 'name' => totranslate('Rebel vs Imperium + The Gathering Storm + Brink of War'),  'tmdisplay' => totranslate('Rebel vs Imperium + The Gathering Storm + Brink of War'),  'premium'=>true,  'nobeginner' => true ),
                            5 => array( 'name' => totranslate('Alien Artifacts (with Orb)'),  'tmdisplay' => totranslate('Alien Artifacts (+ Orb)'),  'premium'=>true,  'nobeginner' => true ),
                            6 => array( 'name' => totranslate('Alien Artifacts (no Orb)'),  'tmdisplay' => totranslate('Alien Artifacts (no Orb)'),  'premium'=>true,  'nobeginner' => true ),
                            7 => array( 'name' => totranslate('Xeno Invasion (with Invasion))'),  'tmdisplay' => totranslate('Xeno Invation (+ Invasion)'),  'premium'=>true,  'nobeginner' => true ),
                            8 => array( 'name' => totranslate('Xeno Invasion (no Invasion))'),  'tmdisplay' => totranslate('Xeno Invation (no Invasion)'),  'premium'=>true,  'nobeginner' => true ),
                        ),
            		'startcondition' => array(
			            1 => array( array( 'type' => 'maxplayers', 'value' => 4, 'message' => totranslate( 'Base game is only available for 4 players maximum.' ) ) ),
			            2 => array( array( 'type' => 'maxplayers', 'value' => 5, 'message' => totranslate( 'The Gathering Storm is only available for 5 players maximum.' ) ) ),
			            3 => array( ),
			            4 => array( ),
			            5 => array( array( 'type' => 'maxplayers', 'value' => 5, 'message' => totranslate( 'Alien Artifacts is only available for 5 players maximum.' ) ) ),
			            6 => array( array( 'type' => 'maxplayers', 'value' => 5, 'message' => totranslate( 'Alien Artifacts is only available for 5 players maximum.' ) ) ),
			            7 => array( array( 'type' => 'maxplayers', 'value' => 5, 'message' => totranslate( 'Xeno Invasion is only available for 5 players maximum.' ) ) ),
			            8 => array( array( 'type' => 'maxplayers', 'value' => 5, 'message' => totranslate( 'Xeno Invasion is only available for 5 players maximum.' ) ) ),
                    )
            ),

    101 => array(
                'name' => totranslate('Draft variant'),
                'values' => array(
                            1 => array( 'name' => totranslate('No draft') ),
                            2 => array( 'name' => totranslate('Draft'),  'tmdisplay' => totranslate('Draft'),  'premium'=>true,  'nobeginner' => true ),
                        ),
                'displaycondition' => array(    // Note: do not display this option unless these conditions are met
				   array( 'type' => 'otheroption', 'id' => 100, 'value' => array(2,3,4) )
				),
        		'startcondition' => array(
			        1 => array( ),
			        2 => array( array( 'type' => 'maxplayers', 'value' => 3, 'message' => totranslate( 'Draft option is available for 3 players maximum.' ) ) ),
                ),
                'disable' => true

        ),
    102 => array(
                'name' => totranslate('Takeovers'),
                'values' => array(
                            2 => array( 'name' => totranslate('No takeover') ),
                            1 => array( 'name' => totranslate('Allow takeovers'),  'tmdisplay' => totranslate('Takeovers'),  'premium'=>true,  'nobeginner' => true ),
                            3 => array( 'name' => totranslate('2-Player Rebel vs Imperium Takeover Scenario'),  'tmdisplay' => totranslate('RvI scenario'),  'premium'=>true,  'nobeginner' => true ),
                        ),
                'displaycondition' => array(    // Note: do not display this option unless these conditions are met
				   array( 'type' => 'otheroption', 'id' => 100, 'value' => array(3,4) )
				),
                'startcondition' => array(
                        1 => array( ),
                        2 => array( ),
                        3 => array( array( 'type' => 'maxplayers', 'value' => 2, 'message' => totranslate( 'Rebel vs Imperium Takeover Scenario is available for 2 players only.' ) ) ),
                ),
      'disable' => true

        )
// Be careful : 103 is used as a constant in the game.


);
User avatar
Rudolf
Posts: 557
Joined: 24 December 2011, 23:04

Re: gameoptions enable/disable

Post by Rudolf »

thanks;)
Post Reply

Return to “Developers”