KINBARROW modding reference
v0.2.0+main.e011511f4 dataset 4a103dcdb658a75a

Crafting: goods and embedded recipes (ORIGINAL content)

The content tree — the contract for the data/ tree.

The SRD prices finished arms but has NO material recipes — its downtime crafting is gp-rates only. Everything in this section is therefore OURS (the alignment_bias precedent: original additions living inside or beside .srd.ron files, explicitly marked): the goods/ collection, every recipes: list, and all quantities, tiers, and hours.

  • The goods collection (goods/<id>.ron, source: Original, one file per material): a starter set of 12 sufficient to give every SRD weapon and armor a plausible recipe — iron_ore, coal, iron_ingot, timber, hide, leather, cotton, cloth, sinew, and the four artisan’s tools. Raw naturals (ore, coal, timber, hide, sinew, cotton) have no recipes — they are gathered or traded; intermediates (iron_ingot from ore+coal at the smithy, leather from hide at the tannery, cloth woven from cotton at the loom) carry theirs. The tools’ WEIGHTS are aligned with the SRD equipment table’s artisan’s-tools rows (noted per file); their VALUES, and every other good’s, now DERIVE (/0396): worth = material cost ÷ yield + labour_rate(tier) ÷ rate, and no file states a price. Weapons and armour are the same rule since §5: the book’s price column is no longer transcribed at all. It never reached a price — only a materials-≤-price sanity bound, which the derivation makes unrepresentable (labour is non-negative, so worth ≥ materials holds by construction on any yield: 1 row) — and while it sat in the file it was a second, quieter authority over the same quantity. What the SRD’s plate price actually recorded, a brand/scarcity premium some 300× the raw craft cost, belongs to the market layer, and the market layer is where it now lives. The bedroll is the first TERMINAL consumer good — a carpentry product off the timber and cloth chains, quality_class: "good" marking it a fitted item (used, not crafted onward), so the orphan check reads it as a legitimate sink; its weight aligns with the SRD’s bedroll row and its value derives like every crafted good’s.
  • Recipes are EMBEDDED in item definitions — recipes: on Weapon, Armor, and Good. Craftable is DERIVED from having recipes, never a flag. Recipe.station ids resolve at boot against the union of the building types’ stations lists (today: smithy, tannery, carpentry, weaver, ovens, mash_house); tier is the ladder; tool references a good id (None = bare hands — a club is whittled). Constructive inputs are CLASS-GENERIC (Class("metal") — any material of the class satisfies; a mithral dagger needs no dagger variant); process inputs stay specific ids (Good("coal") — iron ingots come from iron ore, not “any metal”).
  • The strike table (the rare find in the bulk): an EXTRACTION recipe (one with no inputs) may carry strike: Some(Strike(good: "<id>", odds: <0..1>)). Each unit the face earns then rolls a SECOND die for its IDENTITY: the rare good at odds, the bulk good otherwise. It splits identity, NEVER quantity — bulk + rare equals exactly what the face would have minted without it, so a strike never mints or loses a unit. The mountain mine’s iron_ore row strikes mithral_ore at 0.08; its stone row strikes iron_ore at 0.15. An unknown good or a non-probability odds fails boot.
  • Richer ground, richer vein ( §5): a Strike may carry mods: [(tag, multiplier)] — the terrain_mods rule applied to the odds. The effective chance at a venue is odds × Π(multiplier for each town terrain tag present), clamped to a probability. One row can therefore run a fat seam in one town and a thin one in the next without a second recipe or a hand-wired deposit: the ground decides. Tags resolve against tables/terrain_tags.ron; a negative or non-finite multiplier fails boot.
  • Boot feeds these into the EXISTING production machinery: recipes become graph structure, worldgen assigns the venues, and there is NO parallel crafting system. The make-check quality rule generalizes here later (tier + check → quality); material weight_lb feeds the arbitrage cart loads.
  • Batch yield (the ammo fix, landed): a Recipe carries a yield (units one run makes) and the derivation divides by it, so ammo-scale goods price sanely instead of costing more per unit than the ingot their head is cut from — the ledgered fix, not a price fudge. The first batch goods are arrow and bolt (20 to a fletcher’s run at carpentry: 27 cp material + 3 h labour ÷ 20 = 1 cp/unit). They are the honest ledgered SEAM — craftable and grounded, but nothing CONSUMES them yet (the orphan warning stands until combat spends ammunition in a later slice). Every prior recipe is yield: 1, explicit (no serde default).