Campaign progression and carry-over
Runs the sequence from a campaign mission being won to the next one starting, and carries the global flags, spare money, mission timer, difficulty and stage across the boundary.
Winning a campaign mission does not return the player to the menus. The game plays out the mission’s endings, decides where the campaign goes, tears the scenario down and loads the next one, all without leaving the running session — and five pieces of state are carried across that boundary by hand, because nothing else survives it. This page owns the sequence and the carried state. What each setting does on its own belongs to that setting’s page.
None of this applies to a multiplayer or skirmish session, which stops at its own score screen and shuts the game down.
Campaigns and stages
Section titled “Campaigns and stages”A campaign is one entry in the [Battles] list of battle.ini, and it supplies three things the progression needs: the Scenario it begins at, the CD its files are expected on, and the FinalMovie it closes with.
Where a campaign goes after its first mission is not in battle.ini at all. It is in MAPSEL.INI — MAPSEL<nn>.INI for an expansion — which carries one section per HouseType listing that house’s stages in order under the numeric keys 1 upward. Each stage is a section of its own, naming the scenario it stands for and, under numeric keys of its own, the stages it may lead to. A mission does not remember a filename; it remembers its stage, which is a position in that per-house list.
Two consequences run through everything below. Advancing means moving to a stage the current one offers, so a mission can only ever lead somewhere its house’s list already reaches. And the list is chosen by the mission’s Player=, so which progression a mission sits in follows from the house it is played as.
The win sequence
Section titled “The win sequence”A house is not won or lost the instant a trigger says so. The house is flagged, and the flag is acted on only once the borrowed time SavourDelay sets has run out, which is what leaves the player a few moments to watch the last building fall. A win here waits on one condition it does not wait on in a skirmish or multiplayer session: the house’s allow-win blockage count has to have reached zero. The flag simply stands until it does.
Once the flag is acted on, the steps below run in this order, and the whole of it happens inside the running session.
- The mission’s
Winmovie plays. - The score screen is presented, unless the mission sets
SkipScore=yes. - The
PostScoremovie plays, then thePreMapSelectmovie. OneTimeOnly=yesstops here and returns to the menus.EndOfGame=yesplays the campaign’sFinalMovie, rolls the credits and returns to the menus.- The next mission is chosen — from the map selection screen, or without it when the mission sets
SkipMapSelect=yes. - The carry-over state is taken from the mission that has just been won.
- The campaign level number is incremented.
- The next scenario is loaded, playing its
Intro,BriefandActionmovies and starting itsTheme. - The carry-over state is applied to the mission now loaded.
Steps 7 and 10 sit either side of the load for a reason. The state is read out of the outgoing mission but the terms on which it is handed over — the share of money, the ceiling on it and whether the timer is inherited — are read out of the incoming one, because by step 10 the new scenario file has already been read. A mission reachable by two different routes therefore carries the same share over from either.
What survives the boundary
Section titled “What survives the boundary”Five things are copied out of the won mission and put back into the next one. Everything else about the outgoing scenario is discarded with it. The table gives what each one is taken from and what it is put back into; the column to read is the second, because two of the five are not restored to where they came from.
| Carried | Taken from the won mission | Put into the next mission |
|---|---|---|
| The 50 global flags | Their values as the mission ended | Set one at a time, before the first logic frame runs |
| Spare money | The player’s available credits | Granted as credits, and added to the house’s recorded starting credits |
| The mission timer | Its remaining count | Restored and restarted, and only where TimerInherit=yes and the count is above zero |
| Difficulty | The player’s own difficulty slot | Re-applied to the player’s house after the money |
| The stage | The stage the advance settled on | Written back over the stage the new scenario reset to zero |
The global flags are the ones a mission sets and clears with Set global, and the ones Global is set watches. Their names come from the rules rather than from any one mission, so flag 7 means the same thing in every mission of a campaign. Local variables are not carried and have no equivalent here.
The block is emptied only when a fresh campaign or a fresh single scenario is started from the main menu. It is written into and read back out of save games, so loading a save resumes with whatever the block held at the moment it was written.
CarryOverMoney is a fraction of what the player still held when the previous mission was won, clamped to 1 as it is read so that a mission can never hand over more than the player finished with. The product is then compared against CarryOverCap and the smaller of the two is granted, unless the cap is exactly -1, which is the one value that means no ceiling. Carrying money forward therefore takes both settings, because the cap left out is a ceiling of zero.
The grant is not consumed. The block still holds the previous mission’s ending balance afterwards, and every path that applies it does so afresh, so a mission replayed after a loss and a mission restarted from the menu are each granted the same money again. The same is true of the inherited timer and the difficulty re-application.
Choosing the next mission
Section titled “Choosing the next mission”With SkipMapSelect left at its default, winning opens the map selection screen and the player picks one of the stages the current one offers. Cancelling without picking leaves the mission name where it was, so the same mission loads again.
With SkipMapSelect=yes the mission names its own successor. NextScenario is taken, or AltNextScenario when the second global flag is set. Either way the name is not loaded directly: the advance clears the current mission name, then compares the name given against the scenario of each stage the current stage offers, ignoring case, and takes the first match.
Whichever route chose it, the settled stage’s own scenario name is uppercased and opened as a file path directly. A name whose file cannot be opened at all shows the game’s own message and abandons the load with the mission just won still in memory, because the teardown does not begin until the file has been read. A file that opens and then fails later — a mission demanding an expansion that is not installed, or one whose side or speech archives will not mount — is abandoned after the teardown, and the win sequence goes on to grant the carry-over money through a player house the teardown has already cleared. Neither outcome is guarded: the sequence never asks whether the load succeeded.
Losing and restarting
Section titled “Losing and restarting”Losing plays the mission’s Lose movie and offers a replay. Accepting it, and choosing to restart from the menu during a mission, both reload the current mission and then apply the carry-over block to it, exactly as a win does. Neither plays the briefing again: the Intro, Brief and Action movies are shown only on the load that follows a win.
Abandoning the mission instead sets the campaign level number back to 1 and returns to the menus.
The campaign level number
Section titled “The campaign level number”The number counts missions started in the current campaign, beginning at 1, and it is not part of any scenario file. Three things read it. The animated introduction plays only while the number is still 1, and only for a campaign whose CD= is below 2. A house section that omits TechLevel= is given this number instead, so tech level tracks campaign progress by default. And a score whose Scenario= is above the current number is refused by the music rotation, which is how a campaign’s later music is held back.
Related settings
24 of 24
| Key | Description | Value | When omitted |
|---|---|---|---|
NextScenarioscenarios | The mission the campaign advances to when this one skips the map selection screen. | string | Unchanged |
AltNextScenarioscenarios | The mission the campaign advances to instead, when the second global flag is set. | string | Unchanged |
SkipMapSelectscenarios | Whether the campaign advances straight to a named mission instead of offering the map screen. | boolean | no |
PreMapSelectscenarios | The movie played on the way from a won campaign mission to the next map choice. | movie | <none> |
OneTimeOnlyscenarios | Whether winning this mission ends the session instead of advancing the campaign. | boolean | no |
EndOfGamescenarios | Whether winning this mission closes the campaign with its ending movie and credits. | boolean | no |
CarryOverMoneyscenarios | The share of the previous mission's leftover money the player begins this one with. | floating point | 0 |
CarryOverCapscenarios | The ceiling placed on the money carried into this mission from the previous one. | integer | 0 |
TimerInheritscenarios | Whether this mission resumes the countdown timer the previous one finished with. | boolean | no |
SkipScorescenarios | Whether a won campaign mission passes over the score screen. | boolean | no |
PostScorescenarios | The movie played after the score screen of a won campaign mission. | movie | <none> |
Introscenarios | The movie played first when a campaign mission is started with its briefing. | movie | <none> |
Briefscenarios | The mission briefing movie, replayable from the objectives screen. | movie | <none> |
ActionSuperWeaponType, scenarios | A superweapon's targeting cursor and firing path, or on a scenario the movie played as the mission begins. | actiontype | Varies by type |
Winscenarios | The movie played when a campaign mission is won. | movie | <none> |
Losescenarios | The movie played when a campaign mission is lost. | movie | <none> |
FinalMovieCampaign | The movie that plays once a campaign's closing mission is won. | movie | none |
Themescenarios | The score a mission opens with, queued at the point where its action movie plays. | themetype | No theme |
Playerscenarios | The house a campaign mission is played as, and the side its presentation is prepared for. | HouseType | Varies by type |
SpeechSidescenarios | The side whose voice set narrates a campaign mission. | Side | Context-dependent |
ScenarioCampaign, Themes | The mission a campaign opens with, or the mission number from which a musical score may be picked. | string | Varies by type |
CDCampaign | The disc number a campaign carries, read for its opening cinematic and loading backdrop. | integer | -1 |
SavourDelayglobal rules | Delay, in minutes, between a house's fate being decided and it being carried out. | floating point | .03 |
TechLevelNo effect in some scopes7 applicable types | The level an object type demands, the level a house is given, or the level a non-campaign session hands every house. | integer | Varies by type |
No keys match the current filters.