neon-sprawl/docs/decomposition/epics/epic_07_quest_faction.md

3.9 KiB

Epic 7 - Questing, Narrative, and Faction Reputation

Source Anchors

  • Master epic reference: neon_sprawl_vision.plan.md — Core Epic Map, System Modules Epic 7
  • Related modules: E7.M1, E7.M2, E7.M3, E7.M4

Ownership and success (Level 1)

  • Ownership focus: Narrative Design + Quest Design + Tools
  • Success criteria: Quest content provides clear progression direction, worldbuilding depth, and durable midgame engagement.

Objective

Provide a quest state machine and reward routing that ties gathering, crafting, and combat into guided and repeatable content, plus faction reputation and contract generation for midgame durability.

Module Breakdown

E7.M1 - QuestStateMachine

  • Responsibility: Quest start/step/complete state transitions and persistence.
  • Key contracts: QuestDef, QuestStepState, QuestStateTransition
  • Dependencies: E3.M2, E5.M1
  • Stage target: Prototype

E7.M2 - RewardAndUnlockRouter

  • Responsibility: Route quest outputs to XP, items, unlocks, and reputation.
  • Key contracts: QuestRewardBundle, UnlockGrant, RewardDeliveryEvent
  • Dependencies: E2.M2, E3.M3, E7.M1
  • Stage target: Prototype

E7.M3 - FactionReputationLedger

  • Responsibility: Track faction standing and gate faction-specific contracts/content.
  • Key contracts: FactionStanding, ReputationDelta, FactionGateRule
  • Dependencies: E7.M1
  • Stage target: Pre-production

E7.M4 - ContractMissionGenerator

  • Responsibility: Semi-procedural repeatable contract generation with difficulty/reward bands.
  • Key contracts: ContractTemplate, ContractSeed, ContractOutcome
  • Dependencies: E4.M1, E5.M3, E7.M3
  • Stage target: Pre-production

Implementation Slices (Backlog-Ready)

Slice 1 - Quest core and persistence

  • Scope: E7.M1 supporting branching steps and failure/reset rules for prototype chain.
  • Dependencies: E3.M2, E5.M1 (gather/craft/encounter hooks on main)
  • Acceptance criteria:
    • 3-5 onboarding quests + one chain requiring gather/craft/combat complete without duped rewards.
  • Telemetry hooks: quest_start, quest_step_complete, quest_complete, funnel times.

Linear backlog: E7M1-prototype-backlog.mdNEO-112NEO-123; client capstone E7M1-12 NEO-123. Verify in Godot, not Bruno-only.

Slice 2 - Reward and unlock routing

  • Scope: E7.M2 delivering XP, items, blueprint unlocks, and flags for world gates.
  • Dependencies: E7.M1, E2.M2, E3.M3
  • Acceptance criteria:
    • Idempotent reward delivery; replays cannot double-claim.
  • Telemetry hooks: reward_delivery, unlock_granted.

Slice 3 - Faction ledger (pre-production)

  • Scope: E7.M3 gating at least one faction line and mission set.
  • Dependencies: E7.M1
  • Acceptance criteria:
    • Reputation deltas auditable; gates fail closed on tamper.
  • Telemetry hooks: reputation_delta, faction_gate_blocked.

Slice 4 - Contract generator (pre-production)

  • Scope: E7.M4 emitting repeatable contracts from templates by zone difficulty.
  • Dependencies: E4.M1, E5.M3, E7.M3
  • Acceptance criteria:
    • Generated contracts validate against economy and parity rules.
  • Telemetry hooks: contract_issued, contract_complete, reward anomalies.

Risks and Mitigations

  • Risk: Quest scripting becomes engineering-heavy for solo dev.
    • Mitigation: Data-first QuestDef schema; templates in decomposition tools path.
  • Risk: Rewards break parity or economy.
    • Mitigation: Lint bundles against E6.M4 and E3.M5 policies.

Definition of Done

  • Prototype quest counts and integrated chain meet master plan minimums in the Godot client (Slice 1 capstone NEO-123), not Bruno-only.
  • Pre-production adds faction + contracts with validation.