Talk:NPC spawning

blocks
Are there blocks upon which a monster will now spawn on? --67.168.255.104 02:06, 2 August 2011 (UTC)

Max Spawns column & Meteor Heads
reclarify the maximum number column please because i have VERY frequently gotten roughly 12 meteor heads at a given time in a hallow biome created by adding meteor biome added in. 96.15.233.3 18:49, 10 December 2011 (UTC)
 * Did you have battle potion and/or water candle active at the time? The time of day also has an effect, unless you are underground. Did you make the meteor underground? I didn't bother including a column for underground meteor, since this typically won't happen naturally. It would have a significantly higher spawnrate/limit. --GauHelldragon 18:57, 10 December 2011 (UTC)
 * i placed 50 (and any extra meteor pieces the meteor foes dropped) in an open completely hallow area underground at about depth 400 in a small world. it is third layer underground (mostly stone but not yet lava).  i would like to point out that spawn rate, if i constantly killed and not let numbers add up, was roughly 7 heads per 3 seconds.  further, i couldn't completely clean out neighboring hollow spots and i almost constantly had water based mobs appear below me but out of view range, about 3 min and max not counting dead goldfish.  my screen is 1440x900, i think spawn area is equal to half the radius further than view range.  i did not use battle or water candle. 96.15.251.38 19:12, 10 December 2011 (UTC)
 * If you built it in the cavern layer, that explains why the spawn rate/max is different from the one listed. --GauHelldragon 20:29, 12 December 2011 (UTC)

Spawn Radius
i think i discovered something about spawn radius, or at least the width but height is found similar way. using a 1920x1080 screen resolution and maximized windowed mode (or full screen for similar width measuring purpose), i calculated every block is 32 pixels wide (not amazing yet but whatever) and there are 60 blocks in the screen in one direction. i verified using a ruler accessory (much to my eyes pain). default window size is 50 tiles in diameter.

next i used the gps/compass to measure npc spawn protection size and spawn range, remember that 2 ft = 1 block. the width of the anti-mob bubble is 125 tiles wide give or take 5 tiles for npcs not lining up vertically during my night time test. additionally that spawn protection is depends on the player's location, meaning a monster can spawn inside it if the player itself is outside of it. this is because of the player's own anti spawn bubble (ok square, whatever), which is EXACTLY this equation: window_size*120%. i say window size because i specifically remember an update that linked spawn "rate" and location to the game window's size. i highly doubt what i just said about rate is wrong but i proved the spawn location right. a monster didn't spawn at block 72, it spawned the block right after, thus a monster can spawn at (window_size*1.2)+1 or block 73 as written on the page. given that the article written that this is the maximum, i suspect a player with a screen resolution larger than 2304 wide (or 2560 as idk what screen would be close to and over 2300), the developers expected that players wouldn't use a monitor above 1900 wide. using default window size, a monster didn't spawn till i was around 110 tiles away from an npc, giving enough space for a monster to spawn between the npc's 72 tile wide and player's 30 tile wide.

so to summarize:
 * player anti-spawn protection is based on windowsize
 * exact protection size is windowsize*1.2
 * max is based on a 1900 wide screen. 72 tiles wide radius for left and right.
 * npcs have radius as the max centered at each of themselves but only if there are at least 3 npcs close together (for close together i didn't test)

98.134.162.247 03:13, 19 December 2011 (UTC)
 * to update slightly, npc's spawn protection up and down is shorter than player's spawn protection of screen size. (tested with an underground house with helivator) 98.134.167.67 21:40, 20 December 2011 (UTC)

Some slightly more precise numbers based on experiments in-game and poking around in source: Metasynthie (talk) 00:45, 9 November 2013 (UTC)
 * the update the above contributor refers to is an early one that says "Enemy spawn distance has been pushed back to the maximum resolution to ensure that they will never spawn on the screen." The maximum resolution the devs were thinking of is 1920x1080, or 120 tiles x 67.5 tiles. The actual safebox around the player seems to be 124 tiles (62 left/right of player's centerpoint) x 70 tiles (35 up/down of player's centetpoint). NPCs always spawn outside of this area, which is offscreen if you're playing at 1920x1080 resolution or less.
 * the information on the NPC spawning wiki page seems to be a little bit off based on experiments and source, and maybe have changed due to the update mentioned above. It looks like the maximum distance that NPCs can spawn at is 84 left/right of the player and 47 above/below, not 73 and 45 as mentioned. (This is important for creating really precise farms!) Would appreciate it if someone could double-check my work, probably a good idea before updating the page.

trying to make an illustration of spawn aeria

<< On the topic of spawn radius and 'spawning basics'. I keep coming back to this page, when I feel like playing again, and still don't get it.

Player is 3x2 (6 tiles), from top left the max distance is 84 west, 83 east, 46 up, 45 down. Chooses tiles until finds empty, check for ground below empty, check for fit hostile at ground arrived at. Checks if in safe area (from top left of player, 62 tiles east or west, 34 tiles up or down). Also, it must be outside a SECOND safe zone of 2088x1172 pixels around player's CENTER of hit box (sprite?). (Also, if the player is not riding a mount then the 'tile' is 3/16 above the top left corner of the player's head. Not sure why. If standing on a half block then the safe zone is only 34 above the tile, but if on full then it is 35. As interpreted from the information provided.)

The graphic helps... by making it easy to ignore the 'basics' and just follow the graphic. But then, I'm left with a question... does this mean that if I build a 124 tile wide platform and stand on the dead middle two tiles, nothing can spawn on that platform to get me? (Ignore fliers going around.) So, in game... I would use the ruler and stand on two tiles... then measure 61 tiles on either side and build to that distance? (Total tiles is 124.)

Taking the ruler back to the 'basics'. The safe area is 62 tiles east or west (so far lines up) of the top left tile of the player. So, I should measure with the ruler to 61 west and 60 east since the right side of the player sprite is the 61th tile. But, that means my safe platform must only be 123 tiles wide (61 + 60 + 2). Now, above my sprite the safe area is 34 tiles... if I am standing on a half block. It is actually 35 if I am standing on a full block. So, as I normally build with full blocks, I can place my roof 35 tiles above my sprite head... or by ruler that would be 38 up... and nothing can be spawned standing on it. That raises another question... for the safe zone, does it look at the space the hostile will be placed in or does it look at the block it will be placed on top of? Because if it looks at the space it will be spawned into then I want my roof at 34... actually, putting it a little lower, like 30, would ensure that I don't have to worry about it. Same goes for below, as long as the open space below where I stand it less than 35 and then it is solid block to 50 tiles below (for example, 30 tiles open space and 20 tiles solid beyond that) then it will be fine.

All in all, it is best to play it safe and go beyond these numbers. If trying to make a safe box and not install your own walls, make it no wider than 60 and no taller than 30... so no matter where you stand in it, the whole thing remains in the safe zone. If trying to make a hostile spawning area, build 90 tiles east and west (180 wide)... because building too large doesn't matter, you just don't want to miss spawns by building it too small. >> 184.65.217.231 13:52, 8 October 2019 (UTC)

Biome where player is standing?
Edge case: Is it the biome the player is currently in that counts, or the biome at the place where the mob is selected to spawn, when considering spawn rate? 82.99.4.212 13:36, 7 August 2013 (UTC)
 * The biome the player is in. --0icke0 (talk) 10:51, 8 August 2013 (UTC)
 * I confirm that. I also noticed a strange phenomenon: When the player is just outside of the Temple or the Dungeon (when the wall tiles are not resembling that biome behind the player/music changes) the NPCs spawning inside the structure will mostly be Goldfish or bunny, occasionally the mobs of either the structure, or the biome the player is in. 157.181.101.156 16:54, 10 January 2014 (UTC)

Mobile version
It seems that monsters spawn much less frequently on the mobile version than on PC. -- an anonymous user
 * This has been a common complaint since the mobile 1.2 update. If you want to add your voice or check for the latest info from the developer, it's best to use the forum.  Equazcion ( talk ) 03:00, 17 Dec 2014 (UTC)

47tiles above and below me is safety-zone...but where am I?
Imagine if I wnat to build a thin frame around me that marks exactly the safety zone with me standing on a platform in its center, what height exactly would I have to stand on then? The safetyzone is 94tiles high, but I am three tiles high...soo... huh?
 * The safe zone is actually 70 tiles high, so I guess about 35 tiles would do it. Equazcion  ( talk ) 19:21, 14 Jan 2015 (UTC)
 * OOps I actually meant the spawnarea, but same applies for the safe zone, I dn't know where top/bottom boundaries are, because I'm 3tiles tall.
 * I believe it's from the player's vertical and horizontal center-point. --Ferretwings (talk) 19:30, 13 June 2016 (UTC)
 * It's actually relative to the tile containing the top left corner of your sprite. However, the tile the game checks for background walls is your centre point. - Andrio Celos (talk) 12:13, 8 July 2018 (UTC)

Solar Eclipse
I'm pretty sure that spawn rate is greatly increased during a Solar Eclipse also, but I don't know the rate to which it is increased to.
 * Anyone know the answer to this? --MentalMouse42 (talk) 16:33, 4 April 2020 (UTC)

Biome
Does the enemy type depend on the biome where the player is, or on the biome where the spawn location is ?

spawning spot
If the chosen tile is, say, directly above the player, and there are no blocks between the player and the tile, is it cancelled (due to monster cant spawn on-screen)?

And lava prevents spawning, correct? FunAlways (talk) 17:51, 1 August 2015 (UTC)

Dirt layer and Stone layer?
The page doesn't explain what "dirt layer" and "stone layer" means. I guess Underground / Cavern?

Goblin invasions *are* blocked by walls
At the end of the Spawning Basics section, there's a claim that goblin invasions aren't blocked by player-placed walls. I know this isn't true, because I've built spawn-blocked structures in the surface layer that do not allow goblins to spawn. When I leave and there's an area in spawning range that doesn't have my walls behind it, then the goblins start spawning. I think the person who wrote that blurb was confused about the sorcerer's teleporting ability, because they can teleport into areas with player-placed walls after spawning. Any objections to me updating it?

Colezan (talk) 01:35, 7 June 2016 (UTC)

All right, I went ahead and updated that section. Colezan (talk) 05:30, 13 June 2016 (UTC)

other spawnrates
what about spawn rates for : desert, desert underground, ice, ice underground ? sandstorm & blizzard ? thanks. --84.101.149.232 18:58, 18 November 2016 (UTC)

Item spawn rate modification table
I think we should have a table outlining the effects of items on spawn rates. I created the following table, but it looks out of place and doesn't use the style templates. (Mostly because I don't know what to do to use them).

If someone who knows how to make this into a good table, go ahead and add it :) Thanks! Kirbykirby56 (talk) 04:45, 27 October 2017 (UTC)


 * Looked at the code, seems like some of the values are wrong/out of date


 * Calming potion seems to have gotten buffed sometime between 1.2.4.1 and 1.3.4.3, don't know exact version it changed.
 * In the same version span water candles got an additional +100% spawn rate in space, but only when placed, when held in hand they don't have this additional effect.
 * Could someone verify(mainly don't trust my math when converting multiplier to %), and update related pages? 86.115.19.146 11:06, 27 October 2017 (UTC)

Specific enemies
Can you add a table of specific enemies whose spawn rates are multiplied from the normal ones with the spawn rate compared to the forest next to them? Some examples for the table would be pinky, medusa, and the bounded goblin tinkerer. 174.66.199.150 21:13, 31 July 2020 (UTC)

Spawn rates
To not long consideration, for example, on page of pinky his spawn rate is precisely specified, but Nymph for example is not. There is general lack of spawn rates of multiple enemies, what should be corrected. On outer sources there are many. --Inioszi (talk) 02:18, 29 November 2020 (UTC)