Talk:NPC spawning

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.

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

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)

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.

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)

trying to make an illustration of spawn aeria

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.

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)

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)