GameStyles.wiki
changeset 2027 97859a2b6c39
parent 2026 d345ec330d2a
child 2028 50a64e4112d8
equal deleted inserted replaced
2026:d345ec330d2a 2027:97859a2b6c39
     9 
     9 
    10 To create a style with the name `<name>`, create the file `<name>.lua`.
    10 To create a style with the name `<name>`, create the file `<name>.lua`.
    11 
    11 
    12 Here's the full list of supported files:
    12 Here's the full list of supported files:
    13 
    13 
    14 * `<name>.lua`: Mandatory. The script code. See below.
    14  * `<name>.lua`: Mandatory. The script code. See below.
    15 * `<name>.cfg`: Optional. Config file to specify the default schemes to use. See below.
    15  * `<name>.cfg`: Optional. Config file to specify the default schemes to use. See below.
    16 * `<name>.hwp`: Optional. A sidecar [HWPFormat HWP file] containing additional resources for the style.
    16  * `<name>.hwp`: Optional. A sidecar [HWPFormat HWP file] containing additional resources for the style.
    17 
    17 
    18 == How it works ==
    18 == How it works ==
    19 In the multiplayer menu, the player will select a style in the drop-down menu.
    19 In the multiplayer menu, the player will select a style in the drop-down menu.
    20 
    20 
    21 When the game is started, Hedgewas will initialize the script with all the player-chosen settings and also automatically places all hedgehogs and possibly some land objects (specified in the game scheme), just like in a normal game. Because the hogs are already placed, `AddHog` and `AddTeam` are pointless here.
    21 When the game is started, Hedgewas will initialize the script with all the player-chosen settings and also automatically places all hedgehogs and possibly some land objects (specified in the game scheme), just like in a normal game. Because the hogs are already placed, `AddHog` and `AddTeam` are pointless here.
    30 
    30 
    31 == Config file format ==
    31 == Config file format ==
    32 
    32 
    33 The config file is a text file with 2 lines:
    33 The config file is a text file with 2 lines:
    34 
    34 
    35 * Line 1: Name of the game scheme to select by default
    35  * Line 1: Name of the game scheme to select by default
    36 * Line 2: Name of the weapon scheme to select by default
    36  * Line 2: Name of the weapon scheme to select by default
    37 
    37 
    38 Both lines can use a special value: 
    38 Both lines can use a special value: 
    39 
    39 
    40 * `locked`: This scheme is locked and cannot be changed by the player
    40  * `locked`: This scheme is locked and cannot be changed by the player
    41 * `*`: Don't select a default for this scheme
    41  * `*`: Don't select a default for this scheme
    42 
    42 
    43 By default, the schemes are locked. If you use a locked scheme, the style will be initialized with the settings of the “Default” scheme, but you can always overwrite that in your script code.
    43 By default, the schemes are locked. If you use a locked scheme, the style will be initialized with the settings of the “Default” scheme, but you can always overwrite that in your script code.
    44 
    44 
    45 == Versioning ==
    45 == Versioning ==
    46 For community-created styles, we strongly suggest to follow a naming convention: Append a version number to the name. The style name is the form `<name>_v<number>`, where `<version>` is the version number.
    46 For community-created styles, we strongly suggest to follow a naming convention: Append a version number to the name. The style name is the form `<name>_v<number>`, where `<version>` is the version number.