# Good

> Kinbarrow modding reference — content tree `45d0fe274f851548`, version `0.2.0+main.c05ef2b`.

`goods/<id>.ron` — OURS (`source: Original`), one material/tool per file.

**Note on syntax:** these files are RON, not JSON. The shapes below are exact,
but punctuation follows RON — read a real `data/*.ron` file alongside.

## Fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `acquisition` | `string` | optional | A non-crafting source (future loot/quest goods); absent everywhere today. |
| `base_value_cp` | `uint32` | required | ANCHOR in copper pieces, never a price. The loader converts to the engine's minor units at the boundary (`MINOR_PER_CP`). |
| `demand_target` | `integer` | optional | Authored scarcity `DEMAND_TARGET`; absent = the engine default. World tail passes may still re-derive it (demand IS the eaters). |
| `fuel_nights` | `integer` | optional | Nights one unit of this good keeps a venue's lamps lit (the fuel table — oil burns clean and long, cordwood smokes a night). Absent = not a fuel. Stamped onto the concept at genesis (`FUEL_NIGHTS`), so the graph-only light reads never need the tree. |
| `furnishing` | `FurnishingInfo` | optional | Present only on FURNISHINGS: the minor-object stock a genesis pass dresses an owned venue with, and — when bulky — the cover it stands as on a fight board. Absent = not a furnishing. |
| `id` | `string` | required |  |
| `material` | `MaterialInfo` | optional | Per-material deviations, present only on constructive materials; absent = not a material. |
| `name` | `string` | required |  |
| `quality_class` | `string` | optional | A `tables/quality_profiles.ron` class override where structure can't derive it; absent = derive. |
| `quality_overrides` | `TierEffects[]` | optional | The contract's ONE `#[serde(default)]` field — present only where an item deviates from its class profile (no good needs it today). |
| `recipes` | `Recipe[]` | required | The good's recipes — craftable IS having recipes (there is no craftable flag). |
| `sacred` | `boolean` | default `false` | The shrine's flag (`SACRED`): the piety weight prefers pew over pint by prop, never by name match. |
| `satisfies` | `string` | optional | The need this good SATISFIES (`"hunger"`/`"recreation"`, the `needs::Need` canon — the validator rejects anything else). Part of the base vocabulary since the campaign-layer retirement: the need mapping is a property of the GOOD, not of any one world. |
| `source` | `Source` | required |  |
| `spoilage_days` | `integer` | optional | Days before it rots (raw hide, fish, bread); absent = imperishable. |
| `weight_lb` | `double` | required | Weight in pounds — feeds cart loads. |

## Nested shapes

### Ability

The six ability scores (SRD 5.1). The engine's own `stats::Ability` is the runtime type; this is the data-layer mirror, bridged by [`Ability::engine`].

`Str`, `Dex`, `Con`, `Int`, `Wis`, `Cha`

### CraftTier

The tool-proficiency ladder — one ladder, two homes (this IS the engine's `TradeTier`).

`Untrained`, `Proficient`, `Expert`

### FurnishingAnchor

Where a bulky furnishing stands: hugging a wall, or free in the room's middle.

#### FurnishingAnchor::Wall

Against a wall — the bench, the rack, the bin.

#### FurnishingAnchor::Center

Free-standing mid-room — the millstone, the great table.

### FurnishingInfo

A furnishing's dressing contract: how the piece lights, where it stands, and how it anchors. Worth stays `base_value_cp` (never duplicated); weight stays `weight_lb`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `anchor` | `FurnishingAnchor` | optional | How a bulky piece stands in its room (the engine branches on this — a closed set). |
| `rooms` | `string[]` | default `[]` | The room ROLES this piece dresses on a fight board — validated against the roles building programs declare. Empty = a trinket that casts no shadow. |
| `sheds_light` | `boolean` | default `false` | Does the piece LIGHT the room it stands in? The lamp and the candlestick do; the mug does not. |

### MaterialInfo

Present only on CONSTRUCTIVE materials (iron/mithral ingot, timber, leather, wool cloth). Family baselines live on the material-class registry; these are the per-material deviations.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `class` | `string` | required | A `tables/material_classes.ron` id (metal/wood/leather/cloth), boot-resolved. |
| `integrity_factor` | `double` | required | Object-hp multiplier (mithral 4.0). |
| `min_tier` | `CraftTier` | required | The CraftTier floor to work it at all (mithral: Expert). |
| `quality_bias` | `int32` | required | Lifts the craft check that ROLLS the tier (mithral +4): better stock, better odds. |
| `rarity` | `Rarity` | required | Worldgen rarity hint for the material. |
| `strength_note` | `string` | required | Durability/strength as prose; a later engine consumer reads it. |
| `toughness_bonus` | `int32` | required | Bonus over the class hardness (mithral +3). |
| `value_factor` | `double` | required | Value multiplier on constructed items (mithral 10.0). |
| `weight_factor` | `double` | required | Weight vs the class baseline (mithral 0.5). |
| `work_difficulty` | `int32` | required | Extra labour, pairs with `min_tier` gating (mithral +5); never touches the quality roll. |

### QualityTier

The seven quality tiers (semantic — engine code branches on it).

`Trash`, `Poor`, `Normal`, `Good`, `Excellent`, `Masterwork`, `Legendary`

### Rarity

Worldgen rarity hint.

`Common`, `Uncommon`, `RareRegional`

### Recipe

A recipe embedded on a good/weapon/armor. Craftable IS having recipes — there is no craftable flag (README).

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ability` | `Ability` | optional | The ability whose mod feeds output; absent = untrained extraction. |
| `building` | `string` | required | The building TYPE that produces this good (a `data/buildings/` id, boot-resolved): a recipe names its building directly, and the build-time derivation mints one `Produces` edge at every venue of that type. Producing vs merely crafting is NOT authored: every recipe is a candidate `Produces` edge and the opportunity-cost engine (`best_row`) decides what a shift makes. The only recipes that do not derive an edge are those the 2-input edge model cannot hold (3+ distinct inputs) — a substrate limit, ledgered, not a producibility flag. |
| `forbids_terrain` | `string[]` | default `[]` | The exclusion half of the terrain GATE (see `requires_terrain`): the recipe is skipped at any venue whose town bears one of these tags. |
| `hours` | `uint32` | required | Labour hours one batch takes. |
| `inputs` | `any[][]` | required | The (input, qty) pairs consumed per batch — boot-resolved. EMPTY = raw extraction (nature's own yield): such a recipe names WHERE and HOW FAST a raw is won, carries no `CRAFTED` flag, and keeps the extraction lottery. A recipe WITH inputs is a craft (sets `CRAFTED`). |
| `rate` | `double` | required | Units per worked hour, before the work multiplier. The recipe carries it, so production truth lives in one place. |
| `requires_terrain` | `string[]` | default `[]` | Terrain GATE: this recipe is wired only at venues whose town bears every `requires_terrain` tag and NONE of `forbids_terrain`. Lets a good be made two ways by place — coast/vale bread bakes `flour` where an `arable` mill stands; the mountain bakes `grain` direct where it does not. Empty gates = wire wherever the building stands. |
| `strike` | `Strike` | optional | The face's RARE find: each produced unit has `odds` chance of striking this good instead of the bulk yield — the mithral vein in the stone. Absent on ordinary recipes. |
| `terrain_mods` | `any[][]` | default `[]` | Terrain-tag rate MODIFIERS: the effective production rate at a venue is `rate × Π(multiplier for each town terrain tag present)`. Regional divergence emerges from the GROUND, not hand-wired per venue — grain grows richer on `arable`, an ore seam runs faster in `mountains`. Empty = the base rate stands everywhere the recipe is wired. |
| `tier` | `CraftTier` | required | The tool-proficiency floor to run this recipe. |
| `tool` | `string` | optional | A goods/ id (e.g. "smiths_tools"); absent = bare hands. |
| `yield` | `uint32` | required | Units the batch yields: one run of `inputs` + `hours` makes this many of the good — the ammunition fix the pricing ledger named (arrows come 20 to a batch, so their per-unit worth is sane). The derivation (`recipe_worth_cp`) divides material + labour by it, so a per-unit anchor round-trips. Explicit in EVERY recipe — the RON key is `yield`; the no-serde-default contract's one exception is `quality_overrides`, and this is not it (`1` for a single-unit craft). |

### RecipeInput

A recipe input: a SPECIFIC good (process inputs) or ANY material of a class (constructive inputs — the family wall).

#### RecipeInput::Good

A SPECIFIC good by id — the exact material a process consumes.

Carries `string`.

#### RecipeInput::Class

ANY good of a material CLASS by id — the constructive input (the family wall): whichever member of the class is on hand.

Carries `string`.

### Source

Every file's top-level value carries `source`.

#### Source::Srd51

SRD 5.1 — the System Reference Document, the shipped baseline.

#### Source::Original

Original content authored for this game (not from the SRD).

#### Source::Personal

A player's own transcription or third-party content in a mod tree — provenance stays honest without borrowing the base tree's markers. Never used by shipped files.

### Strike

A strike table entry: the rare good and its per-unit odds.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `good` | `string` | required | The rare good struck — a goods/ id, boot-resolved. |
| `odds` | `double` | required | Per-unit chance (0..1) of striking `good` instead of the bulk yield. |

### TierEffects

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ac_delta` | `integer` | optional | AC delta at this tier (armor); absent = n/a. |
| `attack_delta` | `integer` | optional | Attack-roll delta at this tier (weapons); absent = n/a. |
| `damage_delta` | `integer` | optional | Damage delta at this tier (weapons); absent = n/a. |
| `dc_delta` | `integer` | optional | Lock DC delta vs the Normal DC 10 base at this tier (locks); absent = n/a. |
| `integrity_factor` | `number` | optional | Max-integrity multiplier (the `structure` class) — defaulted so the arms/tool/lock profiles never spell it. |
| `tier` | `QualityTier` | required | The quality tier this row describes. |
| `value_factor` | `double` | required | Worth multiplier at this tier (every class). |
| `work_factor` | `number` | optional | Work-output multiplier at this tier (tools); absent = n/a. |

