Guide:NPC Happiness

From Terraria Wiki
Jump to navigation Jump to search
This is a Guide page.
This is a Guide page.
This means the page will walk you through a specific task, strategy, or enemy/boss fight.
Status: Subject to revision (This Guide does not meet certain quality standards and may be heavily outdated.)
Desktop versionConsole versionMobile version
Desktop/Console/Mobile-Only Content: This information applies only to the Desktop, Console, and Mobile versions of Terraria.

The NPC happiness mechanic poses a complex puzzle to avoid paying excessively high prices. Many NPCs who like each others' company prefer different biomes, and some NPCs like another but are disliked or hated in return. Additionally, purchasing pylons in order to set up a network is impossible without putting thought into NPC happiness.

There are several different ways to address the situation, and this guide is intended to discuss them. The last section gives a single general solution for all NPCs, but before that it is worth discussing more flexible strategies.

Basic Constraints

The exact rules are listed on NPCs § Factors affecting happiness, but the issues can be summarized (all of these factors combine):

  • NPCs get a 12% or 6% bonus for being in a loved or liked biome, or a penalty for being in a hated or disliked one.
    • If the existence requirements for multiple biomes are met, and the NPC loves/likes one of the biomes, but hates/dislikes one of the others, the loved/liked biome will take priority. Biomes that the NPC is neutral to are ignored.
    • For purposes of NPC happiness, the Ocean biome only requires being within 380 tiles laterally of the true world edge (within 338 tiles of the accessible edge) and above the midpoint of the Underground layer. No water is necessary. Additionally, within this area, Forest and non-Hallowed Desert biomes are impossible for NPC happiness purposes.
    • The only biomes that are mutually exclusive (i.e. the existence requirements for both cannot simultaneously be met) are Desert/Ocean (since everything within the 380/338-tile range is considered an Ocean, which prevents non-Hallowed Deserts (Hallow/Desert/Ocean is possible if 1500 pearlsand blocks are present)) and Forest/anything else (since, to be considered a Forest, all the other biome existence requirements must not be met). This means that, for instance, a town in an Underground Hallowed Ocean can house a Demolitionist, Clothier, and Wizard and grant liked biome bonuses for all three.
  • They get a similar bonus or penalty for being housed nearby another NPC they love, like, dislike, or hate.
    • "Nearby" in this context means that their housing flags are within 25 tiles (50 feet) euclidean distance of each other.
  • They get an overcrowding penalty for having more than three nearby NPCs (not including the NPC the multiplier would be applied to), no matter the relationship. The penalty is 5% for each additional nearby NPC, i.e., for the fourth, the fifth, etc. nearby NPC.
  • Conversely, they get a 5% "solitude" bonus for not having more than two NPCs nearby, and having no more than three other NPCs (that is, the two "roommates" do not count) within 120 tiles.
    • Note that this much larger range may sometimes represent over a full screen's width.

The above factors affect a variety of transactions with NPCs:

  • Vendor prices for selling their items will be lower if they are happy, higher if they are unhappy.
  • Conversely, vendor prices for buying the player's items will be higher if they are happy, lower if they are unhappy.
  • This does affect the Nurse's fees for healing and the Goblin Tinkerer's reforging costs.
  • This also affects the Angler's quest rewards – if happy or unhappy, he will give rewards as if the player had completed more or fewer quests, respectively.
  • This even affects the Tax Collector's revenue stream – if happy, he will not only collect more money in a given time, but gather a higher maximum amount, and the reverse if he is unhappy.

Two other factors come into play, but for these, happiness is irrelevant – all that matters is the NPC's presence:

  • NPCs also suppress enemy spawning nearby. In Normal mode, 3 NPCs "on screen" are needed to completely suppress the spawning of enemies, which is usually desirable for a town.
  • To remain functional, a pylon needs to have two NPCs housed within a 169×124-tile rectangle centered on the pylon.

Depending on game progress, there are also up to three town pets available. These count as NPCs for pylons and enemy suppression, but not for crowding/solitude calculations; while it is sometimes claimed that they can affect the happiness of nearby NPCs, this is not the case either positively or negatively, rendering them useful primarily for keeping a town eligible for pylons and enemy suppression when other NPCs are not available (for instance, keeping a dog and cat in the same duplex as the Nurse and Arms Dealer would prevent you from accidentally disabling their pylon if you often relocate the two of them for boss fights), or for extending a town's enemy suppression zone further without crowding its inhabitants.

Casual Strategy

Some more general points to consider:

  • Empty houses are not considered – even if a given space could house an NPC, if it does not, then it has no effect on NPC happiness.
  • Not all NPCs are created equal:
    • The Goblin Tinkerer is widely considered the largest money sink in the entire game, so any discounts you can get from him will add up.
    • Similarly, the Tax Collector is an ongoing revenue stream, so you'll want to keep him happy.
    • The Nurse's prices do not necessarily matter much, in the sense that you're usually in no position to bargain when you need her services. However, if you are likely to use her often, you should probably try to keep her happy. While a Potion of Return can let you drop by wherever she is, this will not be desirable during some boss fights, so if you are bringing her to the fight, you might want to bring a roommate along to keep her happy.
    • If you rarely purchase from a given NPC or their wares are cheap (like the Painter's), you will not have to care much about their happiness – and with a little advance warning, you can move them into a better environment when you do need to make a big purchase.
    • You want at least one vendor to be as happy as possible for selling your items.
    • The Guide's happiness has no effect at all and can be disregarded entirely.
    • The Tavernkeep's items which cost Defender Medals cannot be discounted, thus any happiness benefits apply mostly to buying Eternia Crystals.

Examining the rules, it seems that a reasonable strategy is as follows:

  • Pick locations for your pylons (and perhaps some non-pylon bases), and cluster three or four NPC homes at each of them. Some biomes may need a second town, in which case you should refer to the "Basic Constraints" section to not overcrowd your NPCs.
  • You may want to include a "guest room" in each of these towns, an additional housing-suitable space. This does not need to be filled up front, but it lets you bring in a liked or loved roommate on short notice, and also serves as ready housing for new arrivals until you pick a new spot for them.
  • This allows you to give all the NPCs some space, while making sure the pylon stays functional.
  • The third NPC, or a town pet, comes in handy in case you need to pull an NPC elsewhere on short notice.

For getting your first pylons quickly, the Nurse and Arms Dealer together will have the arms dealer produce a pylon for sale. For the NPCs to appear, the arms dealer requires that a gun or bullets be inventory (from smashing a orb or heart is the easiest way but beware of bosses appearing for each 3rd one smashed), and the Nurse requires >100 HP and the Merchant (+50 silver total among players in inventory) in the world.

Optimal Strategies (

The following strategies were found using this calculator. These may not be perfectly optimal, but should provide a good baseline. Each strategy was found by maximising the importance of the Goblin Tinkerer and then finding the lowest average price modifier (that is, the highest average happiness) with our required pylons.

Note that Caverns refers to the Underground, Caverns and Underworld without any differentiation between them. If a biome is listed multiple times, then you should each group at least 120 tiles away from each other to achieve the desired happiness modifiers.

Remember that you don't have to follow this strategy - if you want certain NPCs to have a higher price priority, then use the calculator above with your current (or expected) NPCs and biomes and weigh your preferred NPCs according to your needs.

Pre-Eye of Cthulhu

This requires you to have smashed one shadow orb, and found the Golfer and Stylist in their respective biomes. Additionally, you should have unlocked 10% of the Bestiary to unlocked the Zoologist, and you should have defeated the Goblin Invasion to unlock the Goblin Tinkerer.

For future proofing and to unlock access to the Snow pylon, you may wish to put the Goblin Tinkerer, Dye Trader and Painter in the Underground Snow biome. You may also wish to put the Nurse and Arms Dealer in the Desert biome for access to the Desert pylon.

Biome(s) for group NPCs in this group (and their pricing modifier for each biome)
Forest Guide (0.84), Zoologist (0.84), Golfer (0.84)
Forest Merchant (0.84), Nurse (0.84), Arms Dealer (0.84)
Caverns Demolitionist (0.89)
Caverns Goblin Tinkerer (0.84), Dye Trader (0.89), Painter (0.95)
Ocean Stylist (0.89), Angler (0.89)

Post Eye of Cthulhu

This stage simply unlocks the Dryad. You'll have to move the Painter to the Jungle, but this unlocks the Jungle pylon.

Biome(s) for group NPCs in this group (and their pricing modifier for each biome)
Forest Guide (0.84), Zoologist (0.84), Golfer (0.84)
Forest Merchant (0.84), Nurse (0.84), Arms Dealer (0.84)
Caverns Demolitionist (0.89)
Caverns Goblin Tinkerer (0.84), Dye Trader (0.95)
Jungle Dryad (0.89), Painter (0.79)
Ocean Stylist (0.89), Angler (0.89)

Post Brain of Cthulhu/Eater of Worlds

Same as above, but place the Tavernkeep in with the Demolitionist. This will decrease the Demolitionist's price modifier to 79% but give the Tavernkeep an 84% price modifier.

Post Skeletron/Queen Bee

Assuming you have defeated both Skeletron and Queen Bee, then the Mechanic, Clothier, Party Girl and Witch Doctor become available. If you haven't previously done so, the optimal strategy now requires the Goblin Tinkerer to be in the ice biome.

Biome(s) for group NPCs in this group (and their pricing modifier for each biome)
Forest Guide (0.84), Zoologist (0.84), Golfer (0.84)
Forest Merchant (0.84), Nurse (0.84), Arms Dealer (0.84)
Underground Snow Goblin Tinkerer (0.75), Dye Trader (0.95), Mechanic (0.79)
Caverns Clothier (0.89)
Caverns Tavernkeep (0.84), Demolitionist (0.79)
Jungle Dryad (0.84), Painter (0.79), Witch Doctor (0.84)
Ocean Party Girl (0.89), Stylist (0.89), Angler (0.84)

Early Hardmode

A few new NPCs are available at this point - the Wizard can be found in the Caverns layer, the Tax Collector can be purified in the Underworld, and the Truffle can move in to a above-ground Glowing Mushroom biome. In addition, the Hallow becomes available. Unfortunately, you may have to move some houses if the Crimson/Corruption and Hallow bands intercept your existing houses, and many NPCs have to be moved around for their optimal price modifiers. Thankfully with your existing pylon network this shouldn't be too much of a hassle to do.

Note that choosing between the Hallow and the Desert for the Nurse and Arms Dealer depends on who you want to prioritise - if you want the Arms Dealer prioritised (or require a Desert pylon), choose the Desert, otherwise choose the Hallow.

Once the Steampunker is unlocked, put here in the Snow on her own.

Biome(s) for group NPCs in this group (and their pricing modifier for each biome)
Forest Merchant (0.89)
Forest Zoologist (0.84), Golfer (0.84), Wizard (0.84)
Underground Hallow Tavernkeep (0.79), Demolitionist (0.79)
Either Hallow or Desert Nurse (0.79,0.84), Arms Dealer (0.84,0.79)
Underground Snow Goblin Tinkerer (0.75), Dye Trader (0.95), Mechanic (0.79)
Jungle Dryad (0.84), Painter (0.79), Witch Doctor (0.84)
Ocean Party Girl (0.89), Stylist (0.89), Angler (0.84)
Snow Tax Collector (0.89)
Mushroom Guide (0.89), Clothier (0.84), Truffle (0.83)

Post Plantera

All NPCs are now unlocked. You should have the Pirate from defeating the Pirate Invasion. Santa Claus prefers the Snow biome if he joins your world over Christmas. As before, your preference for the Steampunker or Cyborg will determine where you should place those two NPCs (if you need a Snow pylon, place them in the Snow).

Biome(s) for group NPCs in this group (and their pricing modifier for each biome)
Forest Merchant (0.89)
Forest Zoologist (0.84), Golfer (0.84)
Underground Hallow Tavernkeep (0.79), Demolitionist (0.79)
Hallow Party Girl (0.79), Wizard (0.89)
Underground Snow Goblin Tinkerer (0.75), Mechanic (0.75), Princess (0.77)
Desert Nurse (0.84), Dye Trader (0.84), Arms Dealer (0.79)
Either Desert or Snow Steampunker (0.79,0.84), Cyborg (0.89,0.84)
Jungle Dryad (0.84), Painter (0.79), Witch Doctor (0.84)
Ocean Stylist (0.84), Angler (0.89), Pirate (0.83)
Snow Tax Collector (0.89)
Mushroom Guide (0.89), Clothier (0.84), Truffle (0.83)

Pre- Calculated strategy

The following text and table was created before the update, which increased the limit for the solidarity bonus and overcrowding penalties by one. It is being preserved for now, but may disappear eventually. Please disregard it.

An "optimal solution" for clustering all the NPCs is listed below, maximizing average happiness across all NPCs. This includes all NPCs including Hardmode (except for the Princess), and represents a single setup meant to be left unchanged. By nature, such an optimization cannot take full account of issues such as easy access or pylon placement, and this one is fairly simple – focused on average happiness, no priority for the "important" NPCs mentioned above, and it assumes all NPCs are paired or alone.

It is assumed that for each NPC A, there are at maximum two other NPCs within 25 tiles and there are at maximum three other NPCs between 25 and 120 tiles away. The final values include the 5% bonus granted for this "solitary" setup.

NPC A NPC B Biome Price modifier for NPC A
ZoologistZoologist GolferGolfer ForestForest 84%
GolferGolfer ZoologistZoologist ForestForest 84%
MerchantMerchant n/a ForestForest 89%
NurseNurse Arms DealerArms Dealer DesertDesert 84%
Arms DealerArms Dealer NurseNurse DesertDesert 79%
TavernkeepTavernkeep DemolitionistDemolitionist UndergroundUnderground /
CavernCavern /
The UnderworldThe Underworld
DemolitionistDemolitionist TavernkeepTavernkeep UndergroundUnderground /
CavernCavern /
The UnderworldThe Underworld
Tax CollectorTax Collector ClothierClothier UndergroundUnderground /
CavernCavern /
The UnderworldThe Underworld
ClothierClothier Tax CollectorTax Collector UndergroundUnderground /
CavernCavern /
The UnderworldThe Underworld
Party GirlParty Girl WizardWizard The HallowThe Hallow 79%
WizardWizard Party GirlParty Girl The HallowThe Hallow 89%
MechanicMechanic Goblin TinkererGoblin Tinkerer Snow biomeSnow biome 79%
Goblin TinkererGoblin Tinkerer MechanicMechanic Snow biomeSnow biome 84%
SteampunkerSteampunker CyborgCyborg Snow biomeSnow biome 84%
CyborgCyborg SteampunkerSteampunker Snow biomeSnow biome 84%
Santa ClausSanta Claus n/a Snow biomeSnow biome 84%
DryadDryad Witch DoctorWitch Doctor JungleJungle 84%
Witch DoctorWitch Doctor DryadDryad JungleJungle 84%
PainterPainter n/a JungleJungle 89%
AnglerAngler PiratePirate OceanOcean 89%
PiratePirate AnglerAngler OceanOcean 79%
Dye TraderDye Trader StylistStylist OceanOcean 95%
StylistStylist Dye TraderDye Trader OceanOcean 79%
GuideGuide TruffleTruffle Glowing Mushroom biomeGlowing Mushroom biome 95%
TruffleTruffle GuideGuide Glowing Mushroom biomeGlowing Mushroom biome 79%
Simple NPC Setup
Biome 1st set of neighbors1 2nd set of neighbors1
Forest Golfer Zoologist Merchant n/a
Snow Biome Steampunker Cyborg Mechanic Goblin Tinkerer
Desert Arms Dealer Nurse n/a n/a
Underground / Cavern / The Underworld Tax Collector Clothier Demolitionist Tavernkeep
Ocean Angler Pirate Stylist Dye Trader
Jungle Dryad Witch Doctor Painter n/a
The Hallow Wizard Party Girl n/a n/a
Glowing Mushroom biome Truffle Guide n/a n/a

Town pets can be placed anywhere. Placing them at the locations with only 2 NPCs can help keep pylons powered in the event that one of the NPCs is somewhere else or missing.

The Princess should be placed in the Forest2, Desert, Jungle2, The Hallow, or Glowing Mushroom biome to avoid over crowding in the other locations.

1. There must be a 25 tile gap separating the 2 Neighbor groups.

2. The Princess would have to be placed near the Merchant or Painter.

The above setup can be improved by putting nearby NPCs in different biomes.

1. Put the Nurse in a nearby hallow to the Arms Dealer. If there is none, make one using seeds or a clentaminator. Just make sure it can't spread to the desert and override it.

2. Put the Mechanic in an ice cavern biome, then put the Goblin Tinkerer in a regular cave nearby.

3. Do the same with the Tax Collector and the Clothier, with the Tax Collector in the ice caverns and the Clothier in the regular caverns.

4. Create a nearby snow biome to a desert or vice versa and put the Steampunker in the Desert and the Cyborg in the Snow.

5. Put the Truffle in the Glowing Mushroom Biome with a nearby Forest for the Guide.