EverambleGAME API / 1

CONTENT CONTRACT · VERSION 1

enemy

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, kind: "enemy", 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

NameTypeMeaning
aggro_mmPositiveDistanceIt notices a foe in sight this close.
Range: 1…2147483647; Unit: mm
alarm_mmPositiveDistanceAllies within this distance join the fight when it spots a player or is struck.
Range: 1…2147483647; Unit: mm
behaviorBehaviorIdBehavior 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
bossBossMarkMarks it as a boss: named on the world map while it lives, with a name plate over its head.
characterCharacterIdCharacter 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_mmPositiveDistanceIt loses a foe farther than this.
Range: 1…2147483647; Unit: mm
descriptionTextKeyCodex description localization key.
Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: text
factionContentIdInitial 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_musicFightMusicFight piece its pursuit calls for.
guard_permillePermilleShare of frontal blows the guard blocks, in thousandths.
Range: 0…1000; Unit: permille
guard_series_permillePermilleAdded block share per blow of the striker's current series (blows in quick succession), in thousandths.
Range: 0…1000; Unit: permille
guard_ticksPositiveTicksHow long a raised guard holds; it blocks every frontal blow meanwhile.
Range: 1…2147483647; Unit: tick
healHealthUseHealing 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.
iconTextureAssetIdCodex 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
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"enemy"Discriminant
leash_mmPositiveDistanceIts 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
lifecycleTransientLifecycleCorpse lifetime; population rules decide any new spawn.
loadoutLoadoutInventory and held weapon; dropped at death except natural weapons.
lootLootIdAdditional items dropped at death.
Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: loot
nameTextKeyLocalization 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_reactionRangedReactionWhat it does when a shot or blow from afar strikes it: roll aside or charge the shooter.
rollsbooleanWhether it dodge-rolls away from a wielder about to strike.
routineAnimalRoutineIdDaily 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
soundsCreatureSoundsIts wind-up, pain, death and idle sounds.
squadEnemySquadIts part in a squad: figures spawned together fight as one, taking turns at a foe (`ruleset.squad`); absent: the defaults of `EnemySquad`.
stamina_per_secondCountStamina it regains per second (its character's maximum stamina caps it; attacks cost the stamina of their tool).
Range: 0…2147483647; Unit: count
temperEnemyTemperIts temper: how it notices, fights, loses and gives up a foe (one state machine for every hostile figure, `docs/server-state.md` §12.7).
threatEnemyThreatThreat memory, hit taunt, proximity preference and switch margin.
xpPositiveCountExperience every player who helped defeat it gains: its killer and the players within 40 m.
Range: 1…2147483647; Unit: count

Validated example

{
  "aggro_mm": 16000,
  "alarm_mm": 16000,
  "character": "core:archer_body",
  "chase_mm": 32000,
  "faction": "core:raiders",
  "fight_music": "danger",
  "guard_permille": 0,
  "guard_series_permille": 0,
  "guard_ticks": 12,
  "heal": {
    "health_below_permille": 350,
    "item": "core:healing_potion",
    "retreat_mm": 8000
  },
  "id": "core:archer",
  "kind": "enemy",
  "leash_mm": 28000,
  "lifecycle": {
    "corpse_ticks": 100
  },
  "loadout": {
    "equipped": "core:shortbow",
    "hotbar": [
      "core:shortbow",
      "core:healing_potion"
    ],
    "items": [
      {
        "count": 1,
        "item": "core:shortbow"
      },
      {
        "count": 30,
        "item": "core:arrow"
      },
      {
        "count": 1,
        "item": "core:healing_potion"
      }
    ],
    "worn": [
      "core:leather_hood",
      "core:leather_vest",
      "core:leather_gloves"
    ]
  },
  "name": "core:archer_body_name",
  "ranged_reaction": {
    "charge_speed_permille": 1000,
    "distance_mm": 5000,
    "evade_permille": 1000
  },
  "rolls": true,
  "sounds": {
    "alert": "core:sound_enemy_archer_alert",
    "death": "core:sound_enemy_archer_death",
    "hurt": "core:sound_enemy_archer_hurt",
    "idle": "core:sound_enemy_archer",
    "windup": "core:sound_bow_draw"
  },
  "squad": {
    "role": "ranged"
  },
  "stamina_per_second": 12,
  "temper": {
    "fight_leash_mm": 48000,
    "lose_after_ticks": 75,
    "search_ticks": 150
  },
  "threat": {
    "hit_bonus": 8,
    "memory_ticks": 250,
    "proximity": 24,
    "switch_margin": 4
  },
  "xp": 20
}