GameStyles.wiki
changeset 2030 1c0077fa2f65
parent 2029 41a66f3490e1
child 2031 6ac51d7a29c9
equal deleted inserted replaced
2029:41a66f3490e1 2030:1c0077fa2f65
    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.
    22 
    22 
    23 With an empty script, this game will behave exactly like a normal, unscripted game, with the same rules as a normal battle. Any code you write in the script will make Hedgewars deviate from the default gameplay.
    23 With an empty script, this game will behave exactly like a normal, unscripted game, with the same rules as a normal battle. Any code you write in the script will make Hedgewars deviate from the default gameplay.
    24 
    24 
    25 The documentation of [LuaAPI Lua API] applies. Some things we like to highlight:
    25 The documentation of [LuaAPI Lua API] applies. Some special notes for styes:
    26 
    26 
    27 In `onGameInit`, you can read the scheme settings and also change them. You can overwrite pretty much all scheme settings here.
    27  * In `onGameInit`, you can read the scheme settings and also change them. You can overwrite pretty much all scheme settings here.
    28 
    28  * In `onParameters`, you can parse the script parameter (which is also specified by the player in the game scheme).
    29 In `onParameters`, you can parse the script parameter (which is also specified by the player in the game scheme).
    29  * The functions `AddHog`, `AddMissionHog, `AddTeam` and `AddMissionTeam` are pointless here. Teams are chosen by the players, hogs are placed by the engine
       
    30  * Campaign variables and mission variables are pointless here.
    30 
    31 
    31 == Config file format ==
    32 == Config file format ==
    32 
    33 
    33 The config file is a text file with 2 lines:
    34 The config file is a text file with 2 lines:
    34 
    35