Skip to content

Adding Mobs

Status: Current Last reviewed: 2026-09-07

Mobs are the goblin family. This page covers placing existing variants and adding a brand-new one.

Placing an Existing Variant

  1. Open /admin.
  2. Pick Mob Spawn from the palette (category mobs) and click the ground where you want the spawn point.
  3. Select it and, in the inspector props, set variant (scrapper, slinger, hexer, or champion) and respawnSeconds.
  4. Save Zone.

A marker-based spawn respawns on its timer after the goblin dies. For throwaway testing, use Spawn Wave or the spawn_mob admin command; those dynamic spawns do not respawn.

Tuning an Existing Variant

Edit the row in GOBLIN_TUNING in server/src/game/entities.ts. Fields: maxHp, speed, sightRange, attackRange, preferredRange, attackCooldown, windup, damage, weight. weight scales knockback resistance, hit-capsule size, and model scale.

Adding a New Variant End to End

Say you want a brute.

  1. Type. Add 'brute' to GoblinVariant in shared/src/types.ts.
  2. Tuning. Add a brute row to GOBLIN_TUNING and a display name to GOBLIN_NAMES in server/src/game/entities.ts.
  3. AI. In server/src/game/ai.ts, decide its behaviour. Melee variants go through meleeBrain; ranged variants hold a band and call startWindup(..., 'ranged', ...). Reuse the scrapper/champion melee path or the slinger/hexer ranged path, or branch a new one.
  4. Model. Add the variant to tools/blender/create_character_models.py, rebuild the Blender library and runtime GLBs, then add the id to CHARACTER_ASSETS in client/src/render/characterAssets.ts. Each export must retain the root, torso, head, armL, armR, legL, legR, heldItem, forearmL, forearmR, shinL, shinR, and cloth animation nodes. See Character models and animation for the atlas and LOD contract.
  5. Loot. Add a case to rollGoblinLoot in server/src/game/entities.ts if it should drop something special.
  6. Ember. If it should feed Ember pressure, add it to EMBER.killGain in shared/src/ember.ts.

Validate with npm run validate:characters and npm run test:characters, type-check with npm run typecheck, then place a Mob Spawn with variant: brute and test.

AI limitation

Goblin steering is open-ground: there is no navmesh yet, so obstacle avoidance is collider push-out plus coarse line-of-sight sampling. Keep spawn points out of tight interiors until pathfinding lands.