--- a/ConfigurationFiles.wiki Sun Nov 20 00:51:48 2016 +0000
+++ b/ConfigurationFiles.wiki Sun Nov 20 01:26:26 2016 +0000
@@ -352,24 +352,40 @@
Campaign variables are stored on a key-value basis, where the key is the name of the campaign variable and the value is the value of the campaign variable.
-Campaign variable names and their values can are chosen by the Lua script authors, but there are some special variables which are used to determine which missions are available in the main menu:
+Campaign variable names and their values can are chosen by the Lua script authors, but there are some special variables which are used to determine which missions are available in the main menu, and since 0.9.23, also to determine which missions and campaigns have been completed.
+
+For linear campaigns, the variables `Progress` and `Won` are used.
+For non-linear campaigns, the variables `UnlockedMissions`, `MissionX`, `MissionXWon` and `Won` are used.
+The variables should not be mixed up.
+
+Since Hedgewars 0.9.23, completed missions and campaigns get a check mark in the campaign screen.
|| *Setting* || *Type* || *Description* ||
-|| `Progress` || Integer || 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 || An alternative way to store the unlocked missions in the main menu if the missions aren't unlocked in the regular order. 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. ||
-|| `Mission1` || Integer || The `campaign.ini` ID of the first unlocked mission, must be used together with `UnlockedMissions` ||
-|| `Mission2` || Integer || ID of the second unlocked mission (continues with `Mission3`, `Mission4`, and so on) ||
+|| `Progress` || Integer || Since version 0.9.23, this variable stands for the number of completed missions in a campaign. 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. ||
-If neither `Progress` nor `UnlockedMissions` are present, only the first mission is unlocked.
+By default, the first mission (Mission 1 in `campaign.ini`) is available.
==== Examples ====
-Simple campaign with 10 missions, missions 1-5 are available:
+Simple campaign with 10 missions, missions 1-5 are available and missions 1-4 count as completed:
{{{
[Campaign%20Simple_Campaign]
Progress=4
}}}
+Simple 0.9.23 campaign with 6 missions. This campaign and all its missions have been unlocked and completed:
+
+{{{
+[Campaign%20Simple_Campaign_2]
+Progress=6
+Won=true
+}}}
+
+
Complex campaign with 13 missions, missions 2, 7 and 3 are available (in that order):
{{{
[Campaign%20Complex_Campaign]