Towns, Spawns, and Happiness Confusion.

Xylia

Terrarian
So, let me get this straight...

To trigger "Town Music" and to stop enemy spawns, I need 3 NPCs in an area.

But, to get happiness and pylons to work, I need no more than 2 NPCs near each other.

This doesn't make a load of sense.

Is there something I'm missing here? It seems really weird to make Pylons and Towns be mutually exclusive to one another.

EDIT: Also the wiki claims 2 NPCs will stop spawns and give Town Music, but I can verify that the wiki is wrong, as I have my guide and the merchant in the forest and I'm getting zombies trying to beat the door down and normal night theme is playing.
 
To avoid the penalty to happiness, you just need to not have more than 2-3 NPCs crammed right next to each other. The Town Music should activate if the buildings they live in are sort of near each other (I don't know exactly what the maximum distance is).
 
An area is considered a town if there are 3 or more NPCs nearby each other. The Town music will play in those situations.

To get a Pylon, you need an NPC that is happy enough. Usually 1-2 happiness modifiers are enough such as the NPC liking the biome they're in and their neighbor.

Once you have the Pylon, you can place it anywhere you want, but it will only work if there are 2 or more NPCs nearby and it is in the correct biome. After getting the Pylon purchased and placed, the happiness of NPCs won't matter in regards to using the Pylon aside from requiring 2 NPCs to be nearby.
 
Weird, because I had a Forest Town of Guide, Merchant, and Nurse.

The Merchant likes the Forest and the Nurse (which is two likes and zero dislikes), but yet would not sell me the Pylon until I moved the Nurse to the Ocean.

 
So, let me get this straight...

To trigger "Town Music" and to stop enemy spawns, I need 3 NPCs in an area.

But, to get happiness and pylons to work, I need no more than 2 NPCs near each other.

This doesn't make a load of sense.

Is there something I'm missing here? It seems really weird to make Pylons and Towns be mutually exclusive to one another.

That's because they're not. You got several things wrong.

First, the ability for Pylons to work is not tied to Happiness. Happiness is only tied to whether you can buy a Pylon, not use them. So if you want a Cavern Pylon, all you need to do is stick a single NPC who sells stuff and like the Underground in an underground house by themselves. Once they appear in their house, you can buy the Pylon and do whatever you want.

Pylons only need two housed NPCs near it in order to function. How happy those NPCs are is irrelevant.

The second thing you got wrong is NPC distance. There are two distainces that matter: 25 squares (short) and ~120 squares (long).

More than two NPCs within short range of each other will cancel out the happiness bonus for them (but again, that does not affect Pylons). You can have more NPCs than two in the same general area, but to maintain happiness, you have to move pairs of them out of short range of each other.

The Town Biome happens when you have 3 or more NPCs in an area, not the short happiness range. So you can have happy NPCs within a Town, so long as pairs of them are farther than 25 squares apart.

The long range mentioned above means that you start building unhappiness for each NPC past 4 that are within 120 squares of each other. So optimally, a Town should contain at most 4 NPCs.

EDIT: Also the wiki claims 2 NPCs will stop spawns and give Town Music, but I can verify that the wiki is wrong, as I have my guide and the merchant in the forest and I'm getting zombies trying to beat the door down and normal night theme is playing.

It may be (just a guess) that an active Pylon counts as a third NPC for Town purposes.

Weird, because I had a Forest Town of Guide, Merchant, and Nurse.

The Merchant likes the Forest and the Nurse (which is two likes and zero dislikes), but yet would not sell me the Pylon until I moved the Nurse to the Ocean.

That makes sense if two of them were within 25 squares of the Merchant. That would cancel out the 90% Happiness buff from being away from other people. And while the Merchant likes the Forest and likes the Nurse, 0.9*0.95 is only 0.855, which is larger than the 85% bonus you need to get someone to sell a Pylon.

Basically, to get a Pylon, you need either the solitary buff or an NPC that the character loves (in addition to the preferred biome). And since the Merchant doesn't have a "love", you need to make sure that only one other character is with 25 squares of the Merchant.
 
Last edited:
Travelling Merchant and Town Pets count as NPCs for town purposes, so it is possible to have town music and no enemy spawn if you have a pet and 2 NPCs or 2 NPCs and Travelling Merchant appears.
 
It doesn't make sense at a first glance but once you start to learn the mechanics of the system, you'll start to understand why. I do suggest this video to help:
 
Back
Top Bottom