# E7.M4 — ContractMissionGenerator ## Summary | Field | Value | |--------|--------| | **Module ID** | E7.M4 | | **Epic** | [Epic 7 — Quest / Faction](../epics/epic_07_quest_faction.md) | | **Stage target** | Pre-production | | **Status** | In Progress — Slice 4 backlog [E7M4-pre-production-backlog.md](../../plans/E7M4-pre-production-backlog.md): **E7M4-01** [NEO-144](https://linear.app/neon-sprawl/issue/NEO-144) → **E7M4-11** [NEO-154](https://linear.app/neon-sprawl/issue/NEO-154). Upstream: E5.M3 **Ready**, E7.M3 **Ready**; E4.M1 zone graph deferred (content-only `zoneDifficultyBand` in Slice 4 v1). | ## Purpose Semi-procedural repeatable contracts from templates, keyed by zone difficulty ([E4.M1](E4_M1_ZoneGraphAndTravelRules.md)), encounter templates ([E5.M3](E5_M3_EncounterAndRewardTables.md)), and faction state ([E7.M3](E7_M3_FactionReputationLedger.md)). ## Responsibilities - Emit validated `ContractTemplate` instances from `ContractSeed`; record `ContractOutcome`. ## Key contracts | Contract | Role | |----------|------| | `ContractTemplate` | Parameterized mission skeleton. | | `ContractSeed` | RNG or daily seed inputs. | | `ContractOutcome` | Completion and reward linkage. | ## Module dependencies - **E4.M1** — ZoneGraphAndTravelRules (live zone read deferred; content band in Slice 4 v1). - **E5.M3** — EncounterAndRewardTables. - **E7.M3** — FactionReputationLedger. ## Dependents (by design) - Live ops and content pipelines; validate against economy/parity rules per epic. ## Related implementation slices Epic 7 **Slice 4** — `contract_issued`, `contract_complete`, reward anomalies. Backlog: [E7M4-pre-production-backlog.md](../../plans/E7M4-pre-production-backlog.md). ## Prototype Slice 4 freeze (E7M4-01) **One** frozen template; objective **`encounter_clear`** on **`prototype_combat_pocket`**; repeat payout via **`completionRewardBundle`** (separate idempotency from quest + first-time encounter loot). | `ContractTemplate.id` | `zoneDifficultyBand` | `encounterTemplateId` | `minFactionStanding` | `completionRewardBundle` | |-----------------------|----------------------|------------------------|----------------------|---------------------------| | **`prototype_contract_clear_combat_pocket`** | **1** | **`prototype_combat_pocket`** | **`prototype_faction_grid_operators`** **0** | **`scrap_metal_bulk` ×5**; **`salvage`** **15** (`mission_reward`) | **Band policy (E7M4-07):** band **1** caps — max **10** per item grant, **25** skill XP per grant, **10** rep per grant. **Idempotency:** `{playerId}:contract_complete:{contractInstanceId}`. **Active cap:** one active contract per player (prototype). ## Source anchors - Master plan: [`neon_sprawl_vision.plan.md`](../../../neon_sprawl_vision.plan.md) — Epic 7. - [Module dependency register](module_dependency_register.md)