NPC spawning

From Terraria Wiki
Jump to navigation Jump to search
Information.svg
Note: The term NPC on this page refers to any entity that is not controlled by a player.
Friendly automated characters will be referred to as "friendly town NPCs".
See also: NPC despawning

In Terraria, enemies, critters, and other NPCs will spawn off-screen and enter the screen area based on their AI. The rate at which NPCs are spawned, the maximum number of NPCs, and the type of NPCs spawned are all dependent on the time of day, biome, the tile type of the ground, and other factors.

Note that for the purpose of NPC spawning, the term "friendly town NPCs" includes all friendly NPCs that can move into houses, Traveling Merchant, Old Man, and town pets(Desktop, Console and Mobile versions), but does not include the Skeleton Merchant(Desktop, Console and Mobile versions).

Spawn limits

The number of NPCs that can exist at the same time is capped at 200.[1] Each NPC instance existing in the world (including friendly NPCs) will occupy one of the 200 slots.

When Moon Lord is alive, no NPCs will be spawned for players that are less than 281.25 tiles from the Moon Lord's Core.[2]

When all NPC slots are occupied and there is a new NPC spawn attempt, the game will check for "replaceable" NPCs. If there is a replaceable NPC, that NPC will be directly replaced with the spawning NPC. If no replaceable NPCs exist, the spawn attempt will fail and do nothing.[3]

The following types of NPC are considered replaceable:[4]

Spawn rates

Basics

The game determines new NPC spawns every tick.[5] 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 NPC spawning at each tick, and the max spawns limiting the number of NPCs that are active at a time.[6]

The default spawn rate is 1/600.[7] This means that each tick, there is a chance of 1/600 (0.17%) that an NPC is spawned. Since there are 60 ticks in 1 second, there is a 9.52% chance that at least one NPC will spawn in a given second.

The default max spawns is 5.[8] This means that a new NPC can only be spawned if the effective NPC count[9] of all current active NPCs is lower than 5. By default, an NPC counts as 1 NPC (i.e. effective NPC count is 1); see the following tables for a list of NPCs that has non-default effective NPC count, and a list of NPCs that are considered inactive.

Additional notes:[10]

 NPCs with non-default effective NPC count 
NPC Effective NPC count
Stingy Hornet.gif Big Stingy Hornet 1.21
Stingy Hornet.gif Little Stingy Hornet 0.87
Spikey Hornet.gif Big Spikey Hornet 1.16
Spikey Hornet.gif Little Spikey Hornet 0.78
Leafy Hornet.gif Big Leafy Hornet 1.1
Leafy Hornet.gif Little Leafy Hornet 0.92
Honey Hornet.gif Big Honey Hornet 1.15
Honey Hornet.gif Little Honey Hornet 0.8
Fatty Hornet.gif Big Fatty Hornet 1.25
Fatty Hornet.gif Little Fatty Hornet 0.85
Raincoat Zombie.gif Big Raincoat Zombie 1.1
Raincoat Zombie.gif Small Raincoat Zombie 0.9
Pantless Skeleton.gif Big Pantless Skeleton 1.15
Pantless Skeleton.gif Small Pantless Skeleton 0.85
Misassembled Skeleton.gif Big Misassembled Skeleton 1.13
Misassembled Skeleton.gif Small Misassembled Skeleton 0.87
Headache Skeleton.gif Big Headache Skeleton 1.07
Headache Skeleton.gif Small Headache Skeleton 0.93
Skeleton.gif Big Skeleton 1.1
Skeleton.gif Small Skeleton 0.9
Female Zombie.gif Big Female Zombie 1.05
Female Zombie.gif Small Female Zombie 0.87
Demon Eye.gif Demon Eye (Variant 2) 1.15
Purple Eye.gif Purple Eye (Variant 2) 1.1
Green Eye.gif Green Eye (Variant 2) 0.85
Dilated Eye.gif Dilated Eye (Variant 2) 0.9
Sleepy Eye.gif Sleepy Eye (Variant 2) 1.1
Cataract Eye.gif Cataract Eye (Variant 2) 1.15
Twiggy Zombie.gif Big Twiggy Zombie 1.08
Twiggy Zombie.gif Small Twiggy Zombie 0.92
Swamp Zombie.gif Big Swamp Zombie 1.13
Swamp Zombie.gif Small Swamp Zombie 0.87
Slimed Zombie.gif Big Slimed Zombie 1.11
Slimed Zombie.gif Small Slimed Zombie 0.89
Pincushion Zombie.gif Big Pincushion Zombie 1.13
Pincushion Zombie.gif Small Pincushion Zombie 0.93
Bald Zombie.gif Big Bald Zombie 1.15
Bald Zombie.gif Small Bald Zombie 0.85
Zombie.gif Big Zombie 1.1
Zombie.gif Small Zombie 0.9
Crimslime.gif Big Crimslime 1.15
Crimslime.gif Little Crimslime 0.85
Crimera.gif Big Crimera 1.15
Crimera.gif Little Crimera 0.85
Moss Hornet.gif Giant Moss Hornet 1.8
Moss Hornet.gif Big Moss Hornet 1.65
Moss Hornet.gif Little Moss Hornet 1.35
Moss Hornet.gif Tiny Moss Hornet 1.2
Hornet.gif Big Stinger 1.2
Hornet.gif Little Stinger 0.85
Armored Skeleton.gif Heavy Skeleton 2
Angry Bones 1.gif Big Boned 2
Eater of Souls.gif Big Eater 1.15
Eater of Souls.gif Little Eater 0.85
Eye of Cthulhu (Phase 1).gif Eye of Cthulhu 5
Devourer Head.png Devourer Head 3.5
Eater of Worlds Head.png Eater of Worlds Head 5
Mother Slime.gif Mother Slime 2
Fire Imp.gif Fire Imp 3
Dark Caster.png Dark Caster 2
Cursed Skull.gif Cursed Skull 0.75
Skeletron Head.png Skeletron Head 6
Bone Serpent Head.png Bone Serpent Head 6
Cave Bat.gif Cave Bat 0.5
King Slime.gif King Slime 5
Jungle Bat.gif Jungle Bat 0.5
Piranha.gif Piranha 0.5
Hellbat.gif Hellbat 0.5
Demon.gif Demon 2
Voodoo Demon.gif Voodoo Demon 2
Spike Ball.png Spike Ball 0.3
Dungeon Slime.gif Dungeon Slime 2
Blazing Wheel.gif Blazing Wheel 0.3
Bird (NPC).png Bird 0.4
Wyvern Head.png Wyvern Head 5
Giant Bat.gif Giant Bat 0.5
World Feeder Head.png World Feeder Head 3.5
Angler Fish.gif Angler Fish 0.5
Wall of Flesh.gif Wall of Flesh 10
Retinazer (first form).gif Retinazer 5
Spazmatism (first form).gif Spazmatism 5
Skeletron Prime head.gif Skeletron Prime 6
The Destroyer Head.png The Destroyer Head 5
The Destroyer Body.png The Destroyer Body 5
The Destroyer Tail.png The Destroyer Tail 5
Ice Bat.gif Ice Bat 0.5
Lava Bat.gif Lava Bat 0.5
Giant Flying Fox.gif Giant Flying Fox 0.5
Giant Tortoise.gif Giant Tortoise 2
Ice Tortoise.gif Ice Tortoise 1.5
Red Devil.gif Red Devil 2
Arapaima.gif Arapaima 0.5
Vampire Bat.gif Vampire Bat 2
Vampire.gif Vampire 2
Black Recluse (ground).gif Black Recluse 0.5
Wall Creeper (ground).gif Wall Creeper 0.5
Wall Creeper.gif Wall Creeper (On Wall) 0.5
Moss Hornet.gif Moss Hornet 1.5
Queen Bee.gif Queen Bee 7
Flying Snake.gif Flying Snake 0.5
Jungle Creeper.gif Jungle Creeper 0.75
Jungle Creeper2.gif Jungle Creeper (On Wall) 0.75
Black Recluse.gif Black Recluse (On Wall) 0.5
Blood Feeder.gif Blood Feeder 0.5
Golem Core.png Golem Body 5
Parrot.gif Parrot 0.5
Fungo Fish.gif Fungo Fish 0.3
Anomura Fungus.gif Anomura Fungus 0.3
Mushi Ladybug.gif Mushi Ladybug 0.3
Fungi Bulb.png Fungi Bulb 0.3
Giant Fungi Bulb.png Giant Fungi Bulb 0.3
Fungi Spore.png Fungi Spore 0
Plantera (First form).gif Plantera 16
Spore.png Spore 0
Brain of Cthulhu (First Phase).gif Brain of Cthulhu 6
Ragged Caster.png Ragged Caster 2
Open Coat Ragged Caster.png Open Coat Ragged Caster 2
Necromancer.png Necromancer 2
Armored Necromancer.png Armored Necromancer 2
Diabolist.png Red Diabolist 2
White Diabolist.png White Diabolist 2
Giant Cursed Skull.gif Giant Cursed Skull 0.75
Blue Jay.png Blue Jay 0.4
Cardinal.png Cardinal 0.4
Mouse.gif Mouse 0.25
Hoppin' Jack.gif Hoppin' Jack 0.3
Scarecrow 1.gif Scarecrow 0.5
Scarecrow 2.gif Scarecrow (Variant 2) 0.5
Scarecrow 3.gif Scarecrow (Variant 3) 0.5
Scarecrow 4.gif Scarecrow (Variant 4) 0.5
Scarecrow 5.gif Scarecrow (Variant 5) 0.5
Scarecrow 6.gif Scarecrow (Variant 6) 0.5
Scarecrow 7.gif Scarecrow (Variant 7) 0.5
Scarecrow 8.gif Scarecrow (Variant 8) 0.5
Scarecrow 9.gif Scarecrow (Variant 9) 0.5
Scarecrow 10.gif Scarecrow (Variant 10) 0.5
Mourning Wood.gif Mourning Wood 3
Pumpking head.gif Pumpking 5
Pumpking Hand.png Pumpking Blade 0
Zombie Elf.gif Zombie Elf 0.5
Zombie Elf Beard.gif Beard Zombie Elf 0.5
Zombie Elf Girl.gif Girl Zombie Elf 0.5
Yeti.gif Yeti 2
Everscream.gif Everscream 3
Ice Queen.png Ice Queen 5
Santa-NK1 phase 1.gif Santa-NK1 4
Elf Copter.gif Elf Copter 1.5
Nutcracker.gif Nutcracker 1.5
Nutcracker 2.gif Spinning Nutcracker 1.5
Krampus.gif Krampus 1.75
Flocko.gif Flocko 2
Firefly.gif Firefly 0.2
Julia Butterfly.gif Monarch Butterfly.gif Purple Emperor Butterfly.gif Red Admiral Butterfly.gif
Sulphur Butterfly.gif Tree Nymph Butterfly.gif Ulysses Butterfly.gif Zebra Swallowtail Butterfly.gif
Butterfly
0.25
Worm.gif Worm 0.1
Lightning Bug.gif Lightning Bug 0.2
Snail.gif Snail 0.5
Glowing Snail.gif Glowing Snail 0.5
Duke Fishron (First Form).gif Duke Fishron 10
Truffle Worm (NPC).gif Truffle Worm 0.15
Truffle Worm2 (NPC).gif Truffle Worm 0.15
Grasshopper.gif Grasshopper 0.1
Cultist Archer.gif Blue Cultist Archer 0
White Cultist Archer.gif White Cultist Archer 0
Bubble Shield.png Bubble Shield 0
Gray Grunt.gif Gray Grunt 0.75
Martian Drone.gif Martian Drone 1.5
Gigazapper.gif Gigazapper 0.5
Scutlix Gunner.png Scutlix Gunner 0.5
Scutlix.gif Scutlix 0.5
Martian Saucer.gif Martian Saucer 0
Martian Saucer Core.gif Martian Saucer Core 6
Moon Lord's Head.gif Moon Lord's Head 6
Moon Lord's Hand.gif Moon Lord's Hand 6
Moon Lord's Core.gif Moon Lord's Core 6
Martian Probe.gif Martian Probe 0
True Eye of Cthulhu.gif True Eye of Cthulhu 0
Moon Leech Clot.png Moon Leech Clot 0
Star Cell.gif Star Cell 2
Flow Invader.gif Flow Invader 3
Twinkle Popper.gif Twinkle Popper 3
Twinkle.gif Twinkle 0.5
Crawltipede (Head).png Crawltipede Head 2
Crawltipede (Body).png Crawltipede Body 0
Crawltipede (Tail).png Crawltipede Tail 0
Sroller.gif Sroller 2
Nebula Floater.gif Nebula Floater 3
Vortex Pillar.png Vortex Pillar 0
Predictor.gif Predictor 2
Alien Hornet.gif Alien Hornet 0.5
Vortexian.gif Vortexian 2
Mysterious Tablet.gif Mysterious Tablet 0
Lunatic Devotee.gif Lunatic Devotee 0
Lunatic Cultist.gif Lunatic Cultist 10
Ancient Cultist.gif Lunatic Cultist 0
Gold Bird.png Gold Bird 0.4
Gold Butterfly.gif Gold Butterfly 0.25
Gold Grasshopper.gif Gold Grasshopper 0.1
Gold Mouse.gif Gold Mouse 0.25
Gold Worm.gif Gold Worm 0.1
Skeleton Merchant.png Skeleton Merchant 7
Phantasm Dragon (Head).png Phantasm Dragon Head 5
Fritz.gif Fritz 0.5
Shadowflame Apparition.gif Shadowflame Apparition 0.1
Mothron Egg.png Mothron Egg 0
Baby Mothron.gif Baby Mothron 0.1
Granite Elemental.gif Granite Elemental 0.5
Enchanted Nightcrawler.gif Enchanted Nightcrawler 0.1
Grubby.gif Grubby 0.1
Sluggy.gif Sluggy 0.1
Buggy.gif Buggy 0.1
Stardust Pillar.png Stardust Pillar 0
Nebula Pillar.png Nebula Pillar 0
Dune Splicer (Head).png Dune Splicer Head 5
Dune Splicer (Body).png Dune Splicer Body 0
Dune Splicer (Tail).png Dune Splicer Tail 0
Tomb Crawler (Head).png Tomb Crawler Head 4
Tomb Crawler (Body).png Tomb Crawler Body 0
Tomb Crawler (Tail).png Tomb Crawler Tail 0
Solar Pillar.png Solar Pillar 0
Ghoul.gif Ghoul 0.5
Vile Ghoul.gif Vile Ghoul 0.5
Tainted Ghoul.gif Tainted Ghoul 0.5
Dreamer Ghoul.gif Dreamer Ghoul 0.5
Basilisk.gif Basilisk 0.75
Desert Spirit.gif Desert Spirit 2
Sand Slime.gif Sand Slime 2
Eternia Crystal (NPC).png Eternia Crystal 0
Mysterious Portal.gif Mysterious Portal 0
Betsy.gif Betsy 0
Etherian Goblin.gif Etherian Goblin (T1) 0
Etherian Goblin 2.gif Etherian Goblin (T2) 0
Etherian Goblin 3.gif Etherian Goblin (T3) 0
Etherian Goblin Bomber.gif Etherian Goblin Bomber (T1) 0
Etherian Goblin Bomber 2.gif Etherian Goblin Bomber (T2) 0
Etherian Goblin Bomber 3.gif Etherian Goblin Bomber (T3) 0
Etherian Wyvern.gif Etherian Wyvern (T1) 0
Etherian Wyvern 2.gif Etherian Wyvern (T2) 0
Etherian Wyvern 3.gif Etherian Wyvern (T3) 0
Etherian Javelin Thrower.gif Etherian Javelin Thrower (T1) 0
Etherian Javelin Thrower 2.gif Etherian Javelin Thrower (T2) 0
Etherian Javelin Thrower 3.gif Etherian Javelin Thrower (T3) 0
Dark Mage.gif Dark Mage (T1) 0
Dark Mage.gif Dark Mage (T3) 0
Old One's Skeleton.gif Old One's Skeleton (T1) 0
Old One's Skeleton.gif Old One's Skeleton (T3) 0
Wither Beast.gif Wither Beast (T2) 0
Wither Beast.gif Wither Beast (T3) 0
Drakin 1.gif Drakin (T2) 0
Drakin 2.gif Drakin (T3) 0
Kobold.gif Kobold (T2) 0
Kobold.gif Kobold (T3) 0
Kobold Glider.gif Kobold Glider (T2) 0
Kobold Glider.gif Kobold Glider (T3) 0
Ogre.gif Ogre (T2) 0
Ogre.gif Ogre (T3) 0
Etherian Lightning Bug.gif Etherian Lightning Bug 0
Antlion Charger.gif Antlion Charger 0.8
Antlion Swarmer.gif Antlion Swarmer 0.8
Antlion Larva.gif Antlion Larva 0.4
Black Dragonfly.gif Black Dragonfly 0.25
Blue Dragonfly.gif Blue Dragonfly 0.25
Green Dragonfly.gif Green Dragonfly 0.25
Orange Dragonfly.gif Orange Dragonfly 0.25
Red Dragonfly.gif Red Dragonfly 0.25
Yellow Dragonfly.gif Yellow Dragonfly 0.25
Gold Dragonfly.gif Gold Dragonfly 0.25
Ladybug.gif Ladybug 0.25
Gold Ladybug.gif Gold Ladybug 0.25
Maggot.gif Maggot 0.1
Rat.gif Rat 0.25
Owl.gif Owl 0.4
Water Strider.gif Water Strider 0.25
Gold Water Strider.gif Gold Water Strider 0.25
Hemogoblin Shark.gif Hemogoblin Shark 0
Blood Eel Head.png Blood Eel Head 5
Blood Eel Body.png Blood Eel Body 0
Blood Eel Tail.png Blood Eel Tail 0
Spore Bat.gif Spore Bat 0.5
Empress of Light.gif Empress of Light 16
Hell Butterfly.gif Hell Butterfly 0.25
Lavafly.gif Lavafly 0.2
Magma Snail.gif Magma Snail 0.5
Queen Slime.png Queen Slime 5
Prismatic Lacewing.gif Prismatic Lacewing 0.25
Deerclops.png Deerclops 10
Stinkbug.gif Stinkbug 0.25
Faeling.gif Faeling 0.2
 NPCs that are considered inactive[a][10]
The following NPCs are considered inactive only when a Mysterious PortalMysterious Portal exists

Natural spawn rates

Key
1/x: spawn rate
y: max spawns

Spawn rate and max spawns have set values, which are different depending on the environment. They are formally defined for the environments mentioned in the following tables. Events that are not listed usually employ separate mechanisms to control spawn rates; bosses usually have high effective NPC counts to block most other spawns.

Pre-Hardmode

Biome/Event/
Boss fight
Surface Underground Cavern Underworld
Day Night Blood Moon[b]

ForestForest

DesertDesert

Snow biomeSnow biome[c]

1/600
5
1/360
6
1/108
10
1/300
8
1/240
9
1/600
10
JungleJungle(no friendly town NPCs
nearby)[d]
1/240
7
1/144
9
1/43[e]
15
1/120
12
1/96
13
n/a
JungleJungle(1 friendly town NPC
nearby)[f]
1/330
7
1/198
8
1/59[e]
14
1/165
11
1/132
12
n/a
JungleJungle(2 friendly town NPCs
nearby)[f]
1/420
6
1/251
7
1/75
13
1/210
10
1/168
11
n/a
JungleJungle(3 or more friendly town
NPCs nearby)[f]
1/510
6
1/306
7
1/91
12
1/255
9
1/204
10
n/a

The CorruptionCorruption

The CrimsonCrimson

1/390
6
1/234
7
1/70
13
1/195
10
1/156
11
n/a
DungeonDungeon n/an/an/a1/90
14
1/72
16[g]
n/a
Meteorite (biome)Meteorite[h] 1/240
5
1/144
6
1/43[e]
11
1/120
8
1/96
9
n/a
Jungle TempleJungle Temple[i] 1/480
6
1/288
7
1/86
12
1/240
9
1/192
10
n/a
SandstormSandstorm(Desktop, Console and Mobile versions) 1/540
6
1/324
7
1/97
12
n/an/an/a
Underground DesertUnderground
Desert
(Desktop, Console and Mobile versions)
1/120
15
1/72
18[g]
1/21[e]
30[g]
1/60
24[g]
1/48[e]
27[g]
n/a
Goblin ArmyGoblin Army 1/20
10 + 1.5 per player
n/a n/a n/a
Wall of FleshWall of
Flesh
fight
n/a n/a n/a n/a n/a 1/1800
3
The HallowHallow[j] 1/600
5
1/360
6
1/108
10
1/300
8
1/156
11
n/a

Hardmode

Biome/Event/
Boss fight
Surface Underground Cavern Underworld
Day Night Blood Moon[b] Solar Eclipse[k]

ForestForest

DesertDesert

Snow biomeSnow biome[c]

1/540
6
1/324
7
1/97
12
1/108
11
1/243
10
1/216
11
1/540
12
JungleJungle(no friendly town NPCs
nearby)[d]
1/216
9
1/129
10
1/38[e]
18[g]
1/43[e]
16[g]
1/97
15
1/86
16[g]
n/a
JungleJungle(1 friendly town NPC
nearby)[f]
1/297
8
1/178
9
1/53[e]
16[g]
1/59[e]
15
1/133
14
1/118
15
n/a
JungleJungle(2 friendly town NPCs
nearby)[f]
1/378
7
1/226
9
1/67
15
1/75
14
1/170
13
1/151
14
n/a
JungleJungle(3 or more friendly town
NPCs nearby)[f]
1/459
7
1/275
8
1/82
14
1/91
13
1/206
12
1/183
13
n/a

The CorruptionCorruption

The CrimsonCrimson

1/351
7
1/210
9
1/63
15
1/70
14
1/157
13
1/140
14
n/a
DungeonDungeon n/an/an/an/a1/72
18[g]
1/64
19[g]
n/a
Meteorite (biome)Meteorite[h] 1/216
6
1/129
7
1/38[e]
13
1/43[e]
12
1/97
11
1/86
12
n/a
Jungle TempleJungle Temple[i] 1/432
7
1/259
8
1/77
14
1/86
13
1/194
12
1/172
13
n/a
SandstormSandstorm(Desktop, Console and Mobile versions) 1/216
9
1/129
10
1/38[e]
18[g]
1/43[e]
16[g]
n/an/an/a
Underground DesertUnderground
Desert
(Desktop, Console and Mobile versions)
1/108
18[g]
1/64
21[g]
1/19[e]
36[g]
1/21[e]
33[g]
1/48[e]
30[g]
1/43[e]
33[g]
n/a

Goblin ArmyGoblin Army

Frost LegionFrost Legion

Pirate InvasionPirate Invasion

Martian MadnessMartian
Madness
(Desktop, Console and Mobile versions)

Lunar EventsLunar Events(Desktop, Console and Mobile versions)

1/20
10 + 1.5 per player
n/a n/a n/a
Wall of FleshWall of
Flesh
fight
n/a n/a n/a n/a n/a n/a 1/1620
3
The HallowHallow 1/540
6
1/324
7
1/97
12
1/108
11
1/243
10
1/157
13
n/a

Additionally, the spawn rate will be modified by the number of active NPCs in the area. The fewer active NPCs there are, the faster new ones will spawn:

  • If effective NPC count of all active NPCs is lower than 20% of max spawns, the denominator of the spawn rate will be multiplied by 0.6.
  • If effective NPC count of all active NPCs is lower than 40% and greater or equal 20% of max spawns, the denominator of the spawn rate will be multiplied by 0.7.
  • If effective NPC count of all active NPCs is lower than 60% and greater or equal 40% of max spawns, the denominator of the spawn rate will be multiplied by 0.8.
  • If effective NPC count of all active NPCs is lower than 80% and greater or equal 60% of max spawns, the denominator of the spawn rate will be multiplied by 0.9.

(Note that all products are rounded down if they are decimals.)

The following table lists some examples for this mechanic. It is to be read in the following way: If the natural spawn rate and max spawns (as determined from the overview above) and effective NPC count of all active NPCs are equal to the values in the first three columns, then the spawn rate is altered as shown in the last column.

Examples
Spawn rate Max spawns Effective NPC count Altered spawn rate
1/600 6 0.8
(13.3% of max spawns)
1/360
1/173 15 10
(66.7% of max spawns)
1/155
1/430 12 10
(83.3% of max spawns)
1/430

A second pass of this is performed if the player is in The Corruption or The Crimson or below the vertical center of the Underground layer:

  • If effective NPC count of all active NPCs is lower than 20% of max spawns, the denominator of the spawn rate will be multiplied by 0.7.
  • If effective NPC count of all active NPCs is lower than 40% and greater or equal 20% of max spawns, the denominator of the spawn rate will be multiplied by 0.9.

Manual alteration of spawn rates

Certain items can be used to change the spawn rate and max spawns when used or placed, as per the following table.[11] All effects are multiplicative rather than additive.

Item Spawn rate factor[l] Effective spawn rate Max spawns
Water CandleWater Candle(also if held) 1/0.75 +33% +50%
Battle PotionBattle Potion 1/0.5 +100% +100%
Calming PotionCalming Potion (Desktop, Console and Mobile versions) 1/1.65
(Old-gen console and 3DS versions) 1/1.2
(Desktop, Console and Mobile versions) −39%
(Old-gen console and 3DS versions) −17%
(Desktop, Console and Mobile versions) −40%
(Old-gen console and 3DS versions) −20%
SunflowerSunflower((Desktop, Console and Mobile versions) only) 1/1.2 −17% −20%
Peace CandlePeace Candle(Desktop, Console and Mobile versions)(also if held) 1/1.3 −23% −30%
Invisibility PotionInvisibility Potion((Desktop, Console and Mobile versions) only) 1/1.2 −17% −20%
Angler armorAngler armor(set bonus; (Desktop, Console and Mobile versions) only) 1/1.3 −23% −30%
FairyFairyFairyFairy(Desktop, Console and Mobile versions)(having at least one Fairy
within 120 tiles)
1/1.2 −17% −20%

These effects do not stack with themselves, i.e., a single Water Candle, Peace Candle, or Sunflower has the same effect as multiple of each one.

On the Old-gen console version Old-gen console version and Nintendo 3DSNintendo 3DS version version, placed and held Water Candles stack with each other.

Water and Peace Candles cancel each other out, even though they do not alter spawn rates by the same absolute values. If both are active (e.g. a Peace Candle is held while a Water Candle is placed nearby), none is applied.

On Desktop version Desktop, Console version Console, and Mobile version Mobile, there is one exception to this: Water Candles placed (explicitly not held) in Space[m] always increase spawn rates, regardless of nearby Peace Candles. Their effectiveness depends on nearby Peace Candles, however:

Item Spawn rate factor[l] Effective spawn rate Max spawns
Water CandleWater Candleplaced in Space(with no Peace Candle held or placed nearby) 1/0.375 +167% +50%
Water CandleWater Candleplaced in Space(with a Peace Candle held or placed nearby) 1/0.5 +100% +50%

Up to this point, spawn rates cannot be increased to fractions greater than 1/60 and max spawns cannot be increased to values greater than 15. Both will be cut off there. The spawn rates and max spawns of the invasion events listed in the tables above are exempt from this. There is no lower limit for spawn rates and max spawns.

Effect of friendly town NPCs on spawn rates

The presence of nearby friendly town NPCs generally reduces spawn rates and max spawns.[12] All friendly town NPCs within a 240×135-tile rectangle centered on the player are considered.[13]

On Desktop version Desktop, Console version Console, and Mobile version Mobile, this effect is adjusted in the Underworld and in Graveyards.

These effects are greatly reduced when the player is in range of any invasion.

None of these effects will apply under any of these circumstances:

When there are friendly town NPCs nearby, the player is considered as in front of safe walls. However, this effect is not guaranteed if the player is in Underworld ("safe wall chance" in the following table). They also increases the chance for using a special critter spawning pool ("critter chance" in the following table) instead of the ordinary spawning pool (which is a mixture of enemies and critters). If that happens, the max spawn will be reduced, otherwise the spawn rate will be reduced.

(Desktop, Console and Mobile versions) Anywhere in the world
above the Underworld and outside of a Graveyard
Number of nearby
friendly town NPCs
Safe wall chance Critter chance Critter
max spawns
Spawn rate [l][n] Effective spawn rate[o]
1 100% 1/3 (33.33%) 60% 1/2 (50%) 1/3 (33.33%) [p]
2 100% 2/3 (66.67%) 60% 1/3 (33.33%) 1/9 (11.11%) [q]
≥3 100% 100% [r] 60% 1 [s] 0 [t]
(Desktop, Console and Mobile versions) In the Underworld
Number of nearby
friendly town NPCs
Safe wall chance Critter chance Critter
max spawns
Spawn rate [l][n] Effective spawn rate [o]
1 1/2 (50%) 1/10 (10%) 50% 1/1.25 (80%) 18/25 (72%) [u]
2 3/4 (75%) 1/5 (20%) 50% 1/1.5 (66.67%) 8/15 (53.33%) [v]
≥3 9/10 (90%) 1/3 (33.33%) 50% 1/2 (50%) 1/3 (33.33%) [w]
In a Graveyard(Desktop, Console and Mobile versions)
Number of nearby
friendly town NPCs
Safe wall chance Critter chance Critter
max spawns
Spawn rate[l][x] Effective spawn rate[o]
1 100% 1/9 (11.11%) 60% 1/1.66 (60.24%) 8/15 (53.33%) [y]
2 100% 1/6 (16.67%) 60% 1/2.33 (42.92%) 5/14 (35.71%) [z]
≥3 100% 1/3 (33.33%) 60% 1/3 (33.33%) 2/9 (22.22%) [aa]
(Old-gen console and 3DS versions) Anywhere in the world
Number of nearby
friendly town NPCs
Spawn rate factor[l] Effective spawn rate Max spawns
1 1/1.2[ab] −17% −27%[ac]
2 1/1.8[ad] −44% −13%[ae]
≥3 n/a[t] n/a[t] −40%

When 3 or more friendly town NPCs are present nearby, a town(Desktop, Console and Mobile versions) mini-biome is formed and no enemies will spawn. This is only valid for areas outside of the Underworld and Graveyards, and only for Classic worlds – in Expert Mode(Desktop, Console and Mobile versions), there is still a 1/30 (3.33%) chance an enemy may spawn that tick. Enemies from events as well as bosses (and their servants) will bypass this restriction.

Journey Mode

Spawn rates can be manually altered in Journey Mode(Desktop, Console and Mobile versions), from 0× (disabling spawns) to 10× the normal rate. Even with the spawn rate set to 0×, bosses may still be summoned, mining up Tombstones can still cause Ghosts to spawn, and certain Celestial Pillar enemies can spawn.

Spawn locations

Each player in the game will spawn their own NPCs. If two players are in the same area, NPCs will appear twice as fast as they would with only one player. Max Spawns rule are still used, which means that even if 2 players are in the same spot, it is impossible to gather 30 normal NPCs near the spot. Note that some NPCs count as more than or less than 1 NPC. See above for details.

Choosing a spot to spawn the NPC

Spawn area illustration.Verify
Spawning range and conditions.

When the game decides to spawn an NPC, it will first choose a random tile within a rectangle around the player (specifically, the tile containing the top left corner of the player's hitbox). The maximum distance from the player it can choose from is 84 tiles west, 83 east, 46 up, and 45 down. [14]

Using certain items causes NPCs to spawn further out than normal. Equipping a Rifle Scope or Sniper Scope does so only when the player has a compatible gun selected, whether or not the player is zoomed out.

Items Spawn range Safe range
Horizontal Vertical Horizontal Vertical
Normal 84 46 62 34
Rifle Scope (or its upgrades) 114 62 92 50
Binoculars 124 68 102 56
Sniper Rifle 124 68 102 56
Sniper Rifle with Rifle Scope (or its upgrades) 132 72 110 60

Note: If using the Depth Meter, Compass, or similar, each tile is equal to 2 feet, so double all measurements to get distances in feet

The game then starts checking whether the chosen tile is valid for spawning:

If the tile chosen is a solid tile (includes all solid blocks, platforms, Planter Boxes, and Bubble)[15], or it has a safe wall that blocks enemies from spawning, the attempt is considered invalid. Tiles that are actuated out do not count as solid.

The game then checks whether this is a Space NPC spawning attempt. The height of the chosen tile has to be in Space, >65% altitude (and not within the central 10% of the world horizontally during pre-Hardmode), or >55% altitude during Hardmode (See Space § Notes for details). If it is not a flying NPC spawning attempt, the game checks the tiles directly below the chosen tile to find a solid tile. If there is no solid tile within the spawning area (up to 45 tiles down to the player) or the block is within the safe area (starting from the tile containing the top left corner of the player's hitbox, 62 tiles west, 61 east, 35 up and 34 down), the attempt is considered invalid. Note that a flying NPC spawning attempt will not be considered invalid even if the chosen tile is within the safe area during this stage.

After that, the game checks the 2×3 area above the chosen tile to see if there is enough space for spawning. If any of the 6 tiles are outside of the true world border, solid, or contains lava, the attempt is considered invalid. Note that the area is 1 tile left of the chosen tile as shown in the image.

The game checks the 2×3 area (red) above the chosen tile (green), a stair from top-left to bottom-right will block NPC spawning, while a stair from top-right to bottom-left will not.

The process described above will repeat at most 50 times to find a valid spawning tile. However, the attempt may still fail for the following reasons (there will be no retrying in these cases):

Choosing a type of NPC to spawn

After a valid tile has been chosen, the game will then determine what type of NPC should be spawned.

When choosing NPCs to spawn, enemies that can pass through solid blocks (e.g. Wyvern, Chaos Elemental, Floaty Gross, etc.) will not be chosen if the player is in front of any safe wall. This effect can be negated by the Shadow Candle(Desktop, Console and Mobile versions). However, these enemies will never be chosen if the player remains stationary[ai] for at least 5 seconds[16], regardless of wall and Shadow Candle.

Generally, the type of NPC spawned will depend on many factors including, but not limited to:

Details

Desktop versionConsole versionMobile version
Desktop/Console/Mobile-Only Content: This section's information applies only to the Desktop, Console, and Mobile versions of Terraria.
Stub.png This article is a stub. You can help the Terraria Wiki by expanding it.

The following details describe the behavior of NPC spawning in worlds without the remixWorld attribute[17] (i.e. some information below does not apply to Don't dig up and Get fixed boi worlds).

First, the game will check for certain environments used for spawning. This usually checks for the type of chosen tile (i.e. the ID of the tile) or other tiles near it, and the player's location. The check includes the following:

    1. Check the chosen tile.
    2. Check the tile directly below the player's feet.
    3. Check tiles within a rectangular area centered on the chosen tile, from top to bottom, left to right.
      • The rectangular area's size ranges from 41×41 to 61×61. The step of the loop can be 1, 2, or 3.
    4. Check tiles within a rectangular area centered on the tile directly below the player's feet, from top to bottom, left to right.
      • The rectangular area's size ranges from 61×61 to 121×121. The step of the loop can be 3, 4, 5, or 6.
    • If some parts of these rectangular areas are outside of the true world border, the area will shrink so that it remains in world.
    1. The chosen tile is in cavern layer. In The Constant and Get fixed boi worlds, the tile only has to be above Underworld layer.
    2. The player is not in Dungeon biome.
    3. Only one of the following checks is performed to find at least one unsafe Spider Wall in the area. If some parts of the areas used by the check are outside of the true world border, the check will not be performed at all and Spider Nest NPCs will not be able to spawn.
      • 1/3 (33.33%) chance: check tiles within a 11×11 to 29×29 rectangular area centered on the chosen tile.
      • 2/3 (66.67%) chance: check the tile containing the top left corner of the player's hitbox.
    • The chosen tile has to fulfill one of the following conditions:
      • The chosen tile is any variant of Sand Block, is located within 250 tiles from left and right true world borders and above cavern layer.
      • The chosen tile is a regular Sand Block, is located within 380 tiles from left and right true world borders and is higher than 40 tiles above the vertical halfway point of the underground layer.
  • Then, the game will determine the spawning tile. The check starts from the chosen tile and goes downwards and ends when a solid tile that is not a platform, Planter Box, or Conveyor Belt is found, to a maximum depth of 30 tiles below the chosen tile.[18] If no such tile is found, the chosen tile will be used as the spawning tile. The type of spawning tile will then be used for NPC spawning.

    Finally, the type of NPC spawned will be determined by the player's current environment and spawning tile type. Below is a table of NPC types and conditions. Note that specific NPCs may have other restrictions to their spawning.

    Source of NPC[aj] Condition
    Solar Pillar Solar Pillar
    Vortex Pillar Vortex Pillar
    Nebula Pillar Nebula Pillar
    Stardust Pillar Stardust Pillar
    Space Space
    Goblin Army Goblin Army
    • The player is in the area of respective invasion.
    Frost Legion Frost Legion
    Pirate Invasion Pirate Invasion
    Martian Madness Martian Madness
    Living TreeLiving Tree Living Tree
    • Living Tree NPCs can spawn (see above).
    Unconscious Man Unconscious Man
    • Water above the spawning tile is no more than 1 tile deep.
    • The Tavernkeep and Unconscious Man does not exist.
    Spider Nest Spider Nest
    Underground Desert Underground Desert
    Arapaima Arapaima
    • During Hardmode.
    • Water above the spawning tile is more than 1 tile deep.
    • The player is in Jungle.
    Blood Jelly Blood Jelly
    • During Hardmode.
    • Water above the spawning tile is more than 1 tile deep.
    • The player is in the Crimson.
    Blood Feeder Blood Feeder
    OceanOcean Ocean water
    Sleeping Angler Sleeping Angler(extra spawn on Sand)
    • Water above the spawning tile is no morethan than 1 tile deep.
    • The Angler and Sleeping Angler does not exist.
    • The spawning tile is any variant of Sand Block.
    • The spawning tile is located within 380 tiles from left and right true world borders.
    • The spawning tile is above surface layer. This condition is not required for Don't dig up and Get fixed boi worlds.
    JungleJungle Jungle water(also Piranha and Angler Fish)
    UndergroundUnderground Underground water(Jellyfish)
    SurfaceSurface Surface water
    • Water above the spawning tile is more than 1 tile deep.
    • The spawning tile is not located within 250 tiles from left and right true world borders, or is located below 50 tiles above surface.
    Bound Goblin Bound Goblin
    Bound Wizard Bound Wizard
    • During Hardmode.
    • Water above the spawning tile is no more than 1 tile deep.
    • The Wizard and Bound Wizard does not exist.
    • The spawning tile is in cavern layer and below, and is 210 tiles above bottom true world border (20 tiles above Underworld layer).
    Old Shaking Chest Old Shaking Chest
    • Defeated Skeletron.
    • Water above the spawning tile is no more than 1 tile deep.
    • The Elder Slime does not exist.
    • The spawning tile is in cavern layer and below, and is 210 tiles above bottom true world border (20 tiles above Underworld layer).
    CrittersCritters Critters
    Dungeon Dungeon
    • The player is in Dungeon.
    Meteorite (biome) Meteorite biome
    • The player is in Meteorite biome.
    Frost Moon Frost Moon
    Pumpkin Moon Pumpkin Moon
    Solar Eclipse Solar Eclipse
    FairiesFairies Underground Fairies
    • At least one Fallen Log existing in world.
    • No underground Fairies existing.
    • The spawning tile is below the vertical halfway point of underground layer and is 300 tiles above bottom true world border (110 tiles above Underworld layer).
    Gnome Gnome(outside Living Tree)
    • Water above the spawning tile is no more than 1 tile deep.
    • During night, or the spawning tile has any background wall.
    • Not during Solar Eclipse or Blood Moon.
    • No more than 2 Gnomes existing.
    • The player is standing in front of unsafe Living Wood Wall.
    Gnome Gnome(in front of Dirt Wall)
    • Water above the spawning tile is no more than 1 tile deep.
    • During night, or the spawning tile has any background wall.
    • Not during Solar Eclipse or Blood Moon.
    • No more than 2 Gnomes existing.
    • The spawning tile has any of the following background walls:
    Fungo Fish Fungo Fish
    Glowing Mushroom biome Surface Glowing Mushroom
    Glowing Mushroom biome Underground Glowing Mushroom
    Corruption Corruption(Worm enemies)
    MimicsMimics Mimics(Don't dig up and Get fixed boi)
    MimicsMimicsMimics Mimics(Underground)
    Mimics Wooden Mimic
    Wraith Wraith
    Hoppin' Jack Hoppin' Jack
    Doctor Bones Doctor Bones
    Lac Beetle Lac Beetle
    Worm Worm
    Gold Worm Gold Worm
    Mouse Mouse
    Gold Mouse Gold Mouse
    Snail Snail
    JungleJungleJungle Jungle birds
    JungleJungleJungle Jungle frogs
    Hive Hive block(Hornets, Moss Hornets)
    • The spawning tile is Hive.
    Jungle Hardmode Jungle
    Jungle Temple Jungle Temple
    Hive Wall Hive Wall(Hornets, Moss Hornets)
    • The tile above the spawning tile has unsafe Hive Wall.
    Underground Jungle Underground Jungle
    Jungle Bat Jungle Bat
    Snatcher Snatcher
    Sandstorm Sandstorm
    • A Sandstorm is active.
    • The player is in Desert, and not within 380 tiles from left and right true world borders.
    • The player is above surface. This requirement is changed to in cavern layer and below in Don't dig up and Get fixed boi worlds.
    • The spawning tile is any variant of Sand Block.
    • The spawning tile passes the Sand Block amount check. See Sandstorm § Notes for details.
    Mummy Mummy
    Dark Mummy Dark Mummy
    Blood Mummy Blood Mummy
    Light Mummy Light Mummy
    The Hallow The Hallow
    Enchanted Sword (NPC) Enchanted Sword
    The CrimsonThe CrimsonThe Crimson Any Crimson biome
    The CorruptionThe CorruptionThe Corruption Any Corruption biome
    Surface Surface biomes
    • The spawning tile is above surface layer.
    Underground Underground
    Ice Slime Ice Slime
    The Underworld The Underworld
    • The spawning tile is no more than 190 tiles from the bottom true world border (within Underworld layer).
    Cavern Cavern
    • The spawning tile is in cavern layer.
    Rock Golem Rock Golem
    • The spawning tile is in cavern layer.
    • The spawning tile is regular Stone Block or regular moss growing on Stone.
    • The player is not in Ice biome.
    • The 3×1 (width×height) area at 4 tiles above the spawning tile is not occupied by solid tiles.
    Cyan Beetle Cyan Beetle
    Cochineal Beetle Cochineal Beetle
    Chaos Elemental Chaos Elemental

    Notes

    • When standing on the left or right visible world border, NPCs can spawn on screen, as long they are at least 62 tiles from the player.

    History

    • Desktop 1.4.4:
      • Reduced the natural spawn rates and max spawns in the Jungle if there are friendly town NPCs nearby.
      • Added separate spawn rate and max spawns values for the Jungle Temple.
      • Increased the spawn rate reduction of the Calming Potion from 23% to 39% and its max spawns reduction from 30% to 40%.
    • Desktop 1.4.0.1:
      • Added the following NPCs to the list of NPCs that are never considered active: Skeletron Hand, Prime Cannon, Prime Saw, Prime Vice, Prime Laser, Martian Saucer, Martian Saucer Turret, Martian Saucer Cannon, and Dutchman Cannon.
      • Increased the natural spawn rates and max spawns in the Dungeon:
        • Increased spawn rates in the Underground layer from 1/120 (pre-Hardmode) and 1/97 (Hardmode) to 1/90 (pre-Hardmode) and 1/72 (Hardmode).
        • Increased spawn rates in the Cavern layer from 1/96 (pre-Hardmode) and 1/86 (Hardmode) to 1/72 (pre-Hardmode) and 1/64 (Hardmode).
        • Increased max spawns in the Underground layer in pre-Hardmode from 13 to 14.
      • Increased the natural spawn rates and max spawns in the Underground Desert:
        • Increased spawn rates on the surface during the day in pre-Hardmode from 1/180 to 1/120.
        • Increased spawn rates on the surface during the night in pre-Hardmode from 1/108 to 1/72.
        • Increased spawn rates in the Underground layer in pre-Hardmode from 1/90 to 1/60.
        • Increased spawn rates in the Cavern layer in pre-Hardmode from 1/72 to 1/60.
        • Increased max spawns on the surface to 15. The old max spawns were 10 (pre-Hardmode) / 12 (Hardmode) during the day, and 12 (pre-Hardmode) / 14 (Hardmode) during the night. Max spawns in the Underground Desert are now 15 at all times and under all conditions.
      • The Invisibility Potion now reduces spawn rates by 17% and max spawns by 20%.
    • Desktop 1.3.0.1:
      • Changed the effect of nearby friendly town NPCs on spawn rates and max spawns:
        • The effect is now less intense in the Underworld.
        • 1 nearby friendly town NPC now reduces spawn rates by 33% instead of 17% and reduces max spawns by 13% instead of 27%.
        • 2 nearby friendly town NPCs now reduce spawn rates by 22% instead of 44% and reduce max spawns by 27% instead of 13%.
      • Placed and held Water Candles no longer stack.
      • Added an additional spawn rate increase for Water Candles placed in Space.
      • Increased the spawn rate reduction of the Calming Potion from 17% to 23% and its max spawns reduction from 20% to 30%.
      • Sunflowers now grant the Happy! buff, which reduces spawn rates by 17% and max spawns by 20%.
    • Desktop 1.2.4: Fixed bug where spawn rates would increase underground when a moon event is happening.
    • Desktop 1.2.3: Fixed bug where spawn rates were higher than intended everywhere rather than when below the middle of dirt layer.

    References

    1. Information taken from the Desktop version Desktop 1.4.4.9 source code, field npc in Terraria.Main.cs.
    2. Information taken from the Desktop version Desktop 1.4.4.9 source code, field MoonLordFightingDistance in Terraria.NPC.cs.
    3. Information taken from the Desktop version Desktop 1.4.4.9 source code, method NewNPC() in Terraria.NPC.cs.
    4. Information taken from the Desktop version Desktop 1.4.4.9 source code, field CanBeReplacedByOtherNPCs in Terraria.NPC.cs.
    5. A tick is a time unit countable by the software. Most of Terraria's updating logic happens every tick. A tick has the length of 1/60th of a second, hence there are 60 ticks in a second and 3600 ticks in a minute.
    6. Information taken from the Desktop version Desktop 1.4.4.9 source code, method SpawnNPC() in Terraria.NPC.cs.
    7. Information taken from the Desktop version Desktop 1.4.4.9 source code, field defaultSpawnRate in Terraria.NPC.cs.
    8. Information taken from the Desktop version Desktop 1.4.4.9 source code, field defaultMaxSpawns in Terraria.NPC.cs.
    9. Information taken from the Desktop version Desktop 1.4.4.9 source code, field npcSlots in Terraria.NPC.cs. Also mentioned as "enemy slot" in offical changelogs.
    10. 10.0 10.1 Information taken from the Desktop version Desktop 1.4.4.9 source code, methods CheckActive() in Terraria.NPC.cs and DoesntDespawnToInactivity() in Terraria.NPC.cs.
    11. Information taken from the Desktop version Desktop 1.4.4.9 source code, method SpawnNPC() in Terraria.NPC.cs.
    12. Information taken from the Desktop version Desktop 1.4.4.9 source code, method SpawnNPC() in Terraria.NPC.cs.
    13. Information taken from the Desktop version Desktop 1.4.4.9 source code, method AddIntoPlayersTownNPCSlots() in Terraria.NPC.cs.
    14. Information taken from the Desktop version Desktop 1.4.4.9 source code, method SpawnNPC() in Terraria.NPC.cs.
    15. Information taken from the Desktop version Desktop 1.4.4.9 source code, method nactive() in Terraria.Tile.cs and field tileSolid in Terraria.Main.cs.
    16. Information taken from the Desktop version Desktop 1.4.4.9 source code, method AFKTimeNeededForNoWorms() in Terraria.NPC.cs and property IsStandingStillForSpecialEffects in Terraria.Player.cs.
    17. Information taken from the Desktop version Desktop 1.4.4.9 source code, field remixWorld in Terraria.Main.cs.
    18. Information taken from the Desktop version Desktop 1.4.4.9 source code, methods SpawnNPC_TryFindingProperGroundTileType() in Terraria.NPC.cs and IsValidSpawningGroundTile() in Terraria.NPC.cs.
    1. Most inactive NPCs are NPCs that is considered part of another NPC, for example, body and tail parts of worms. Otherwise, a Giant Worm that has 6–8 segments (i.e. individual NPCs) would have a disproportionate number added to effective NPC count.
    2. 2.0 2.1 Blood Moons only affect the spawn rates above the surface.
    3. 3.0 3.1 Weather additionally affects spawn rates and max spawns in the Snow biome.
    4. 4.0 4.1 Nearby means within a 240×135-tile rectangle centered on the player.
    5. 5.00 5.01 5.02 5.03 5.04 5.05 5.06 5.07 5.08 5.09 5.10 5.11 5.12 5.13 5.14 5.15 5.16 Note that the spawn rate will be capped at 1/60; see below.
    6. 6.0 6.1 6.2 6.3 6.4 6.5 Nearby means within a 240×135-tile rectangle centered on the player. This is active even if the player has the Shadow Candle(Desktop, Console and Mobile versions) debuff, which otherwise nullifies the effect of friendly town NPCs on NPC spawning.
    7. 7.00 7.01 7.02 7.03 7.04 7.05 7.06 7.07 7.08 7.09 7.10 7.11 7.12 7.13 7.14 7.15 7.16 7.17 7.18 Note that the max spawns will be capped at 15; see below.
    8. 8.0 8.1 Only applied if the Meteorite biome does not overlap with the Dungeon, the Underground Desert, the Desert during a Sandstorm, the Jungle, or the evil biomes. If it does overlap with any of those biomes, then the overlapping biome's spawn rate and max spawns are used.
    9. 9.0 9.1 More precisely: If the player is standing in front of unsafe Lihzahrd Brick Walls (wall ID 87), i.e. also in the entrance area of the temple.
    10. If artificially created.
    11. Solar Eclipses only affect the spawn rates above the surface.
    12. 12.0 12.1 12.2 12.3 12.4 12.5 The product of the denominators is rounded down if it is a decimal.
    13. More precisely, above an altitude of 65% between the surface line and the top of the world, i.e. the same area where Space-exclusive enemies spawn in pre-Hardmode. See Space § Notes.
    14. 14.0 14.1 This only applies if not using the critter spawning pool.
    15. 15.0 15.1 15.2 Here we only count enemy spawns and do not count critter spawns, so this value indicates how "safe" a town is.
    16. There is a 1/3 (33.33%) chance for not try to spawn enemies at all and 2/3 (66.67%) chance to try with 1/2 spawn rate. Hence, the effective spawn rate is [math]\displaystyle{ \frac{2}{3} * \frac{1}{2}= \frac{1}{3} }[/math].
    17. There is a 2/3 (66.67%) chance for not try to spawn enemies at all and 1/3 (33.33%) chance to try with 1/3 spawn rate. Hence, the effective spawn rate is [math]\displaystyle{ \frac{1}{3} * \frac{1}{3}= \frac{1}{9} }[/math].
    18. 29/30 (96.67%) in Expert Mode(Desktop, Console and Mobile versions)
    19. The spawn rate is untouched here, but since critters are always spawned, this value is completely irrelevant.
    20. 20.0 20.1 20.2 No enemies will spawn at all
    21. There is a 1/10 (10%) chance for not try to spawn enemies at all and 9/10 (90%) chance to try with 4/5 spawn rate. Hence, the effective spawn rate is [math]\displaystyle{ \frac{9}{10} * \frac{4}{5}= \frac{18}{25} }[/math].
    22. There is a 1/5 (20%) chance for not try to spawn enemies at all and 4/5 (80%) chance to try with 2/3 spawn rate. Hence, the effective spawn rate is [math]\displaystyle{ \frac{4}{5} * \frac{2}{3}= \frac{8}{15} }[/math].
    23. There is a 1/3 (33.33%) chance for not try to spawn enemies at all and 2/3 (66.67%) chance to try with 1/2 spawn rate. Hence, the effective spawn rate is [math]\displaystyle{ \frac{2}{3} * \frac{1}{2}= \frac{1}{3} }[/math].
    24. This is applied regardless of whether the critter spawning pool is used.
    25. There is a 1/9 (11.11%) chance for not try to spawn enemies at all and 8/9 (88.89%) chance to try with 3/5 spawn rate. Hence, the effective spawn rate is [math]\displaystyle{ \frac{8}{9} * \frac{3}{5}= \frac{8}{15} }[/math].
    26. There is a 1/6 (16.67%) chance for not try to spawn enemies at all and 5/6 (83.33%) chance to try with 3/7 spawn rate. Hence, the effective spawn rate is [math]\displaystyle{ \frac{5}{6} * \frac{3}{7}= \frac{5}{14} }[/math].
    27. There is a 1/3 (33.33%) chance for not try to spawn enemies at all and 2/3 (66.67%) chance to try with 1/3 spawn rate. Hence, the effective spawn rate is [math]\displaystyle{ \frac{2}{3} * \frac{1}{3}= \frac{2}{9} }[/math].
    28. There is a 1/3 (33.33%) chance for the denominator to be multiplied by 2. Hence, the spawn rate factor is [math]\displaystyle{ \frac{1}{3} * \frac{1}{2} }[/math] (denominator multiplied by 2) plus [math]\displaystyle{ \frac{2}{3} * \frac{1}{1} }[/math] (denominator left unchanged). This is equivalent to [math]\displaystyle{ \frac{1}{3}*\frac{1}{2} + \frac{2}{3} = \frac{5}{6} }[/math] or [math]\displaystyle{ 1/\frac{6}{5} = 1/1.2 }[/math].
    29. There is a 2/3 (66.67%) chance for the max spawns to be multiplied by 0.6. Hence, the max spawns factor is [math]\displaystyle{ \frac{2}{3} * \frac{6}{10} }[/math] (max spawns multiplied by 0.6) plus [math]\displaystyle{ \frac{1}{3} * 1 }[/math] (max spawns left unchanged). This is equivalent to [math]\displaystyle{ \frac{2}{3}*\frac{6}{10} + \frac{1}{3} = \frac{11}{15} }[/math], which as a percentage is [math]\displaystyle{ \frac{11}{15} - 1 = -\frac{4}{15} = -0.266\cdots \approx -27 \% }[/math].
    30. There is a 2/3 (66.67%) chance for the denominator to be multiplied by 3. Hence, the spawn rate factor is [math]\displaystyle{ \frac{2}{3} * \frac{1}{3} }[/math] (denominator multiplied by 3) plus [math]\displaystyle{ \frac{1}{3} * \frac{1}{1} }[/math] (denominator left unchanged). This is equivalent to [math]\displaystyle{ \frac{2}{3}*\frac{1}{3} + \frac{1}{3} = \frac{5}{9} }[/math] or [math]\displaystyle{ 1/\frac{9}{5} = 1/1.8 }[/math].
    31. There is a 1/3 (33.33%) chance for the max spawns to be multiplied by 0.6. Hence, the max spawns factor is [math]\displaystyle{ \frac{1}{3} * \frac{6}{10} }[/math] (max spawns multiplied by 0.6) plus [math]\displaystyle{ \frac{2}{3} * 1 }[/math] (max spawns left unchanged). This is equivalent to [math]\displaystyle{ \frac{1}{3}*\frac{6}{10} + \frac{2}{3} = \frac{13}{15} }[/math], which as a percentage is [math]\displaystyle{ \frac{13}{15} - 1 = -\frac{2}{15} = -0.133\cdots \approx -13 \% }[/math].
    32. If the player is not riding a mount, the top edge of this is 34 + 3/16 tiles above the top left corner tile mentioned above, meaning that NPCs can spawn on ground exactly 35 tiles above a player standing on half blocks, but not a player standing on full blocks.
    33. This is to prevent Dungeon NPCs spawning outside the Dungeon.
    34. This means no NPCs will spawn in Shimmer or honey that is more than 1 tile deep (any attempt in lava would have be considered invalid in the previous stage).
    35. Technically, moving at a speed less than 0.1875 tiles/second (0.05 pixels/tick) in horizontal and vertical directions.
    36. The spawned NPC will be one of the NPCs appearing in this environment, or one of the NPCs mentioned.