Spawning in the world¶
NPC classes are normal entities, so they spawn wherever an entity group puts them.
Out in the world¶
Add them to biome groups the same way you would add a zombie:
<configs>
<csv xpath="/entitygroups/entitygroup[@name='ZombiesAll']" op="add">myNpcRaider, .05</csv>
</configs>
The number is the weight within the group, like the zombies' own.
Or give them their own group and reference it from biomes.xml spawn lists.
In buildings¶
Point a sleeper volume group at them in a POI prefab, or append them to a vanilla sleeper group.
Saving and despawning¶
| Spawned by | Saved with the world | Despawns |
|---|---|---|
| Biome or POI spawner | no (like wandering zombies) | when its chunk unloads |
| Console / creative menu | yes | no |
| Hired | yes | never |
Tip
Bandits work best in groups of 2-4 near roads or at a POI, with DSDNpcAim around 0.6 so a fight is winnable.