

They are formally defined for the environments mentioned in the following tables. Spawn rate and max spawns have set values, which are different depending on the environment.

See the following table for a list of enemies that are not considered active. Town NPCs are not considered active NPCs for the purposes of NPC spawning. individual enemies), would otherwise occupy a disproportionate number of NPC slots.

Active enemies exclude many enemies considered part of the same enemy, for example, body and tail parts of worms, because a Giant Worm, which has 6–8 segments (i.e. Most enemies occupy 1 NPC slot by default see the following table for a list of all enemies with a higher or lower number of NPC slots. This means that a new enemy can only be spawned if the sum of the NPC slots of all current active enemies is lower than 5. Since there are 60 ticks in 1 second, there is a 9.52% chance that at least one enemy will spawn in a given second. This means that each tick, there is a chance of 1/600 that an enemy is spawned. There are two variables it takes into consideration when doing so: spawn rate and max spawns, with the spawn rate setting the chance of an enemy spawning at each tick, and the max spawns limiting the number of enemies that are active at a time. The game determines new enemy spawns every tick.
