Identity

WML ID06_Temple_in_the_Deep
Next scenario07_Return_to_Oldwood
Map06_Temple_in_the_Deep.map, 27 × 27 hexes
Turns37 / 34 / 31
ScheduleUnderground
Automatic enemy victoryDisabled
ArchetypeDungeon quest / two-part victory gate
Story importanceCritical
WML complexityHigh
AI customizationSimple but maximally aggressive
Key artifactRuby of Fire

Story & dialogue

A single story panel follows Haldric into the catacombs beneath the forest temple. Lich-Lord Lenvan interprets the opening of the seal as his release and immediately raises his forces. Burin welcomes being underground again, while Haldric frames the task as giving the monsters their final rest.

The scenario’s story is carried primarily by mechanics rather than long conversation: the sealed enemy, the buried chest, the central pools and tentacles, the raising of dead allies, and the requirement that Haldric personally retrieve the Ruby all communicate the dungeon’s danger and artifact importance.

Story beatImplementation
Descent into the roots of the worldOne campaign-specific story image
Lenvan’s releasestart dialogue and aggressive undead side
Unnatural poolsTentacle sighting event
Ruby discoveryHaldric-only chest interaction with sound and narration
Necromantic threatFallen side-1 units are raised as hostile corpses while Lenvan lives

Map description

The compact 27 × 27 underground map places Lenvan’s keep near the upper center and Haldric’s keep near the lower center. Narrow cave passages, impassable cave walls, underground villages, rough cave ground, water, chasms, bridges, fungus, and a broad central pool produce a vertically oriented push toward the chest at hex 13,1.

Map elementDesign role
Opposed top and bottom keepsCreates a direct dungeon ascent toward the lich and artifact.
Central water complexHouses the Tentacles of the Deep and interrupts the main route.
ShroudMakes the dungeon reveal itself incrementally.
Chest flanked by dragon statuesVisually marks the Ruby objective at the map’s far end.
Holy-water pickup at 13,19Supplies a core anti-undead tool near the player’s half of the map.

Objectives and victory logic

TypeCondition
Victory requirement 1Defeat Lich-Lord Lenvan.
Victory requirement 2Retrieve the Fire Ruby with Prince Haldric.
DefeatDeath of Prince Haldric; turns expire.

victory_when_enemies_defeated=no prevents the engine from ending the scenario when Lenvan dies. Victory can occur in either order:

Lenvan dies first └── scenario continues until Haldric opens chest └── victory Haldric opens chest first └── Have_Ruby = yes └── Lenvan's later last-breath event ends scenario
Quest-design lesson. A compound objective is implemented as two independent completion events joined by one temporary state flag.

Sides and AI

SideLeader / rosterGold and incomeAI
1 — RefugeesHaldric; Burin and Minister Edren recalled160 / 140 / 120Human controlled; shroud enabled
2 — UndeadLich-Lord Lenvan; Revenant, Deathblade, Bone Shooter, Skeleton, Skeleton Archer240 / 300 / 360; income 6 / 10 / 14Aggression 1.0, NO_SCOUTS, fighter/archer pattern

The enemy AI is deliberately uncomplicated. Scenario identity comes from map structure, fixed tentacles, shroud, objective gating, and death events rather than a custom controller.

Difficulty scaling

ElementEasyNormalHard
Turns373431
Player gold160140120
Lenvan gold240300360
Lenvan income61014
Fixed Tentacles of the Deep468
Raised former alliesWalking CorpseWalking CorpseSoulless

Special events

TriggerBehavior
prestartPlaces difficulty-scaled tentacles, chest, dragon statues, and holy water; recalls Burin and Edren; installs compound objectives.
startLenvan celebrates his freedom and the party commits to destroying him.
First sighting of a TentacleThe discovering unit comments on the pool.
Move to chest with non-Haldric unitPlays a defensive animation, asks for somebody else, and permits undo.
Move to chest with HaldricSets Have_Ruby=yes, plays open-chest.wav, narrates the Ruby, and checks whether Lenvan is already dead.
Move to chest after Ruby obtainedReports that Haldric already has it and permits undo.
Lenvan last breathEnds the scenario only if Have_Ruby=yes.
Side-1 unit dies while Lenvan livesHaldric comments once; repeatable event raises a hostile “Former Friend” when the killer lacks its own plague result.
victoryConfirms both tasks and clears the temporary Have_Ruby flag.

Campaign utility: RISE_UP_RISE_UP

The macro is defined in utils/trow-macros.cfg. At the fallen unit’s coordinates, it creates a loyal side-2 unit named “A Former Friend,” preserves the dead unit’s undead variation, disables its remaining moves and attacks for the current turn, and animates its arrival. The created type is Walking Corpse on Easy and Normal, and Soulless on Hard.

#define RISE_UP_RISE_UP
    [unit]
        name= _ "A Former Friend"
        type={ON_DIFFICULTY "Walking Corpse" "Walking Corpse" "Soulless"}
        side=2
        x=$x1
        y=$y1
        moves=0
        attacks_left=0
        variation=$unit.undead_variation
        animate=yes
        ...
    [/unit]
#enddef
Why use an event instead of the normal plague special? The scenario wants Lenvan’s continuing presence to be the cause, wants a difficulty-dependent result, and wants the newly raised unit to inherit an appropriate visual variation.

Core utility reuse: holy water

OBJ_POTION_HOLY_ALT 13 19 (holy_helper) comes from the core item macros. It places a one-use holy-water pickup which can be taken by a side-1 unit with a non-arcane melee attack. For the current scenario, the macro appends the arcane weapon special to that unit’s melee attacks.

Provided by coreCampaign contribution
Pickup logic, eligibility filters, take/leave menu, sound, item removal, temporary object, attack effectCoordinates and a unique item ID

Artifact-state design

Have_Ruby is cleared at victory even though the Ruby remains in the story. That is intentional state minimization:

NeedState solution
Track whether both objectives are complete inside Scenario 06Temporary boolean Have_Ruby
Track possession after Scenario 06No variable required; every valid exit from the scenario guarantees the Ruby was taken.
Authoring principle. Do not persist a flag merely because an event matters narratively. Persist it only when later code must distinguish multiple possible states.

Assets and units

ResourceOriginUse
story/trow_story_06-Temple_in_the_Deep.webpCampaignCatacomb descent story panel
Haldric portrait variantsCampaignCombat and discovery dialogue
Chest, dragon statues, holy-water image, Wesnoth iconCore/sharedQuest and pickup presentation
knalgan_theme.ogg, underground.ogg, open-chest.wav, holy-water sound listCore/sharedMusic and interaction audio
Lich, skeleton line, Tentacle of the Deep, Walking Corpse, SoullessCoreEntire dungeon enemy set

Scenario WML · Map source · Campaign macro source · Core item macros

Lessons for campaign authors

PatternReuse lesson
Two objectives completable in either orderDisable automatic victory and let each event check the other condition.
Protagonist-only artifact pickupUse a unit filter, a clear feedback animation, and allow_undo for invalid visitors.
Temporary story-state flagClear it after the scenario when later code cannot encounter an alternative state.
Reanimate fallen allies through a utility macroCentralize repeated unit creation and preserve visual variations.
Use core item macrosA complete interactive pickup may require only coordinates and an ID.