Source-first reverse engineering of a mainline Battle for Wesnoth campaign
Jevyan Invasion Opening
An architecture study of espionage, physical artifact concealment, temporary and cross-scenario unit storage, proportional reinforcement triggers, mid-battle fog, and the defense of the returning fleet.
16 The Ka’lian final council
│
▼
18 A Spy in the Woods
└── Jessene learns the elves may betray the refugees
│
▼
19 The Vanguard
├── Ruby attack removed from Haldric
├── Jessene stores the artifact in the Troll Hole
├── jessica_store preserves Jessene off-map
└── vanguard defeated before it reaches the coast
│
▼
20 Return of the Fleet
├── Jevyan detects that the Ruby is concealed
├── fog curse changes battlefield visibility
├── Jessene returns on turn 7
└── returning fleet is secured
│
▼
21 The Plan
Three forms of intelligence
Scenario
Information gathered
Method
18
The elves intend to let both invaders and refugees bleed.
Jessene duplicates herself into a temporary “in hiding” role and eavesdrops.
19
Jevyan is following the Ruby and the orcs came from the Green Isle.
Jessene reports; Aethyr identifies the enemy fleet source.
20
Jevyan can tell the Ruby has been concealed but not where.
Scripted antagonist inspection on turn 5.
Artifact concealment as mechanics
12 A Final Spring
└── Haldric gains object_id = ruby_of_fire
19 The Vanguard
├── [remove_object] deletes ruby_of_fire from Haldric
├── Jessene leaves with the artifact
└── Lady Jessene stored in jessica_store
20 Return of the Fleet
├── Jevyan observes that the magical signal is concealed
└── Jessene returns, but Haldric's Ruby attack is not restored here
Engineering lesson. The story does not merely claim the Ruby is elsewhere. The unit carrying its attack stops having that attack.
Cross-scenario unit-state patterns
Pattern
Scenario 18
Scenarios 19–20
Storage mode
kill=no
kill=yes
Purpose
Create a temporary duplicate for staging.
Remove the canonical unit and restore it later.
Identity
Copy renamed Jessene in Hiding.
Canonical Lady Jessene preserved.
Lifetime
One cutscene.
Across a complete battle and into the next scenario.
Cleanup
Temporary copy killed and variable cleared.
Unit unstored and variable cleared on turn 7.
Escalation architecture
Scenario
Escalation trigger
Effect
19
An enemy front falls below half its peak size.
One of three increasingly strong undead waves appears next turn.
20
Turn 5.
Jevyan adds Chocobones and imposes fog.
20
Player explores two distant regions.
Cuttle Fish and Saurian revenge forces enter.
19–20
One paired orc chief dies.
The surviving orc side receives extra gold.
Fair dynamic-spawn comparison
System
Placement rule
Fairness mechanism
Scenario 14 Sea Serpents
Exactly 10 hexes from a player unit in deep ocean
Relevant but not immediately adjacent
Scenario 19 undead backups
Exactly 12 hexes from the player and near the weakened side’s keep
Front-specific, path-connected, and outside ordinary one-turn reach
Scenario 20 encounters
Fixed peripheral regions reached by exploration
Player movement explicitly activates the danger
Production and reuse
Scenario
Fresh campaign work
Core/shared reuse
18
Dialogue and temporary-unit staging
Ka’lian map, council units, forest art, cutscene framework
19
Map and complex adaptive reinforcement logic
Orc/Troll/undead units, chest art, music, fog and location filters