This is a documentation for Board Game Arena: play board games online !

ผลต่างระหว่างรุ่นของ "Game options and preferences: gameoptions.inc.php"

จาก Board Game Arena
ไปยังการนำทาง ไปยังการค้นหา
(Created page with "In this file, you can define your game options (= game variants). Note: If your game has no variant, you don't have to modify this file. // note: game variant ID sho...")
 
ไม่มีความย่อการแก้ไข
บรรทัดที่ 3: บรรทัดที่ 3:
Note: If your game has no variant, you don't have to modify this file.
Note: If your game has no variant, you don't have to modify this file.


<pre>
$game_options = array (
       
        100 => array (
                'name' => totranslate ( 'my game option' ),
                'values' => array (
                       
                        // A simple value for this option:
                        1 => array (
                                'name' => totranslate ( 'option 1' )
                        ),
                       
                        // A simple value for this option.
                        // If this value is chosen, the value of "tmdisplay" is displayed in the game lobby
                        2 => array (
                                'name' => totranslate ( 'option 2' ),
                                'tmdisplay' => totranslate ( 'option 2' )
                        ),
                       
                        // Another value, with other options:
                        //  beta=true => this option is in beta version right now.
                        //  nobeginner=true  =>  this option is not recommended for beginners
                        3 => array (
                                'name' => totranslate ( 'option 3' ),
                                'beta' => true,
                                'nobeginner' => true
                        )
                )
        )
);


    // note: game variant ID should start at 100 (ie: 100, 101, 102, ...). The maximum is 199.
</pre>
    100 => array(
                'name' => totranslate('my game option'),   
                'values' => array(
                            // A simple value for this option:
                            1 => array( 'name' => totranslate('option 1') )
                            // A simple value for this option.
                            // If this value is chosen, the value of "tmdisplay" is displayed in the game lobby
                            2 => array( 'name' => totranslate('option 2'), 'tmdisplay' => totranslate('option 2') ),
                            // Another value, with other options:
                            //  beta=true => this option is in beta version right now.
                            //  nobeginner=true  =>  this option is not recommended for beginners
                            3 => array( 'name' => totranslate('option 3'),  'beta' => true, 'nobeginner' => true ),) )
                        )
            )
 
 


Note²: All options defined in this file should have a corresponding "game state labels" with the same ID (see "initGameStateLabels" in yourgame.game.php)
Note²: All options defined in this file should have a corresponding "game state labels" with the same ID (see "initGameStateLabels" in yourgame.game.php)

รุ่นแก้ไขเมื่อ 01:18, 21 มิถุนายน 2559

In this file, you can define your game options (= game variants).

Note: If your game has no variant, you don't have to modify this file.

$game_options = array (
        
        100 => array (
                'name' => totranslate ( 'my game option' ),
                'values' => array (
                        
                        // A simple value for this option:
                        1 => array (
                                'name' => totranslate ( 'option 1' ) 
                        ),
                        
                        // A simple value for this option.
                        // If this value is chosen, the value of "tmdisplay" is displayed in the game lobby
                        2 => array (
                                'name' => totranslate ( 'option 2' ),
                                'tmdisplay' => totranslate ( 'option 2' ) 
                        ),
                        
                        // Another value, with other options:
                        //  beta=true => this option is in beta version right now.
                        //  nobeginner=true  =>  this option is not recommended for beginners
                        3 => array (
                                'name' => totranslate ( 'option 3' ),
                                'beta' => true,
                                'nobeginner' => true 
                        ) 
                ) 
        ) 
);

Note²: All options defined in this file should have a corresponding "game state labels" with the same ID (see "initGameStateLabels" in yourgame.game.php)


            self::initGameStateLabels ( array (
                       ...
                       "my_first_game_variant" => 100,
             ) );