aboutsummaryrefslogtreecommitdiff
path: root/building_guide/items.md
diff options
context:
space:
mode:
Diffstat (limited to 'building_guide/items.md')
-rw-r--r--building_guide/items.md120
1 files changed, 72 insertions, 48 deletions
diff --git a/building_guide/items.md b/building_guide/items.md
index eefdf9c..e03622d 100644
--- a/building_guide/items.md
+++ b/building_guide/items.md
@@ -5,6 +5,10 @@
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)
@@ -12,88 +16,108 @@ aliases: ["pick", "pickaxe"]
description: "A sturdy bronze pickaxe."
value: 10
stackable: false
-equip_slot: main_hand # optional — where it equips
-weapon_type: melee # optional — melee, ranged, or science
-attack_type: stab # stab/slash/crush/ranged/science — determines accuracy type
-stats: # optional — per-type combat bonuses
- stab_attack: 4
- slash_attack: -2
- crush_attack: 2
- strength_bonus: 3
-speed: 5 # ticks between attacks
-tool_type: pickaxe # used by gather behaviors that require "tool: pickaxe"
-tool_speed: 2 # reduces gather wait time
+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 Stats (ItemStats)
-
-Weapons have per-type **attack bonuses** — these determine accuracy based on the weapon's `attack_type`:
+### Equipment Block Fields
| Field | Description |
|---|---|
-| `stab_attack` | Accuracy bonus for stab attacks |
-| `slash_attack` | Accuracy bonus for slash attacks |
-| `crush_attack` | Accuracy bonus for crush attacks |
-| `science_attack` | Accuracy bonus for science attacks |
-| `ranged_attack` | Accuracy bonus for ranged attacks |
-
-Armor has per-type **defense bonuses** — the mob's `attack_type` determines which defense is used:
-
-| 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 |
|---|---|
-| `stab_defense` | Defense vs stab attacks |
-| `slash_defense` | Defense vs slash attacks |
-| `crush_defense` | Defense vs crush attacks |
-| `science_defense` | Defense vs science attacks (negative on metal armor) |
-| `ranged_defense` | Defense vs ranged attacks |
-
-Other damage/utility bonuses:
-
-| Field | Description |
-|---|---|
-| `strength_bonus` | Melee max hit bonus |
-| `ranged_strength` | Ranged max hit bonus (on ammo) |
-| `science_damage` | Science max hit bonus |
-| `technology_bonus` | Reduces tech battery drain rate |
+| `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
-Weapons should always set `attack_type`. Common mappings:
+`attack_type` determines which defense stat the target rolls against:
-| Category | attack_type |
+| Weapon | attack_type |
|---|---|
| Swords | slash |
| Daggers | stab |
| Axes | slash |
| Pickaxes | stab |
| Bows | ranged |
+| Science decks | science |
| Unarmed | crush (default) |
-### Equipment Requirements
+### Requirements
Higher-tier equipment requires skill levels to equip:
```yaml
requirements:
accuracy: 20 # melee weapons
- defense: 20 # armor
- ranged: 30 # ranged weapons/armor
+ 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 `ranged_strength` for damage. Accuracy comes from the bow:
+Arrows and bolts use `other.ranged` for damage. Accuracy comes from the bow:
```yaml
name: iron arrow
stackable: true
-equip_slot: ammo
-stats:
- ranged_strength: 10
+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
@@ -102,8 +126,8 @@ The `color` field accepts xterm-256 palette indices (00-FF, hex) with optional m
```yaml
color: "B2" # bronze/gold
-color: "4B bold" # bold steel blue
-color: "g:C4,D0,E2" # gradient red → orange → 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.