Campaign

Long-form campaign state — quests, settlements, party entities, inventory, and the simulation scaffolding that makes campaign persistence work.

What this uses

src/sim/entity.ts src/sim/world.ts src/sim/wound-aging.ts src/sim/sleep.ts src/sim/aging.ts src/sim/nutrition.ts src/sim/collective-activities.ts src/sim/disease.ts src/sim/tech.ts docs/integration-primer.md

Campaign state is managed by the host. Ananke provides the physics substrate: entity injury heals over downtime, sleep debt accumulates during long watches, nutrition depletes on the march. These outputs drive the strategic layer — a depleted, wounded party is a mechanically weaker party.

Campaign state — static preview

static preview
Aldric Vane fighter (knight)
active
Mira Dusk archer
active
Brother Oswin physician
injured
Torsten brawler
downed

Health bar represents 1 − average(shock_Q, fatigue_Q). Downed = shock_Q > CONSCIOUSNESS threshold.

Ashford Village current
settlement · safe zone
pop: 340 physician: yes supplies: good faction: Empire
Thornmere Forest
wilderness · hostile · 3h travel
hazards: extreme_cold visibility: poor (fog)
Crag Keep
dungeon · unknown · 6h travel
quest: Find the Seal discovered: yes
ItemQtyMass
arming sword21.6 kg
mail hauberk19.0 kg
leather jack24.0 kg
hardtack (7-day rations)411.2 kg
bandage roll80.4 kg
torch61.8 kg
rope (10 m)22.4 kg

Total carry: ~30.4 kg across 4 party members. entity.carry tracks per-entity load; exceeding maxCarryCapacity_kg imposes fatigue penalties.

● activeFind the Seal of Rath
Enter Crag Keep and recover the Seal. Faction: Empire. Reward: q(2.0) AU + garrison access.
● activeHeal Torsten
Torsten needs 5 days of physician care to recover from structural arm damage. Care level: physician at Ashford.
◌ pendingEscort grain caravan to Fort Durn
6-day journey. Supply sufficiency q(0.72). Faction: Merchant Guild.
✓ completeClear Thornmere wolves

Try this

  1. Each campaign day, call stepWoundAging(entity, 86400) for all party members to advance healing.
  2. Call stepSleep(entity, elapsedSeconds, isSleeping) to model sleep debt from long marches or watches.
  3. Use planCaravanRoute from collective-activities.ts to validate supply for multi-day journeys.
  4. See examples/games/narrative-campaign/ for a working campaign game built on Ananke.