From ec2e94e3463654a6288464a4c070b48ef9bf7368 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 17 Jun 2026 21:13:07 -0400 Subject: feat: smithing added, item/object interaction reworked. recipes and menus refactored. --- worldbuilding_guide/recipes.md | 81 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) (limited to 'worldbuilding_guide/recipes.md') diff --git a/worldbuilding_guide/recipes.md b/worldbuilding_guide/recipes.md index 500954f..799dab0 100644 --- a/worldbuilding_guide/recipes.md +++ b/worldbuilding_guide/recipes.md @@ -24,6 +24,7 @@ Recipe files live in `data/recipes/.yaml`. | `station` | []string | Station object IDs required | | `consume` | []ConsumeEntry | Ingredients consumed (see below) | | `output` | string | ItemID produced on success | +| `output_qty` | int | Quantity produced (default 1, for stackables) | | `fail` | string | ItemID produced on failure (optional) | | `message` | string | Success message | | `fail_message` | string | Failure message | @@ -39,6 +40,18 @@ Each consume entry defines an ingredient slot with multiple valid items. The fir consume: - items: [item_id, alternative_id, ...] qty: 1 + byproducts: [byproduct_for_item, byproduct_for_alt, ...] +``` + +`byproducts` is optional. When present, it matches the `items` list by index — consuming `items[0]` returns `byproducts[0]` to inventory. Use `""` for items with no byproduct: + +```yaml +consume: + - items: [bucket_of_water, vial_of_water] + qty: 1 + byproducts: [empty_bucket, ""] # bucket returns empty, vial is consumed entirely + - items: [herb] + qty: 1 # no byproducts — herb is consumed entirely ``` ### Station-based recipe (cooking on a fire) @@ -79,6 +92,74 @@ message: "You bake the dough into a fresh loaf of bread." fail_message: "You burn the bread to a crisp." ``` +### Smelting recipe (ore to bar at a furnace) + +Smelting recipes use `type: smelting` and `station: [furnace]`. The `smelt` command or `use on furnace` triggers them. Multi-ore recipes use `qty` on consume entries. + +```yaml +id: smelt_steel +type: smelting +skill: smithing +level: 40 +xp: 17 +wait: 4 +station: [furnace] +consume: + - items: [iron_ore] + qty: 1 + - items: [coal] + qty: 2 +output: steel_bar +message: "You remove a white hot steel bar!" +fail_message: "You fail to smelt a usable bar." +``` + +Iron smelting uses a `success` formula for its 50% failure rate: + +```yaml +success: + base: 0.5 + per_level: 0 + cap: 0.5 +``` + +### Smithing recipe (bar to item at an anvil) + +Smithing recipes use `type: smithing` and `station: [anvil]`. The `smith` command or `use on anvil` triggers them. Requires a hammer (`tool_type: hammer`) in inventory. + +```yaml +id: smith_steel_platebody +type: smithing +skill: smithing +level: 48 +xp: 187 +wait: 4 +station: [anvil] +consume: + - items: [steel_bar] + qty: 5 +output: steel_platebody +message: "You hammer out a steel platebody." +``` + +For stackable outputs, use `output_qty`: + +```yaml +id: smith_iron_nails +type: smithing +skill: smithing +level: 24 +xp: 25 +wait: 4 +station: [anvil] +consume: + - items: [iron_bar] + qty: 1 +output: iron_nails +output_qty: 15 +message: "You hammer out some iron nails." +``` + ### MadeFrom — Item-on-item combinations Item-on-item combinations are defined directly on the output item via the `made_from` field. No recipe file needed. -- cgit v1.2.3