EverambleGAME API / 1

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

NameTypeMeaning
actionToolActionGeneral mechanic the tool drives; never chosen by its wielder.
ammoItemIdRanged: 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_permillePermilleMelee: 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_typeDamageTypeIdDamage 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_statusStatusIdStatus 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_mmDistanceMelee: bodies this close edge to edge are struck whatever the facing.
Range: 0…2147483647; Unit: mm
idContentIdPackage-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_tickCountUpward throw of a blow.
Range: 0…2147483647; Unit: mm/tick
projectileProjectileKindRanged: projectile the tool fires; required exactly for ranged tools.
reach_mmDistanceMelee: edge-to-edge reach of a blow. Ranged: range of a shot. Work tools: reach of a stroke.
Range: 0…2147483647; Unit: mm
recover_ticksPositiveTicksRecovery after an AI-controlled wielder's blow or shot.
Range: 1…2147483647; Unit: tick
release_ticksDurationTicksRanged: delay from a human's attack to the projectile leaving.
Range: 0…2147483647; Unit: tick
siege_damageCountDamage one blow deals to a building or the hearth.
Range: 0…2147483647; Unit: hp
staminaPositiveCountStamina 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
targetsPositiveCountMelee: most bodies one blow strikes, from one to three.
Range: 1…2147483647; Unit: count
windup_ticksPositiveTicksTelegraph 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
}