Log inGet started
Package

toolUseKit.package

Newest version

README.md

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.

fieldmeaning
idthe name code uses (Tools.equip("hoe"))
namewhat the player reads
shortoptional short label for the strip on narrow (phone) screens; defaults to one per kind (Hoe, Can, Seeds, Axe, Pick, Scythe, Hammer)
icona short glyph or emoji drawn on the tool strip
kindhoe, wateringCan, axe, pickaxe, scythe, seedPouch, hammer or generic; picks the model and the swing, and is what Tools.onUse(kind, fn) listens for
descriptionone line for menus
swingoverride the swing animation (chop, overhead, side, sweep, pour, sow, knock)
useTimeseconds one use takes, the cooldown between uses
ladderthe patterns a charge climbs, smallest first
energyCostenergy one use costs, one number per tier
chargeCostextra cost per charge level, times the tier cost
tiersthe 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.