Source-first reverse engineering of a mainline Battle for Wesnoth campaign
07 — Return to Oldwood
A one-turn cutscene that reuses the Oldwood map, consumes stored party state, reveals Lady Jessene, repairs divergent recruit access, and carries all gold forward.
This file is a full [scenario], but functionally it is a cutscene. It returns to the Oldwood map after Lenvan’s defeat, establishes the approaching winter and the refugees’ unsustainable numbers, restores Lady Outlaw from storage, resolves the earlier trust branch through different dialogue, reveals her true identity as Lady Jessene, and selects Clearwater Port as the next destination.
Using a scenario rather than a story panel gives the sequence access to unit placement, animation, stored-unit state, conditional dialogue, recruitment changes, map scenery, and full campaign carryover.
Map reuse and visual continuity
Scenario 07 reuses the exact 32 × 32 map from Scenario 05. It replaces the battle’s orc sides with two Woses and the Ancient Wose leader, assigns all villages to side 4, places four named Wose guardians, and uses a winter portrait for Elilmaldur-Rithrandil. Ruin imagery is recreated to preserve the established environment.
Reused element
Changed meaning
Oldwood map
From contested battlefield to temporary refugee camp and council chamber
Temple at 23,22
From sealed quest entrance to recently completed expedition site
Wose faction
From autonomous combat ally to hosts and advisors
Cold-weather portrait
Signals seasonal progress without constructing a new map
Sides and setup
Side
Unit
Role
1 — Refugees
Prince Haldric, zero starting gold
Player perspective; no combat objective
2 — Treefolk
Talodulborentan, Wose
Allied scene participant
3 — Treefolk
Gullatendronnorbum, Wose
Allied scene participant
4 — Treefolk
Elilmaldur-Rithrandil, Ancient Wose
Host and speaker; controls all starting villages
prestart recalls Burin, the route-specific knight, and Minister Edren if they exist. Lady Outlaw is handled separately because she is currently stored off-map.
Lady Outlaw restoration
The cutscene first stages an approach animation using the stored unit’s type, then updates the stored coordinates and visibility before unstoring it:
This preserves the unit’s advancement type and experience whether the player accepted her in Scenario 02 or rejected her and encountered her later through stored state.
Conditional reconciliation
Earlier state
Cutscene response
Mechanical repair
have_lady=1
Haldric suspected she might have fled; she returns as the party’s scout.
No recruit correction needed because outlaw recruitment was already granted.
have_lady=0
Haldric distrusts her and she proposes joining forces.
[allow_recruit] grants Footpad, Poacher, Thief, and Thug now.
Both branches converge before the identity reveal. This is a clean example of resolving an earlier choice without discarding its dialogue consequences.
Lady Outlaw → Lady Jessene transformation
The source does not merely rename the existing unit. It animates Lady Outlaw out, constructs Lady Jessene using preserved data, animates her in, then clears the stored object.
Preserved
Changed
Unit type from $lady_store.type
ID and display name become Lady Jessene
Experience
Variation becomes unmasked
Coordinates and facing
Portrait becomes portraits/jessica.webp
Female gender and side 1
Traits are normalized to loyal hero
Why reconstruct rather than rename? Reconstruction makes the visual variation, portrait, identity, and trait package explicit while retaining only the progression fields the authors intend to preserve.
Event outline
Trigger
Behavior
prestart
Restores Oldwood scenery, places Wose guardians, and recalls branch companions.
start
Runs the complete cutscene: Ruby report, refugee crisis, Lady Outlaw return, conditional trust dialogue, recruit correction, Jessene reveal, route decision, and farewell.
End of start event
Clears have_lady and ends in victory with 100% carryover, no carryover report, no linger mode, and no replay save.
State lifecycle
Scenario 02
├── accepted: have_lady = 1; active Lady Outlaw
└── rejected: have_lady = 0; stored future Lady state
Scenario 05
└── if active, store Lady Outlaw in lady_store and remove her for scouting
Scenario 07
├── unstore Lady Outlaw
├── branch-specific dialogue / recruit correction
├── reconstruct as Lady Jessene
├── clear lady_store
└── clear have_lady
After the reveal, the campaign no longer needs the old boolean. Future logic can address the permanent character directly by ID: Lady Jessene.
Carryover and cutscene settings
Setting
Purpose
turns=1
Provides a valid scenario frame without a gameplay phase.
theme=Cutscene_Minimal
Reduces normal gameplay UI.
victory_when_enemies_defeated=no
Prevents an immediate automatic ending with no hostile sides.
bonus=no
No early-finish reward for a scripted scene.
NEW_GOLD_CARRYOVER 100
Passes all existing campaign gold through unchanged.
Avoids gameplay-oriented interstitial screens and files.
Assets and units
Resource
Origin
Use
portraits/rithrandil-winter.webp
Campaign
Seasonal progression for the Ancient Wose
portraits/jessica.webp
Campaign
Lady Jessene identity reveal
Temple and castle-ruin scenery
Core/shared
Recreates the established map state
traveling_minstrels.ogg
Core/shared
Cutscene music
Wose and Ancient Wose
Core
Treefolk participants
Lady Jessene’s unit type
Dynamic reuse
Uses the stored Wesfolk progression type instead of a separate Jessene type
Lessons for campaign authors
Design interpretation. This cutscene is the payoff for state laid down five scenarios earlier. It proves that a non-combat scenario can do substantial engineering work: repair divergent recruit state, preserve advancement, reveal identity, clean obsolete variables, and redirect the plot.
Pattern
Reuse lesson
Reuse a battle map as a cutscene stage
Gain visual continuity and reduce map-production cost.
Unstore, transform, and reconstruct a unit
Preserve progression while changing canonical identity and art.
Repair mechanical convergence conditionally
Ensure both earlier choice paths reach a valid shared roster.
Clear obsolete decision flags after identity becomes explicit
Replace indirect state with stable character IDs.
Use cutscene-specific endlevel settings
Remove reports, linger screens, and replay artifacts that add no value.