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¶
- Open
/admin. - Pick Mob Spawn from the palette (category
mobs) and click the ground where you want the spawn point. - Select it and, in the inspector
props, setvariant(scrapper,slinger,hexer, orchampion) andrespawnSeconds. - 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.
- Type. Add
'brute'toGoblinVariantinshared/src/types.ts. - Tuning. Add a
bruterow toGOBLIN_TUNINGand a display name toGOBLIN_NAMESinserver/src/game/entities.ts. - AI. In
server/src/game/ai.ts, decide its behaviour. Melee variants go throughmeleeBrain; ranged variants hold a band and callstartWindup(..., 'ranged', ...). Reuse the scrapper/champion melee path or the slinger/hexer ranged path, or branch a new one. - Model. Add the variant to
tools/blender/create_character_models.py, rebuild the Blender library and runtime GLBs, then add the id toCHARACTER_ASSETSinclient/src/render/characterAssets.ts. Each export must retain theroot,torso,head,armL,armR,legL,legR,heldItem,forearmL,forearmR,shinL,shinR, andclothanimation nodes. See Character models and animation for the atlas and LOD contract. - Loot. Add a case to
rollGoblinLootinserver/src/game/entities.tsif it should drop something special. - Ember. If it should feed Ember pressure, add it to
EMBER.killGaininshared/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.