NPC Manifest Migration Guide
This guide covers migrating existing NPC manifests to support the new magic and ranged attack system introduced in February 2026.What Changed
NPCs can now use magic and ranged attacks, not just melee. This requires new fields in the NPC manifest.New Fields
Combat Configuration
Appearance Configuration
Stats Configuration
Migration Steps
Step 1: Identify Mob Type
Determine which attack type your mob should use:- Melee: Close-range physical combat (swords, fists)
- Ranged: Bow and arrow combat (archers, rangers)
- Magic: Spell casting (wizards, mages)
Step 2: Add Required Fields
- Melee Mob (No Changes)
- Magic Mob
- Ranged Mob
Melee mobs work without any changes. The system defaults to melee if
attackType is not specified.Step 3: Configure Combat Range
Set appropriatecombatRange for the attack type:
| Attack Type | Typical Range | Notes |
|---|---|---|
| Melee | 1 tile | Standard melee range |
| Ranged | 7-10 tiles | Shortbow: 7, Longbow: 10 |
| Magic | 10 tiles | Standard magic range |
Step 4: Add Held Weapon (Optional)
For visual fidelity, add a held weapon model:asset://weapons/shortbow.glb- Shortbow (ranged)asset://weapons/staff.glb- Magic staff (magic)asset://weapons/sword.glb- Sword (melee)
Validation
The system validates NPC configuration at runtime:Testing Your Changes
After updating NPC manifests:- Restart the server - Manifests are loaded at startup
- Spawn the mob - Use admin commands or wait for natural spawn
- Verify attack type - Mob should use correct attack animation
- Check projectiles - Magic/ranged mobs should emit projectiles
- Verify damage - Damage should use correct stat (magic/ranged)
Example: Converting Goblin to Archer
Before (Melee):Backward Compatibility
Fully Backward Compatible: Existing NPC manifests without
attackType continue to work as melee mobs. No breaking changes.attackTypedefaults to"melee"if not specifiedspellIdandarrowIdare optionalheldWeaponModelis optionalmagicandrangedstats default to 1 if not specified
Common Issues
Mob Not Attacking
Symptom: Mob aggros but doesn’t attack Possible Causes:- Missing
spellIdfor magic mob → Check console for warning - Missing
arrowIdfor ranged mob → Check console for warning combatRangetoo low → Increase to 7-10 for projectile attacks- Invalid spell/arrow ID → Verify ID exists in spell/ammunition manifest
Weapon Not Showing
Symptom: Mob attacks correctly but no weapon visible Possible Causes:heldWeaponModelpath incorrect → Verifyasset://prefix- Weapon GLB not found → Check asset CDN for file
- VRM model missing hand bones → Verify model has
rightHandbone - Weapon cache not loading → Check browser console for GLTFLoader errors
Wrong Animation Playing
Symptom: Mob uses wrong attack animation Possible Causes:attackTypenot set → Defaults to melee (COMBATanimation)- Typo in
attackType→ Must be exactly"melee","ranged", or"magic" - Animation not in emote map → Verify mob model has required animation