163 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. |
163 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. |
164 |
164 |
165 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: |
165 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: |
166 |
166 |
167 || *Setting* || *Type* || *Description* || |
167 || *Setting* || *Type* || *Description* || |
168 || `Progress` || Integer || If present, this number of missions is unlocked in the menu, starting with the first mission and continuing with the following missions in their regular order (as specified in `campaign.ini`). || |
168 || `Progress` || Integer || If present, this number of missions additional to the first missions are unlocked in the menu, starting with the first 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. || |
169 || `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. || |
169 || `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. || |
170 || `Mission1` || Integer || The `campaign.ini` ID of the first unlocked mission, must be used together with `UnlockedMissions` || |
170 || `Mission1` || Integer || The `campaign.ini` ID of the first unlocked mission, must be used together with `UnlockedMissions` || |
171 || `Mission2` || Integer || ID of the second unlocked mission (continues with `Mission3`, `Mission4`, and so on) || |
171 || `Mission2` || Integer || ID of the second unlocked mission (continues with `Mission3`, `Mission4`, and so on) || |
172 |
172 |
|
173 If neither `Progress` nor `UnlockedMissions` are present, only the first mission is unlocked. |
|
174 |
173 === Examples === |
175 === Examples === |
174 Simple campaign with 10 missions, missions 1-4 are available: |
176 Simple campaign with 10 missions, missions 1-5 are available: |
175 |
177 |
176 {{{ |
178 {{{ |
177 [Campaign%20Simple_Campaign] |
179 [Campaign%20Simple_Campaign] |
178 Progress=4 |
180 Progress=4 |
179 }}} |
181 }}} |