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
|
## Items
**The filename is the ID.** An item is looked up by its filename stem
(`bronze_pickaxe.yaml` → `bronze_pickaxe`); the loader derives `ItemDef.ID` from it. Do not
put an `id:` field in the file — it is ignored. Anything that references this item (drop
tables, craft `ingredients`, room `item_spawns`) uses that filename.
### Equipment & Tool Blocks
Combat and equipment stats go under an `equipment:` block. Tool stats go under a `tool:` block.
```yaml
name: bronze pickaxe
color: "B2" # xterm-256 color index (00-FF)
aliases: ["pick", "pickaxe"]
description: "A sturdy bronze pickaxe."
value: 10
stackable: false
equipment: # optional — combat/equip behavior
type: melee_weapon # melee_weapon / ranged_weapon / tech_weapon / armor / ammo / tool
slot: main_hand # head / neck / torso / legs / hands / feet / back /
# ammo / main_hand / off_hand / ring
attack_type: stab # stab/slash/crush/ranged/science — determines accuracy type
speed: 5 # ticks between attacks
attack: # accuracy bonuses per type
stab: 4
slash: -2
crush: 2
other:
strength: 3 # melee max hit bonus
tool: # optional — tool behavior
type: pickaxe # used by gather behaviors that require "tool: pickaxe"
speed: 2 # reduces gather wait time
requirements: # optional — skill levels needed to equip
accuracy: 1
```
### Equipment Block Fields
| Field | Description |
|---|---|
| `type` | Equipment type: `melee_weapon` / `ranged_weapon` / `tech_weapon` / `armor` / `ammo` / `tool` |
| `slot` | Equip slot (see below) |
| `attack_type` | `stab` / `slash` / `crush` / `ranged` / `science` — determines which defense the target uses |
| `speed` | Ticks between attacks |
| `junk` | Junk type this item gives when recycled (for Science decks) |
| `attack` | Attack bonuses (accuracy) — sub-fields: `stab`, `slash`, `crush`, `ranged`, `science` |
| `defense` | Defense bonuses — sub-fields: `stab`, `slash`, `crush`, `ranged`, `science` |
| `other` | Other bonuses — `strength` (melee max hit), `ranged` (ranged max hit on ammo), `science` (science max hit), `technology` (reduces tech battery drain) |
### Equipment Slots
| Slot | Description |
|---|---|
| `head` | Helmets, hats |
| `neck` | Amulets, necklaces |
| `torso` | Platebodies, chest armor |
| `legs` | Platelegs, chaps |
| `hands` | Gloves, vambraces |
| `feet` | Boots |
| `back` | Capes, back items |
| `ammo` | Arrows, bolts |
| `main_hand` | Weapons, tools, shields |
| `off_hand` | Shields, secondary items |
| `ring` | Rings |
### Attack Type
`attack_type` determines which defense stat the target rolls against:
| Weapon | attack_type |
|---|---|
| Swords | slash |
| Daggers | stab |
| Axes | slash |
| Pickaxes | stab |
| Bows | ranged |
| Science decks | science |
| Unarmed | crush (default) |
### Requirements
Higher-tier equipment requires skill levels to equip:
```yaml
requirements:
accuracy: 20 # melee weapons
defense: 20 # armor
ranged: 30 # ranged weapons/armor
```
Standard tiers: bronze/iron (none), steel (5), black (10), mithril (20), adamant (30), rune (40), dragon (60).
### Ranged Ammo
Arrows and bolts use `other.ranged` for damage. Accuracy comes from the bow:
```yaml
name: iron arrow
stackable: true
equipment:
other:
ranged: 10
slot: ammo
type: ammo
```
### Science Decks
Decks use `tech_weapon` type and `science` attack_type:
```yaml
name: basic deck
equipment:
type: tech_weapon
slot: main_hand
attack_type: science
speed: 5
attack:
science: 5
```
### Color
The `color` field accepts xterm-256 palette indices (00-FF, hex) with optional modifiers:
```yaml
color: "B2" # bronze/gold
color: "4B bold" # bold steel blue
color: "g:C4,D0,E2" # gradient red → orange → gold
```
In ANSI mode, extended colors (10-FF) automatically downgrade to the nearest ANSI color. Use `colortable` in-game to see all 256 colors.
Key item (quest token, not equippable):
```yaml
name: pass stub
description: "A crumpled slip of paper stamped with the guard's seal."
value: 0
stackable: false
```
---
## Firemaking
```yaml
name: logs
fire_level: 1 # firemaking level required
fire_xp: 40 # XP for burning/stoking
burn_ticks: 24 # how long the fire burns
```
## Food / Healing
```yaml
name: bread
color: "DE"
description: "A fresh loaf of bread, still warm from the oven."
value: 5
heal_value: 5 # positive = heal, negative = damage
eat_message: "You eat the bread. Warm and satisfying."
```
## MadeFrom — Item Combinations
Define what items combine to make this item. Used by the `use` command. Combinations run through the production system — players are prompted "How many?" and the action loops with a timer.
```yaml
name: bread dough
color: "DE"
ticks: 2
made_from:
- items: [pot_of_flour]
quantity: 1
byproducts: [empty_pot]
- items: [bucket_of_water, pitcher_of_water]
quantity: 1
byproducts: [empty_bucket, empty_pitcher]
```
Each entry is an ingredient slot. Multiple `items` means any of them works. The first matching item found in inventory is consumed.
`ticks` controls how many game ticks each production cycle takes (default 2).
### Byproducts
`byproducts` is a list matching the `items` list by index. When `bucket_of_water` (items[0]) is consumed, `empty_bucket` (byproducts[0]) is returned to inventory. When `pitcher_of_water` (items[1]) is consumed, `empty_pitcher` (byproducts[1]) is returned instead.
Use `""` for items that produce no byproduct:
```yaml
made_from:
- items: [pot_of_flour, loose_flour]
quantity: 1
byproducts: [empty_pot, ""] # pot returns empty_pot, loose flour returns nothing
- items: [bucket_of_water]
quantity: 1
byproducts: [empty_bucket]
```
Omit `byproducts` entirely if no items in that slot produce a byproduct:
```yaml
made_from:
- items: [pot_of_flour]
quantity: 1
byproducts: [empty_pot] # returns empty_pot
- items: [salt]
quantity: 1 # no byproducts field — salt is consumed entirely
```
See also `recipes.md` for station-based recipes.
|