CONTENT CONTRACT · VERSION 1
EnemyDefinition
A hostile actor: its body, gear, loot and fighting tactic.
Signature
{ aggro_mm: PositiveDistance, alarm_mm: (PositiveDistance)?, behavior: (BehaviorId)?, boss: (BossMark)?, character: CharacterId, chase_mm: PositiveDistance, description: (TextKey)?, faction: (ContentId)?, fight_music: FightMusic, guard_permille: Permille, guard_series_permille: Permille, guard_ticks: PositiveTicks, heal: (HealthUse)?, icon: (TextureAssetId)?, id: ContentId, leash_mm: PositiveDistance, lifecycle: TransientLifecycle, loadout: Loadout, loot: (LootId)?, name: TextKey, ranged_reaction: (RangedReaction)?, rolls: boolean, routine: (AnimalRoutineId)?, sounds: CreatureSounds, squad: (EnemySquad)?, stamina_per_second: Count, temper: EnemyTemper, threat: (EnemyThreat)?, xp: (PositiveCount)? }Fields
| Name | Type | Meaning |
|---|---|---|
aggro_mm | PositiveDistance | It notices a foe in sight this close. Range: 1…2147483647; Unit: mm |
alarm_mm | PositiveDistance | Allies within this distance join the fight when it spots a player or is struck. Range: 1…2147483647; Unit: mm |
behavior | BehaviorId | Behavior graph the engine runs for it instead of the standard enemy tactic. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: behavior |
boss | BossMark | Marks it as a boss: named on the world map while it lives, with a name plate over its head. |
character | CharacterId | Character definition supplying body, stats and movement. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: character |
chase_mm | PositiveDistance | It loses a foe farther than this. Range: 1…2147483647; Unit: mm |
description | TextKey | Codex description localization key. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: text |
faction | ContentId | Initial faction declared by the ruleset; if omitted, the definition's own ID must be a declared faction. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$ |
fight_music | FightMusic | Fight piece its pursuit calls for. |
guard_permille | Permille | Share of frontal blows the guard blocks, in thousandths. Range: 0…1000; Unit: permille |
guard_series_permille | Permille | Added block share per blow of the striker's current series (blows in quick succession), in thousandths. Range: 0…1000; Unit: permille |
guard_ticks | PositiveTicks | How long a raised guard holds; it blocks every frontal blow meanwhile. Range: 1…2147483647; Unit: tick |
heal | HealthUse | Healing item of its own inventory: below the health share it backs off from its foe, drinks and fights on; without one left it fights to the end. |
icon | TextureAssetId | Codex portrait, also usable by encounters and quest rewards. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: asset:texture |
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}$ |
leash_mm | PositiveDistance | Its home ground around its post: it roams within half of it, and a squad farther away marches home in formation. Range: 1…2147483647; Unit: mm |
lifecycle | TransientLifecycle | Corpse lifetime; population rules decide any new spawn. |
loadout | Loadout | Inventory and held weapon; dropped at death except natural weapons. |
loot | LootId | Additional items dropped at death. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: loot |
name | TextKey | Localization key for the displayed name. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: text |
ranged_reaction | RangedReaction | What it does when a shot or blow from afar strikes it: roll aside or charge the shooter. |
rolls | boolean | Whether it dodge-rolls away from a wielder about to strike. |
routine | AnimalRoutineId | Daily routine while it is not fighting: roaming about its post or asleep there; without one it stands guard all day. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: animal_routine |
sounds | CreatureSounds | Its wind-up, pain, death and idle sounds. |
squad | EnemySquad | Its part in a squad: figures spawned together fight as one, taking turns at a foe (`ruleset.squad`); absent: the defaults of `EnemySquad`. |
stamina_per_second | Count | Stamina it regains per second (its character's maximum stamina caps it; attacks cost the stamina of their tool). Range: 0…2147483647; Unit: count |
temper | EnemyTemper | Its temper: how it notices, fights, loses and gives up a foe (one state machine for every hostile figure, `docs/server-state.md` §12.7). |
threat | EnemyThreat | Threat memory, hit taunt, proximity preference and switch margin. |
xp | PositiveCount | Experience every player who helped defeat it gains: its killer and the players within 40 m. Range: 1…2147483647; Unit: count |