neon-sprawl/docs/decomposition/modules/E3_M2_RefinementAndRecipeEx...

3.3 KiB
Raw Blame History

E3.M2 — RefinementAndRecipeExecution

Summary

Field Value
Module ID E3.M2
Epic Epic 3 — Crafting Economy
Stage target Prototype
Status Planned (see dependency register)

Implementation snapshot

Prep (NEO-42): Server ships RefineActivitySkillXpGrant.GrantOnSuccessfulCraftOrRefine + RefineSkillXpConstants under server/NeonSprawl.Server/Game/Skills/ — delegates to SkillProgressionGrantOperations.TryApplyGrant with refine + activity (prototype 10 XP), same persistence and allowedXpSourceKinds rules as POST …/skill-progression. No CraftRequest / CraftResult route yet; when this module adds authoritative craft/refine success, call that helper once on success (NEO-42 implementation plan; server README — Craft / refine hook (NEO-42)).

Purpose

Implements the processing and crafting pipeline: raw-to-refined flows and recipe execution with server-authoritative inventory mutations. Bridges gathered materials (E3.M1) and item definitions (E3.M3) 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. 812 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

Dependents (by design)

  • E7.M1QuestStateMachine: quest steps may require crafted items or craft completion.
  • E6.M4RewardParityEnforcer: PvP ↔ PvE/crafting equivalents involving craft outputs.
  • Epic 2 integration — Callers award crafting XP via E2.M2 at activity sites.

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