A hostile is an individual enemy unit that the player fights inside a dungeon room. Hostiles define combat stats and optional loot drops.

Files live in: <pack_root>/data/enemies/hostiles/<group_folder>/<enemy_name>.json

JSON Shape

{
  "group": "pirate",
  "displayName": "enemies.mypack.pirate.raider_frigate",
  "stats": {
    "health": 500,
    "defense": 20,
    "damage": 75,
    "critical.chance": 0.05,
    "attack.rate": 1.5
  },
  "loot": [
    {
      "id": "mypack:ore_iron",
      "chance": 0.8,
      "min": 1,
      "max": 3
    }
  ]
}

Field Reference

FieldTypeRequiredDescription
groupstringβœ…Faction/group slug. Used for AI grouping and lore categorization (e.g. "pirate", "drone").
displayNamestring (lang key)βœ…Registry key for the enemy display name.
statsobjectβœ…Combat statistics. See table below.
lootarrayNoItems dropped when this enemy is defeated.
metaobjectNoArbitrary key-value pairs for engine extensions.

Stats Fields

FieldTypeDescription
healthintegerTotal hit points.
defenseintegerFlat damage reduction per hit.
damageintegerBase damage per attack.
critical.chancefloat (0–1)Probability of a critical hit. 0.1 = 10%.
attack.ratefloatAttacks per second.

Loot Entry Fields

FieldTypeDescription
idstring (registry key)The item that drops.
chancefloat (0–1)Drop probability. 1.0 = always, 0.0 = never.
minintegerMinimum quantity dropped.
maxintegerMaximum quantity dropped.

Stat Scaling Guide

StatWeak (swarm)StandardBoss-tier
health10–50100–500500+
defense01–1015+
damage1–55–2530+
critical.chance0.00.05–0.150.25–0.5
attack.rate3.0–5.0 (fast swarm)1.0–1.50.4–0.8 (slow, heavy)

Example β€” Standard Enemy with Loot

{
  "group": "pirate",
  "displayName": "enemies.mypack.pirate.raider_frigate",
  "stats": {
    "health": 500,
    "defense": 20,
    "damage": 75,
    "critical.chance": 0.05,
    "attack.rate": 1.5
  },
  "loot": [
    { "id": "mypack:ore_iron",   "chance": 0.8, "min": 1, "max": 3 },
    { "id": "mypack:ore_coal",   "chance": 0.5, "min": 2, "max": 5 }
  ]
}

Example β€” Boss

{
  "group": "pirate",
  "displayName": "enemies.mypack.pirate.warlord_dreadnought",
  "stats": {
    "health": 3000,
    "defense": 50,
    "damage": 150,
    "critical.chance": 0.2,
    "attack.rate": 0.5
  },
  "loot": [
    { "id": "mypack:ingot_titanium", "chance": 1.0, "min": 2, "max": 5 },
    { "id": "mypack:alloy_titanite", "chance": 0.3, "min": 1, "max": 1 }
  ]
}