Skip to content

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.

Features & systemsScenarios & AIMaps & scenarios

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.

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.INIMAPSEL<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.

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.

  1. The mission’s Win movie plays.
  2. The score screen is presented, unless the mission sets SkipScore=yes.
  3. The PostScore movie plays, then the PreMapSelect movie.
  4. OneTimeOnly=yes stops here and returns to the menus.
  5. EndOfGame=yes plays the campaign’s FinalMovie, rolls the credits and returns to the menus.
  6. The next mission is chosen — from the map selection screen, or without it when the mission sets SkipMapSelect=yes.
  7. The carry-over state is taken from the mission that has just been won.
  8. The campaign level number is incremented.
  9. The next scenario is loaded, playing its Intro, Brief and Action movies and starting its Theme.
  10. 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.

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.

CarriedTaken from the won missionPut into the next mission
The 50 global flagsTheir values as the mission endedSet one at a time, before the first logic frame runs
Spare moneyThe player’s available creditsGranted as credits, and added to the house’s recorded starting credits
The mission timerIts remaining countRestored and restarted, and only where TimerInherit=yes and the count is above zero
DifficultyThe player’s own difficulty slotRe-applied to the player’s house after the money
The stageThe stage the advance settled onWritten 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.

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 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 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.

24 of 24

KeyDescriptionValueWhen omitted
NextScenarioscenariosThe mission the campaign advances to when this one skips the map selection screen.stringUnchanged
AltNextScenarioscenariosThe mission the campaign advances to instead, when the second global flag is set.stringUnchanged
SkipMapSelectscenariosWhether the campaign advances straight to a named mission instead of offering the map screen.booleanno
PreMapSelectscenariosThe movie played on the way from a won campaign mission to the next map choice.movie<none>
OneTimeOnlyscenariosWhether winning this mission ends the session instead of advancing the campaign.booleanno
EndOfGamescenariosWhether winning this mission closes the campaign with its ending movie and credits.booleanno
CarryOverMoneyscenariosThe share of the previous mission's leftover money the player begins this one with.floating point0
CarryOverCapscenariosThe ceiling placed on the money carried into this mission from the previous one.integer0
TimerInheritscenariosWhether this mission resumes the countdown timer the previous one finished with.booleanno
SkipScorescenariosWhether a won campaign mission passes over the score screen.booleanno
PostScorescenariosThe movie played after the score screen of a won campaign mission.movie<none>
IntroscenariosThe movie played first when a campaign mission is started with its briefing.movie<none>
BriefscenariosThe mission briefing movie, replayable from the objectives screen.movie<none>
ActionSuperWeaponType, scenariosA superweapon's targeting cursor and firing path, or on a scenario the movie played as the mission begins.actiontypeVaries by type
WinscenariosThe movie played when a campaign mission is won.movie<none>
LosescenariosThe movie played when a campaign mission is lost.movie<none>
FinalMovieCampaignThe movie that plays once a campaign's closing mission is won.movienone
ThemescenariosThe score a mission opens with, queued at the point where its action movie plays.themetypeNo theme
PlayerscenariosThe house a campaign mission is played as, and the side its presentation is prepared for.HouseTypeVaries by type
SpeechSidescenariosThe side whose voice set narrates a campaign mission.SideContext-dependent
ScenarioCampaign, ThemesThe mission a campaign opens with, or the mission number from which a musical score may be picked.stringVaries by type
CDCampaignThe disc number a campaign carries, read for its opening cinematic and loading backdrop.integer-1
SavourDelayglobal rulesDelay, in minutes, between a house's fate being decided and it being carried out.floating point.03
TechLevelNo effect in some scopes7 applicable typesThe level an object type demands, the level a house is given, or the level a non-campaign session hands every house.integerVaries by type