systems-economy

Documents economy, crafting, market, and quest logic for the src/systems/ simulation domain.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/ttnhan18062000/rpg-based-simulation --skill systems-economy-ttnhan18062000
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: systems-economy
Source: https://github.com/ttnhan18062000/rpg-based-simulation/tree/main/.agents/skills/systems-economy
Command: npx skills add https://github.com/ttnhan18062000/rpg-based-simulation --skill systems-economy-ttnhan18062000

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Engineers working on the deterministic RPG engine lack a consolidated reference for the economy subsystem in src/systems/, which spans 25+ files and 32+ tickets with no prior skill coverage, making it easy to violate conservation laws or conflate similar formulas. ## Core Features & Use Cases - Atomic Conservation & Inventory Rules: Documents the atomic transfer invariant, 16-slot/50kg inventory limits, and home storage rules (32 slots, 200kg). - Market & Reputation Formulas: Provides the exact reputation discount formula (up to 20% at max reputation), the 50% static sell price, and the regional trauma surcharge, with warnings against conflating the two pricing paths. - Crafting, Quests & Guild Logic: Covers the blacksmith crafting flow, 3 quest types with 9 built-in templates, and Adventurer's Guild intel services. - Pipeline Phase Mapping: Maps economy operations to their fixed phases (8, 23, 25, 27) in the 39-phase AuthoritativeApplyPipeline. - Use Case: When modifying shop pricing in src/systems/economy_systems/, consult this skill to apply the correct reputation discount formula without breaking conservation-law compliance. ## Quick Start Ask the AI to explain how the reputation discount and shop pricing rules work in src/systems/ before modifying the market code.

Frequently Asked Questions about systems-economy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does the reputation discount formula work in the market system?

The reputation discount normalizes public reputation to [0,1] by clamping to [0,2] and dividing by 2, then grants up to 20% off. The final cost is floor(base_cost × (1 − discount)) with a minimum of 1, so purchases are never free.

How do resource nodes regenerate in the harvest system?

Resource nodes regenerate via the Resource Ecology Service every 200 ticks (ECOLOGY_INTERVAL). Each ecology tick adds regen_rate_per_tick charges up to max_charges, skipping nodes that are full, on cooldown, or have a non-positive regen rate.

What is the difference between quest model and quest system files?

The quest model (Quest dataclass, QuestType, templates) lives in src/core/quests.py, while the runtime system consuming it is src/systems/quest_system.py. They are separate files and should not be conflated when making changes.

What are the inventory and home storage limits?

Standard inventory allows 16 slots and 50.0 kg total weight, with movement stamina cost scaling by weight. Home storage doubles this to 32 slots and 200.0 kg, accessible only by the owner at their home coordinates.

Which pipeline phases execute economy operations?

Economy operations run as fixed phases in the 39-phase AuthoritativeApplyPipeline: phase 8 (blacksmith), phase 23 (quest_rewards), phase 25 (shop), and phase 27 (resource_transactions). Skill logic must not contradict this ordering.

What does this economy skill not cover?

Deeper guild_system.py internals beyond Camp Intel, Resource Node Intel, Material Hints, Terrain Tips, and Quest Generation are out of scope. No Mechanics Bible chapter or contract doc currently documents those internals further.