Campaign Journey And Progression Simulator
What This System Is
The Campaign Journey Simulator validates an evolving player across a complete authored content arc. It connects semantic scenario execution with deterministic encounter balance and carries the same lifetime experience, derived level, combat build, gold, inventory, unlocks, and gameplay facts between journey beats.
Scenario Sandbox answers whether a story or event state machine completes. Combat Balance Lab answers whether one encounter is mechanically viable for one build. Campaign Journey answers whether the character produced by earlier content remains viable and correctly rewarded by later content.
How Authors Use It
- Open Simulation & Debug in the viewport.
- Enter a registered
journey.*fixture id under Campaign journey. - Select Run Chapter Journey.
- Inspect step success, minimum encounter completion, and minimum survival bars.
- Scrub the journey timeline to see player level, XP, gold, rewards, and the result of each content beat.
- Select Record Journey Baseline after intentionally accepting the current pacing, then Save Journey Fixture.
- Use Run All Journeys for the registered regression suite.
Rules And Invariants
Journey runs must be deterministic, bounded, and explicit about repeated encounters. Economy checkpoints may purchase, craft, and equip upgrades only through authored vendor stocks, crafting recipes, inventory, gold, and compatibility rules.
Fixture Contract
Journey fixtures are versioned JSON assets under assets/gameplay/campaign_journey_fixtures. A fixture contains:
- a starting player with lifetime XP, gold, inventory, equipment identity/power, shared facts, and a combat build;
- ordered scenario and encounter steps;
- a stop-on-failure and maximum-execution policy;
- pacing assertions;
- an optional recorded baseline.
Encounter steps may declare a repeat count. Repeats are explicit and bounded so designers can represent intended grinding while assertions can reject excessive repetition. Economy checkpoints declare the vendor stocks and crafting recipes available at that point in the journey.
State Carry-Over
Lifetime experience is converted to level through the canonical ability-catalog progression curve before every step. Encounter XP, gold, and deterministic item rewards are applied before the next step. Scenario facts and inventory are projected back into the journey state, including quest flags, party tags, reputation, scene variables, unlocks, and runtime events.
The Combat Balance Lab now records deterministic item rewards per seed using the hydrated mob drop projections and shared loot normalization rules. Journey runs consume the batch-average reward counts alongside average XP and gold.
Scenario steps disable the Scenario Sandbox's nested combat gate because encounter steps run separately with the evolving journey build. Dependency validation and scenario assertions still gate the step.
Automatic Economy Policies
The journey policy can independently enable automatic vendor purchases, crafting, and equipment upgrades. It also selects an optional data-driven build strategy, defines a minimum gold reserve, and sets a per-checkpoint acquisition limit. At each economy checkpoint the runner:
- evaluates canonical authored availability conditions against current facts, inventory, and gold;
- rejects unaffordable, level-incompatible, class-incompatible, removed, and non-equipment outputs;
- ranks true upgrades by the selected strategy's stat/tag/passive weights, cost, and stable authored id, falling back to generic equipment power when no strategy is selected;
- purchases or crafts at most one selected upgrade per slot within the transaction limit;
- equips the best compatible inventory item and applies its stats, tags, passives, and tool identity to the continuing combat build.
Every purchase, craft, and equipment change is recorded in the step timeline with its source, item, strongest scoring contributions, inventory/gold delta, and equipment power before and after. A policy-off fixture can use the same checkpoint as an observation-only boundary.
Metrics And Assertions
Reports expose initial/final level, experience, gold, and equipment power; successful and failed beats; encounter and economy transaction counts; gold spent; total simulated duration; minimum completion/survival rates; final inventory; selected vendor/recipe ids; and per-encounter pacing rows.
Assertions can require:
- every step to complete;
- a minimum final level or gold balance;
- an inventory item count or unlock;
- a specific equipped item or minimum equipment power;
- a specific vendor-stock entry purchase or crafting recipe use;
- encounter completion inside an authored band;
- minimum encounter survival;
- a maximum number of encounter executions;
- no progression deadlocks or execution errors.
Baselines
A recorded baseline stores final level, lifetime XP, final gold, final equipment power, total simulated duration, and minimum encounter completion rate with a tolerance. Level, XP, gold, equipment power, and completion are regression floors. Duration is a regression ceiling.
Examples
journey.slime_infestation.chapter_1 begins with a level-two Dragoon using dragoon.burst, executes the Slime Infestation world-event scenario, and automatically selects a free Practice Halberd before running the road defense and infestation core encounters. Rewards advance the player from 100 to 320 lifetime XP and level two to level four. The final economy checkpoint spends 20 of the earned 50 gold and 12 of 18 slime gel to forge and equip the offensive Tempered Slime Halberd, ending with 30 gold, six gel, and equipment power 27. Switching the same fixture to dragoon.sustain selects the defensive Slimeguard Halberd instead. The exact vendor entry, recipe, equipment result, encounter performance, and event journal unlock are asserted.
Current Boundaries
Strategy profiles model authored build intent but currently optimize each equipment slot independently. Multi-slot set bonuses, randomized crafting quality, vendor depletion across multiple players, party composition, navigation, input mistakes, and animation timing remain later simulation or local-playtest concerns.
Validation And Debugging
cargo test -p aether-world-domain campaign_journey --lib
cargo test -p aether campaign_journey --lib