toolDef.dataType
One tool the player can hold and use on the grid cells in front of them. Every `.data` asset bound to `toolDef`, in this package or anywhere in a world, is loaded by toolUseKit at setup and becomes a tool known by its `id`.
toolDef (toolUseKit tool contract)
One tool the player can hold and use on the grid cells in front of them. Every
.data asset bound to toolDef, in this package or anywhere in a world, is
loaded by toolUseKit at setup and becomes a tool known by its id.
| field | meaning |
|---|---|
id | the name code uses (Tools.equip("hoe")) |
name | what the player reads |
short | optional short label for the strip on narrow (phone) screens; defaults to one per kind (Hoe, Can, Seeds, Axe, Pick, Scythe, Hammer) |
icon | a short glyph or emoji drawn on the tool strip |
kind | hoe, wateringCan, axe, pickaxe, scythe, seedPouch, hammer or generic; picks the model and the swing, and is what Tools.onUse(kind, fn) listens for |
description | one line for menus |
swing | override the swing animation (chop, overhead, side, sweep, pour, sow, knock) |
useTime | seconds one use takes, the cooldown between uses |
ladder | the patterns a charge climbs, smallest first |
energyCost | energy one use costs, one number per tier |
chargeCost | extra cost per charge level, times the tier cost |
tiers | the upgrade tiers, first is tier 1 |
Each tier: name (Basic, Copper, Steel, Gold, Iridium...), pattern (the
biggest pattern a full charge reaches), patterns (an explicit charge list
that wins over ladder + pattern), chargeTime (seconds per charge
level), color (head colour), accent (trim colour), gem (adds a gem),
glow (glows), and one colour per style (cartoon, pixel, painted,
realistic, scifi) that wins over color in that style.
Patterns: single, line3, line5, wide3, wide5, square3,
square5, cross, or any name given to Tools.definePattern.
Scoped to this part · feeds back into the world's score.