54 lines
2.5 KiB
Markdown
54 lines
2.5 KiB
Markdown
# E3.M2 — RefinementAndRecipeExecution
|
||
|
||
## Summary
|
||
|
||
| Field | Value |
|
||
|--------|--------|
|
||
| **Module ID** | E3.M2 |
|
||
| **Epic** | [Epic 3 — Crafting Economy](../epics/epic_03_crafting_economy.md) |
|
||
| **Stage target** | Prototype |
|
||
| **Status** | Planned (see [dependency register](module_dependency_register.md)) |
|
||
|
||
## Purpose
|
||
|
||
Implements the processing and crafting pipeline: raw-to-refined flows and recipe execution with server-authoritative inventory mutations. Bridges gathered materials ([E3.M1](E3_M1_ResourceNodeAndGatherLoop.md)) and item definitions ([E3.M3](E3_M3_ItemizationAndInventorySchema.md)) into usable outputs for combat, quests, and economy loops.
|
||
|
||
## Responsibilities
|
||
|
||
- Validate `CraftRequest` against `RecipeDef`, costs, and player inventory state.
|
||
- Produce `CraftResult` (success/failure, outputs, failures with reason codes).
|
||
- Support prototype recipe set (e.g. 8–12 starter recipes per epic slice minimums).
|
||
|
||
## Key contracts
|
||
|
||
| Contract | Role |
|
||
|----------|------|
|
||
| `RecipeDef` | Inputs, outputs, skill gates, station requirements (as scoped for prototype). |
|
||
| `CraftRequest` | Actor, recipe, quantities, optional targeting for UI/server sync. |
|
||
| `CraftResult` | Deterministic outcome for inventory and telemetry. |
|
||
|
||
## Module dependencies
|
||
|
||
- **E3.M1** — [ResourceNodeAndGatherLoop](E3_M1_ResourceNodeAndGatherLoop.md): refined materials from gather outputs into crafting inputs.
|
||
- **E3.M3** — [ItemizationAndInventorySchema](E3_M3_ItemizationAndInventorySchema.md): `ItemDef`, `ItemInstance`, inventory slots for costs and outputs.
|
||
|
||
## Dependents (by design)
|
||
|
||
- **E7.M1** — [QuestStateMachine](E7_M1_QuestStateMachine.md): quest steps may require crafted items or craft completion.
|
||
- **E6.M4** — [RewardParityEnforcer](E6_M4_RewardParityEnforcer.md): PvP ↔ PvE/crafting equivalents involving craft outputs.
|
||
- **Epic 2 integration** — Callers award crafting XP via [E2.M2](E2_M2_XpAwardAndLevelEngine.md) at activity sites.
|
||
|
||
## Related implementation slices
|
||
|
||
See Epic 3 **Slice 3 — Recipes and crafting pipeline**: gather → refine → item used in combat or quest; telemetry `item_crafted`, `craft_failed`, time-to-first-craft.
|
||
|
||
## Risks and telemetry
|
||
|
||
- Duplication or negative stacks: server-authoritative craft and inventory; integrity signals via E9.M4 when live.
|
||
- Quest/economy parity: lint reward bundles against E6.M4 and E3.M5 policies in later phases.
|
||
|
||
## Source anchors
|
||
|
||
- Master plan: [`neon_sprawl_vision.plan.md`](../../../neon_sprawl_vision.plan.md) — Core Epic Map, Epic 3.
|
||
- [Module dependency register](module_dependency_register.md)
|