ojilox.blogg.se

Terraria npc spawning
Terraria npc spawning








The following table lists some examples for this mechanic. (Note that all products are rounded down to the nearest integer.) If the sum of the NPC slots of all active enemies is lower than 80% and greater than or equal to 60% of max spawns, the denominator of the spawn rate will be multiplied by 0.9.If the sum of the NPC slots of all active enemies is lower than 60% and greater than or equal to 40% of max spawns, the denominator of the spawn rate will be multiplied by 0.8.If the sum of the NPC slots of all active enemies is lower than 40% and greater than or equal to 20% of max spawns, the denominator of the spawn rate will be multiplied by 0.7.If the sum of the NPC slots of all active enemies is lower than 20% of max spawns, the denominator of the spawn rate will be multiplied by 0.6.The fewer active enemies there are, the faster new ones will spawn: Events that are not listed usually employ separate mechanisms to control spawn rates bosses usually occupy enough NPC slots to block most other spawns.Īdditionally, the spawn rate will be modified by the number of active enemies in the area. 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. Maximum number of loops have been performed NPC 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 for 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.










Terraria npc spawning