CONTENT CONTRACT · VERSION 1
behavior
A behavior graph the engine evaluates per tick.
Signature
{ id: ContentId, initial_state: Name, kind: "behavior", states: {BehaviorState} }Fields
| Name | Type | Meaning |
|---|---|---|
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}$ |
initial_state | Name | State 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:corvin_mill",
"initial_state": "fight",
"kind": "behavior",
"states": [
{
"action": {
"kind": "moves",
"moves": [
{
"cooldown_ticks": 0,
"id": "hammer",
"reach_mm": 1800,
"tool": "core:corvin_hammer",
"weight": 3
},
{
"area": {
"center": "self",
"kind": "circle",
"radius_mm": 3000
},
"cooldown_ticks": 100,
"id": "sweep",
"reach_mm": 2500,
"strike_look": "core:hill_golem_stomp_strike",
"tool": "core:corvin_sweep",
"weight": 2,
"windup_look": "core:hill_golem_stomp_windup"
}
],
"order": "random"
},
"id": "fight",
"transitions": [
{
"condition": {
"health_permille": 250,
"kind": "health_below"
},
"to": "tired"
},
{
"condition": {
"health_permille": 600,
"kind": "health_below"
},
"to": "grey"
}
]
},
{
"action": {
"kind": "moves",
"moves": [
{
"cooldown_ticks": 0,
"id": "hammer",
"reach_mm": 1800,
"tool": "core:corvin_hammer_grey",
"weight": 3
},
{
"area": {
"center": "self",
"kind": "circle",
"radius_mm": 3000
},
"cooldown_ticks": 75,
"id": "sweep",
"reach_mm": 2500,
"strike_look": "core:hill_golem_stomp_strike",
"tool": "core:corvin_sweep_grey",
"weight": 2,
"windup_look": "core:hill_golem_stomp_windup"
},
{
"area": {
"arc_mdeg": 30000,
"kind": "cone",
"radius_mm": 8000
},
"cooldown_ticks": 250,
"id": "storm",
"reach_mm": 7000,
"strike_look": "core:hill_golem_sweep_strike",
"tool": "core:corvin_storm",
"weight": 2,
"windup_look": "core:hill_golem_sweep_windup"
},
{
"area": {
"center": "self",
"kind": "circle",
"radius_mm": 7000
},
"cooldown_ticks": 300,
"id": "grey_ring",
"reach_mm": 4000,
"strike_look": "core:hill_golem_rune_blast_strike",
"tool": "core:corvin_grey_ring",
"weight": 2,
"windup_look": "core:hill_golem_rune_blast_windup"
}
],
"order": "random"
},
"id": "grey",
"transitions": [
{
"condition": {
"health_permille": 250,
"kind": "health_below"
},
"to": "tired"
}
]
},
{
"action": {
"kind": "moves",
"moves": [
{
"cooldown_ticks": 0,
"id": "hammer",
"reach_mm": 1800,
"tool": "core:corvin_hammer_tired",
"weight": 3
},
{
"area": {
"center": "self",
"kind": "circle",
"radius_mm": 3000
},
"cooldown_ticks": 150,
"id": "sweep",
"reach_mm": 2500,
"strike_look": "core:hill_golem_stomp_strike",
"tool": "core:corvin_sweep_tired",
"weight": 1,
"windup_look": "core:hill_golem_stomp_windup"
}
],
"order": "random"
},
"id": "tired",
"transitions": []
}
]
}