aboutsummaryrefslogtreecommitdiff
path: root/building_guide/recipes.md
blob: 67048c13fdb0386148eb3250264e00e78ee04513 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
## Crafting & Recipes

Crafting information lives on the **output item's YAML file** via the `craft:` block. There is no
separate recipe directory. To find out how to make `bronze_dagger`, open
`data/items/equipment/bronze_dagger.yaml` and look for the `craft:` block.

**The filename is the ID** (`bronze_dagger.yaml` → `bronze_dagger`). Ingredients reference items by
filename. The output item IS the craft — no separate `output` field.

### Craft YAML Reference

| Field | Type | Description |
|-------|------|-------------|
| `type` | string | Skill name: `smithing`, `cooking`, `crafting`, `fletching`, `pharmacy`, `construction`, or `""` for skill-less. |
| `subtype` | string | Production method override: `smelt` for furnace, `clean` for herb cleaning. |
| `level` | int | Required skill level |
| `xp` | int | XP awarded on success |
| `ticks_per_cycle` | float64 | Ticks per craft cycle |
| `station` | []string | Station object IDs required (e.g. `[anvil]` or `[furnace]`) |
| `tool` | string | Required tool_type (e.g. `knife`, `saw`). Tool is NOT consumed. |
| `ingredients` | []IngredientEntry | Ingredients consumed (see below) |
| `output_qty` | int | Quantity produced per cycle (default 1) |
| `fail` | string | Item ID produced on failure |
| `success_message` | string | Success message per cycle (%n, %i1, %i2, %b1, %b2) |
| `fail_message` | string | Failure message; empty = silent fail |
| `start_message` | string | Message when action begins |
| `end_message` | string | Message when action completes |
| `steps` | []CraftStep | Multi-step messages at tick offsets |
| `success` | SuccessFormula | Optional skill check formula (base, per_level, cap) |

### Message Variables

| Variable | Expands to |
|----------|-----------|
| `%n` | Output item name (colored) |
| `%i1` | 1st ingredient's matched item (colored) |
| `%i2` | 2nd ingredient's matched item (colored) |
| `%b1` | 1st ingredient's byproduct name (colored, success only) |
| `%b2` | 2nd ingredient's byproduct name (colored, success only) |

Numbering follows YAML ingredient/byproduct order. If an ingredient entry has multiple
alternatives (`items: [a, b]`), the variable expands to whichever the player has. Inline
color tags (`{C4}text{/}`) work alongside these variables.

### Message Defaults

If a message field is omitted, the game uses a skill-level default:

| Type | Default success_message | Default start_message |
|------|------------------------|----------------------|
| `cooking` | `"Cooked to perfection. %n looks great!"` | `"You start cooking %i1."` |
| `smelt` (subtype) | `"You remove a white hot %n!"` | `"You place the %i1 into the furnace."` |
| `smithing` | `"You smith a %n."` | `"You begin smithing %i1."` |
| `crafting` | `"You craft a %n."` | `"You begin crafting %i1."` |
| `fletching` | `"You fletch a %n."` | `"You begin fletching %i1."` |
| `pharmacy` | `"You mix a %n."` | `"You start mixing %i1."` |
| `construction` | `"You construct a %n."` | `"You begin constructing %i1."` |
| `clean` (subtype) | `"You clean the %i1."` | `"You begin cleaning herbs."` |
| (unset) | `"You produce %n."` | `"You start <verb> %i1."` |

For skills that never fail (smithing, crafting, fletching, pharmacy, construction),
`fail_message` defaults to empty — no message on failure.

### IngredientEntry — Multi-Item Ingredient Slots

Each ingredient entry defines a slot with multiple valid alternatives. The first matching
item in the player's inventory is consumed.

```yaml
ingredients:
  - items: [item_id, alternative_id, ...]
    quantity: 1
    byproducts: [byproduct_for_item, byproduct_for_alt, ...]
```

`byproducts` matches the `items` list by index. Use `""` for items with no byproduct:

```yaml
ingredients:
  - items: [bucket_of_water, vial_of_water]
    quantity: 1
    byproducts: [empty_bucket, ""]   # bucket returns empty, vial is consumed entirely
  - items: [herb]
    quantity: 1                      # no byproducts — herb is consumed entirely
```

### CraftStep — Multi-Step Messages

Interim messages fired at specific tick offsets during the cycle:

```yaml
craft:
  type: ""
  ticks_per_cycle: 6
  ingredients:
    - items: [map_piece_1]
      quantity: 1
    - items: [map_piece_2]
      quantity: 1
    - items: [map_piece_3]
      quantity: 1
  steps:
    - tick: 1
      message: "You try to puzzle how the pieces fit together."
    - tick: 3
      message: "Aha, this edge lines up here!"
  success_message: "You assemble the map!"
```

### Skill-Based Production

```yaml
# data/items/consumables/stim_potion.yaml
name: stim potion
craft:
  type: pharmacy
  level: 3
  xp: 25
  ticks_per_cycle: 4
  ingredients:
    - items: [guam_potion_unf]
      quantity: 1
    - items: [eye_of_newt]
      quantity: 1
  success_message: "You mix a %n."
```

### Station-Based Production

Furnace (smelting):

```yaml
# data/items/materials/bronze_bar.yaml
name: bronze bar
craft:
  type: smithing
  subtype: smelt
  level: 1
  xp: 6
  ticks_per_cycle: 4
  station: [furnace]
  ingredients:
    - items: [copper_ore]
      quantity: 1
    - items: [tin_ore]
      quantity: 1
  fail_message: "You fail to smelt a usable bar."
```

Anvil (smithing):

```yaml
# data/items/equipment/bronze_dagger.yaml
name: bronze dagger
craft:
  type: smithing
  level: 1
  xp: 12
  ticks_per_cycle: 4
  station: [anvil]
  ingredients:
    - items: [bronze_bar]
      quantity: 1
```

Stackable outputs use `output_qty`:

```yaml
# data/items/ammo/bronze_nails.yaml
name: bronze nails
stackable: true
craft:
  type: smithing
  level: 4
  xp: 12
  ticks_per_cycle: 4
  station: [anvil]
  ingredients:
    - items: [bronze_bar]
      quantity: 1
  output_qty: 15
```

### Tool-Based Production

```yaml
# data/items/ammo/arrow_shafts.yaml
name: arrow shafts
craft:
  type: fletching
  level: 1
  xp: 5
  ticks_per_cycle: 3
  tool: knife
  ingredients:
    - items: [logs, oak_logs, willow_logs]
      quantity: 1
  output_qty: 15
```

### Skill-Less Combinations

Omit `type` (or leave empty) for combinations with no skill check and 100% success:

```yaml
# data/items/consumables/bucket_of_water.yaml
name: bucket of water
craft:
  ticks_per_cycle: 0
  ingredients:
    - items: [vial_of_water, jug_of_water]
      quantity: 1
      byproducts: [empty_vial, empty_jug]
    - items: [empty_bucket]
      quantity: 1
  success_message: "You pour the %i1 into the %i2."
```

### Multi-Piece Assembly

```yaml
# data/items/quest/ancient_map.yaml
name: ancient map
craft:
  ticks_per_cycle: 0
  ingredients:
    - items: [torn_page_1]
      quantity: 1
    - items: [torn_page_2]
      quantity: 1
    - items: [torn_page_3]
      quantity: 1
  steps:
    - tick: 1
      message: "You try to puzzle how the pieces fit together."
    - tick: 3
      message: "Aha, this edge lines up here!"
  success_message: "You assemble the %n."
```

### Clean Recipes (Herb Cleaning)

Use `type: pharmacy` with `subtype: clean`:

```yaml
# data/items/materials/guam.yaml (clean herb)
name: clean guam
craft:
  type: pharmacy
  subtype: clean
  level: 3
  xp: 3
  ticks_per_cycle: 2
  ingredients:
    - items: [grimy_guam]
      quantity: 1
```

### Food / Healing

Items with `heal_value` and `eat_message` can be consumed via the `eat` command. See
`items.md` for the full food item format.

### Construction

`type: construction` recipes use `station: [workbench]`. Log-to-plank recipes additionally
require `tool: saw`. See `construction.md` for plank tiers, furniture, NPCs, and player
housing.