ConfigurationFiles.wiki
changeset 1721 d79a66ca382e
parent 1576 c0026d20b468
child 1722 64d86e73127d
--- a/ConfigurationFiles.wiki	Mon Apr 08 02:26:48 2019 +0100
+++ b/ConfigurationFiles.wiki	Mon Apr 08 02:38:07 2019 +0100
@@ -385,8 +385,8 @@
 || `Progress` || Integer || Since version 0.9.23, this variable stands for the number of completed missions in a linear campaign, starting with mission 1. For each completed mission, the next one gets unlocked. Previous versions have a slightly trickier definition: If present, this number of missions _additional to the first mission_ are unlocked in the menu, starting with the second mission and continuing with the following missions in their regular order (as specified in `campaign.ini`). If the number is `0`, only the first mission is available. ||
 || `UnlockedMissions` || Integer || This number specifies how many missions are unlocked. If this variable is set, then the variables `Mission1`, `Mission2`, etc. must be used to specfify the IDs of the unlocked missions. ||
 || `MissionX` || Integer || E.g. `Mission1`, `Mission2`, etc. Contains the `campaign.ini` ID of the `X`th unlocked mission, must be used together with `UnlockedMissions` ||
-|| `MissionXWon` || Boolean || Since 0.9.23. E.g. `Mission1Won`, `Mission2Won`, etc. If `true`, the mission with the number `X` in `campaign.ini` has been completed. ||
-|| `Won` || Boolean || Since 0.9.23. If `true`, the team has completed the campaign. Note that campaign victory is completely seperate from mission victory, so this setting must be set seperately. ||
+|| `MissionXWon` || Boolean || E.g. `Mission1Won`, `Mission2Won`, etc. If `true`, the mission with the number `X` in `campaign.ini` has been completed. ||
+|| `Won` || Boolean || If `true`, the team has completed the campaign. Note that campaign victory is completely separate from mission victory, so this setting must be set seperately. ||
 
 By default, the first mission (Mission 1 in `campaign.ini`) is available.
 
@@ -422,4 +422,21 @@
 Progress=2
 MyCustomVariable=54
 MyCustomString=Hedgewars
-}}}
\ No newline at end of file
+}}}
+
+=== {{{[Mission%20<MISSION_NAME>]}}} ===
+This section stores mission variables. Mission variables are very similar to campaign variables, but they are for single missions (training/challenge/scenario) that are not part of a campaign. Replace “`<MISSION_NAME>` with the file name of the mission.
+
+Like campaign variables, mission variables are stored on a key-value basis. You can choose custom names but there are also a few special key names with a special meaning.
+
+`Won` is to mark victory and it's often useful to be used together with `onGameResult`. The other special keys are to store challenge records. Use these only when they make sense.
+
+|| *Setting* || *Type* || *Description* ||
+|| `Won` || Boolean || If `true`, the team has completed the mission. ||
+|| `Highscore` || Integer || Best score in this mission, where higher = better ||
+|| `Lowscore` || Integer || Best score in this mission, where lower = better ||
+|| `TimeRecord` || Integer || Best time in this mission, where faster = better ||
+|| `TimeRecordHigh` || Integer || Best time in this mission, where longer = better ||
+|| `AccuracyRecord` || Integer || Highest accuracy in this mission in percent ||
+
+By default, the first mission (Mission 1 in `campaign.ini`) is available.