Mobs are spawned using detail generators in Voxel Play world definition.


To change the spawn probability, look for "PirateIsland" world definition and you'll find the spawners in the Content Generators section:


For example, if you want to increase the amount of cannibals in the island, select the "NetworkCannibalSpawner" and increase the probability value:



Please refer to the Voxel Play documentation about Detail Generators for more info about this feature.

In Pirates of Voxel Play we use a simple Prefab Spawner class which allows you to spawn random prefabs as chunks are being generated by Voxel Play. When a chunk is generated, the spawner is called and a random value is checked with the probability value. If it succeeds, and a suitable biome is in that chunk, a random prefab from the list is spawned.


Also note that spawning must be executed on the server. That's why these spawners are called "ServerPrefabSpawner". You can check its code and notice the NetworkServer.Spawn() call to Mirror when the prefab is instantiated.


The spawners only are executed on the server. Pirates of Voxel Play will only enable detail generation on the server (by setting env.enableDetailGenerators = true on the server only - check the WorldState.cs class).