CONTENT CONTRACT · VERSION 1
tool
What a held item does in anyone's hand: one mechanic, its reach, rhythm and blows.
Signature
{ action: ToolAction, ammo: (ItemId)?, arc_permille: Permille, combo: {ToolBlow}, damage_type: DamageTypeId, hit_status: (StatusId)?, hug_mm: Distance, id: ContentId, kind: "tool", lift_mm_per_tick: Count, projectile: (ProjectileKind)?, reach_mm: Distance, recover_ticks: PositiveTicks, release_ticks: DurationTicks, siege_damage: Count, stamina: (PositiveCount)?, targets: PositiveCount, windup_ticks: PositiveTicks }Fields
| Name | Type | Meaning |
|---|---|---|
action | ToolAction | General mechanic the tool drives; never chosen by its wielder. |
ammo | ItemId | Ranged: item one shot takes from the wielder's inventory; without one in stock the tool does not shoot. Absent: shots need no ammunition. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: item |
arc_permille | Permille | Melee: cosine of half the swept arc in thousandths; 1000 strikes only straight ahead. Range: 0…1000; Unit: permille |
combo | {ToolBlow} | Blows of the rhythm in order; empty means the tool never strikes a body. Items: 0…16 |
damage_type | DamageTypeId | Damage type of every blow and shot of this tool. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: damage_type |
hit_status | StatusId | Status a hit of this tool applies to its target. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: status |
hug_mm | Distance | Melee: bodies this close edge to edge are struck whatever the facing. Range: 0…2147483647; Unit: mm |
id | ContentId | Package-qualified identity; unique within its declaring namespace. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$ |
kind | "tool" | Discriminant |
lift_mm_per_tick | Count | Upward throw of a blow. Range: 0…2147483647; Unit: mm/tick |
projectile | ProjectileKind | Ranged: projectile the tool fires; required exactly for ranged tools. |
reach_mm | Distance | Melee: edge-to-edge reach of a blow. Ranged: range of a shot. Work tools: reach of a stroke. Range: 0…2147483647; Unit: mm |
recover_ticks | PositiveTicks | Recovery after an AI-controlled wielder's blow or shot. Range: 1…2147483647; Unit: tick |
release_ticks | DurationTicks | Ranged: delay from a human's attack to the projectile leaving. Range: 0…2147483647; Unit: tick |
siege_damage | Count | Damage one blow deals to a building or the hearth. Range: 0…2147483647; Unit: hp |
stamina | PositiveCount | Stamina one blow or shot costs its wielder, scaled by the power of the blow (a charged one costs more, a jab less); a wielder out of breath does not strike. Absent: blows cost nothing. Range: 1…2147483647; Unit: count |
targets | PositiveCount | Melee: most bodies one blow strikes, from one to three. Range: 1…2147483647; Unit: count |
windup_ticks | PositiveTicks | Telegraph before an AI-controlled wielder's blow or shot. Range: 1…2147483647; Unit: tick |
Validated example
{
"action": "harvest",
"arc_permille": 300,
"combo": [
{
"damage": 12,
"duration_ticks": 18,
"push_mm_per_tick": 280
}
],
"damage_type": "core:physical",
"hug_mm": 0,
"id": "core:axe_tool",
"kind": "tool",
"lift_mm_per_tick": 0,
"reach_mm": 1350,
"recover_ticks": 20,
"release_ticks": 0,
"siege_damage": 1,
"targets": 1,
"windup_ticks": 13
}