EverambleGAME API / 1

CONTENT CONTRACT · VERSION 1

behavior

A behavior graph the engine evaluates per tick.

Signature

{ id: ContentId, initial_state: Name, kind: "behavior", states: {BehaviorState} }

Fields

NameTypeMeaning
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}$
initial_stateNameState the graph starts in.
Length: 1…96; Pattern: ^[a-z][a-z0-9_]{0,95}$
kind"behavior"Discriminant
states{BehaviorState}States with unique IDs.
Items: 1…64; Unique entries

Validated example

{
  "id": "core:hill_golem_awake",
  "initial_state": "fight",
  "kind": "behavior",
  "states": [
    {
      "action": {
        "kind": "moves",
        "moves": [
          {
            "cooldown_ticks": 0,
            "id": "smash",
            "reach_mm": 1600,
            "tool": "core:hill_golem_smash",
            "weight": 1
          },
          {
            "cooldown_ticks": 0,
            "id": "smash_again",
            "reach_mm": 1600,
            "tool": "core:hill_golem_smash",
            "weight": 1
          },
          {
            "area": {
              "center": "self",
              "kind": "circle",
              "radius_mm": 5500
            },
            "cooldown_ticks": 150,
            "id": "stomp",
            "reach_mm": 2500,
            "tool": "core:hill_golem_stomp",
            "weight": 1
          },
          {
            "cooldown_ticks": 0,
            "id": "smash_last",
            "reach_mm": 1600,
            "tool": "core:hill_golem_smash",
            "weight": 1
          },
          {
            "area": {
              "arc_mdeg": 120000,
              "kind": "cone",
              "radius_mm": 6000
            },
            "cooldown_ticks": 150,
            "id": "sweep",
            "reach_mm": 4000,
            "tool": "core:hill_golem_sweep",
            "weight": 1
          }
        ],
        "order": "sequence"
      },
      "id": "fight",
      "transitions": []
    }
  ]
}