Missions.wiki
changeset 1686 ad2641650d35
parent 1685 2e6f3bfcb26b
child 2073 f02fee463bf9
equal deleted inserted replaced
1685:2e6f3bfcb26b 1686:ad2641650d35
    10 === The mission's Lua script ===
    10 === The mission's Lua script ===
    11 This is the heart of your mission. Here you will set up the mission and define the entire game logic of the mission.
    11 This is the heart of your mission. Here you will set up the mission and define the entire game logic of the mission.
    12 
    12 
    13 See [LuaGuide], [LuaAPI] and [LuaLibraries] for more information about scripting.
    13 See [LuaGuide], [LuaAPI] and [LuaLibraries] for more information about scripting.
    14 
    14 
    15 This file needs to be saved in `Data/Missions/Training`. The file name must end with “`.lua`”. Remember the file name, you will need it for the other files.
    15 This file needs to be saved in `Data/Missions/<MISSION TYPE>`, with `<MISSION TYPE>` being one of `Training`, `Challenge` or `Scenario`. The file name must end with “`.lua`”. Remember the file name, you will need it for the other files.
       
    16 
       
    17 These are the mission types:
       
    18 
       
    19  * Training: Tutorial-like mission that teaches the player a skill or is for practice. You can't lose
       
    20  * Challenge: Player must master a particular skill in order to reach a high score
       
    21  * Scenario: Player has to complete a predefined goal
    16 
    22 
    17 ==== Hints ====
    23 ==== Hints ====
    18 In mission scripting, some patterns appear often, so here are some hints for your convenience (Refer to [LuaAPI] for a full documentation):
    24 In mission scripting, some patterns appear often, so here are some hints for your convenience (Refer to [LuaAPI] for a full documentation):
    19 
    25 
    20  * Start with `onGameInit` to set up the most basic environment parameters, teams, hedgehogs, etc.
    26  * Start with `onGameInit` to set up the most basic environment parameters, teams, hedgehogs, etc.
    29 
    35 
    30 === Preview image ===
    36 === Preview image ===
    31 The preview image is displayed in the mission menu when you have selected the mission.
    37 The preview image is displayed in the mission menu when you have selected the mission.
    32 It must be a PNG image of size 314px×260px.
    38 It must be a PNG image of size 314px×260px.
    33 
    39 
    34 The file must be saved in `Data/Graphics/Missions/Training`. The file name must follow this pattern:
    40 The file must be saved in `Data/Graphics/Missions/<MISSION TYPE>`. The file name must follow this pattern:
    35 
    41 
    36 `<mission name>@2x.png`
    42 `<mission name>@2x.png`
    37 
    43 
    38 Where `<mission name>` is name of the mission script without the file name suffix.
    44 Where `<mission name>` is name of the mission script without the file name suffix.
    39 
    45