An NPC (Non-Player Character) is a friendly automated character that provides some service to players. Players can utilize NPCs by standing near them and right-clicking on them. Most NPCs are vendors, selling items to players in exchange for coins, and can be sold items by a player in order to obtain coins, though some NPCs perform other functions.
Most NPCs are "Town" NPCs, appearing after certain milestones are achieved in game advancement (details below). They move into structures the player builds, known as Houses, which are generally required for Town NPCs to remain available.
Town NPCs that have moved into Houses reduce enemy spawn rates in the area, an effect that multiplies the more of them are present. With four or more Town NPCs in close proximity, enemies generally stop spawning on or near the visible screen altogether. Players tend to utilize this effect by building large structures ("Towns" or "Bases") with several integrated Houses, to serve as their safe haven. Enemy spawn rates in the area return to normal, or are elevated, during Events such as a Blood Moon or Goblin Invasion.
Town NPCs generally walk around during the day, and remain still in their assigned Houses at night. They have finite health and can take damage from enemies or Lava, and can die, though they will respawn following a delay as long as a suitable vacant House is still available. NPCs cannot be attacked by players, and their health regenerates over time.
There are currently 21 Town NPCs. An additional 2 NPCs can be encountered that don't move into Houses.
Town NPCs require a suitable, vacant House built by a player. A House is a confined room enclosed by a frame of blocks, with a Door, background Walls, and two furniture items. Certain types of furniture are required, as well as certain room dimensions (see Home for details). Houses must not be located near Corruption or Crimson, and if those spread too close to an occupied House, the NPC living there may move out.
The Guide and Old Man are unique in that they always spawn upon creating a world. The Guide will also move into the first House you build. If he dies, he will need a proper House to respawn. The Old Man does not move into a House, but always appears near the Dungeon's entrance, and respawns the following day if killed.
If a House occupied by an NPC is damaged in a way that makes it invalid, the NPC will move out and walk around the area until a suitable House is restored. If killed, the NPC will respawn again whenever a new House becomes available.
 Buying and selling
Items can be bought simply by right-clicking an NPC and taking items from their inventory while their cost in coins is available in the player's inventory. Holding the right mouse button will allow the player to buy an item in bulk, so long as the item is stackable. The buy speed increases the longer the right-click button is held. Certain NPC's will sell Biome Specific Items if their House is located within a specific biome.
All NPC vendors can also be used to sell your unwanted or surplus items to gain coins, simply by placing your unwanted item(s) in their inventory. Items are always sold to vendors at one-fifth their purchase price. Not all items have a sell value (very common items such as Dirt or Wood have no value). Hovering over your item while the NPC's inventory is open will show its sell value. Should you change your mind about a sale, sold items can be taken back in exchange for the amount you sold them for, as long you haven't yet closed the NPC's inventory screen. This does not hold true for returning bought items, which must be sold back at their standard sell rate of one-fifth the purchase price.
All NPC vendors buy and sell at the same price.
 Town NPCs
Listed in the order in which they are likely to be acquired.
|Guide||Starting a new world.||Provides tips and crafting recipes.|
|Merchant||All players combined have more than 50 in their inventories.||Sells certain basic tools.|
|Nurse||A player has more than 100 health, and Merchant is already present.||Heals players and cancels debuffs in exchange for coins.|
|Painter||3 other Town NPCs are acquired.||Sells paints and equipment used to paint blocks and walls different colors.|
|Dye Trader||A player has any item used to make a Dye, or Dye itself.||Sells the Dye Vat crafting station.|
|Demolitionist||A player has an explosive in their inventory, and Merchant is already present||Sells explosive items.|
|Dryad||A Boss is beaten other than King Slime, Lepus or Wall of Flesh.||Sells nature/Corruption/Crimson items, and can report the percentage of Corruption/Crimson and Hallow in the world.|
|Arms Dealer||A player has bullets, or a gun that shoots bullets, in their inventory.||Sells certain guns, bullets, and after the Eater of Worlds or the Brain of Cthulhu has been defeated, Unholy Arrows.|
|Party Girl||2% chance of spawning after acquiring 8 other Town NPCs.||Sells items that create colorful visual effects, such as the Bubble Machine, Confetti Gun, and fireworks. If killed, she starts over with a 2% chance of spawning each dawn.|
|Stylist||Found and spoken to in a Spider Nest.||Can change your hair style, and sells Hair Dyes.|
|Angler||Found and spoken to in an Ocean Biome.||Gives Fishing quests.|
|Goblin Tinkerer||Found and spoken to underground, after defeating a Goblin Invasion.||Sells items such as the Tinkerer's Workshop, and can reforge tools and equipment.|
|Witch Doctor||Queen Bee is defeated.||Sells the Blowgun, the Imbuing Station and Fountains.|
|Clothier||Skeletron is defeated.||Sells certain Vanity items, including the Familiar clothes.|
|Mechanic||Found and spoken to in the Dungeon.||Sells the Wrench, Wire, and other Mechanism related items. Also sells the Mechanic's Rod during Hardmode if the Angler is present but only during the night of a waning crescent moon.|
|Pirate||A Pirate Invasion is defeated.||Sells the Cannon and other Pirate-related items.|
|Truffle||A House is built in an above-ground Mushroom Biome during Hardmode.||Sells mushroom-themed items.|
|Wizard||Found and spoken to in the Cavern layer in Hardmode.||Sells certain magical items.|
|Steampunker||One Mechanical Boss is defeated.||Sells the Clentaminator, Teleporter, Jetpack, and other items.|
|Cyborg||Plantera is defeated.||Sells the Proximity Mine Launcher, Rockets and Nanites.|
|Santa Claus||The Frost Legion is defeated, appearing only from December 14-31.||Sells the Santa costume, coloured lights, Christmas trees and their decorations.|
 Other NPCs
The following NPCs are not considered town NPCs because they cannot be moved into specific housing. Details below.
|The Traveling Merchant randomly spawns and will stay for one day. He sells a random selection of unique items.|
|The Old Man is found at the entrance to the Dungeon. He summons Skeletron, but only at night. Once Skeletron is defeated, the Old Man is no longer present, as (it can be inferred) the curse he was afflicted with is removed and he becomes the Clothier.|
- NPCs will take about 2 minutes to spawn after another NPC has spawned or dawn passes.
- Bound NPCs found underground can be freed by talking to them, after which they will always respawn whenever a vacant house is available. Having an empty room ready for them when you anticipate finding one will mean you will have convenient access to them from your Town earlier on, though this is not required, and building a house later will still cause them to spawn at that time.
- NPCs will not spawn during an active Event or at night.
- Male NPCs will teleport to a King Statue when you activate it, and similarly female NPCs will teleport to a Queen Statue when you activate it.
- All NPCs have an Attack stat of 10, though they don't attack anything.
- NPCs will teleport home during the night if the player(s) are away from both their home and the NPC itself. This can be useful for relocating them across the map without needing to escort them or to get them across terrain that would otherwise kill them (such as a lava moat).
- 1.2.4: Added the Angler NPC. Fixed bugs with the sign / npc chat display again. Fixed exploit where you could buy and sell stackable items for profit.
- 220.127.116.11: Fixed problems with rescued NPCs not having any names.
- 2 New NPCs added: Stylist, Traveling Merchant.
- Names are now decided on spawn rather than World Creation.
- Fixed a bug where numerous NPCs could spawn if you beat a hardmode boss in a non-hardmode world.
- Invasions can now spawn enemies anywhere near friendly NPCs instead of just the middle of the world.
- Enemy attacks no longer trigger Spectre set healing from hitting friendly NPCs.
- 1.2.2: NPCs now go to shelter during Eclipses.
- 18.104.22.168: Added some checks to ensure multiple NPCs of the same type don’t spawn.
- 22.214.171.124: Rotten Eggs now correctly damage friendly NPCs.
- 1.2.1: Several friendly NPCs will sell costumes.
- 1.1.1: Bound NPCs now can be untied with Autopause enabled. Santa Claus added.
- NPCs now have random names given to them on World Creation. Their deaths will be reported with these names. Also other NPCs will use them in their quotes. Upon respawning after Death will be given a new random name.
- NPCs now may be told where to live using the new Housing Menu feature.
- Two NPCs of the same type can no longer spawn, even in a multiplayer world. (Previously that was two additional merchants and second nurse. They had multiplayer conditions.)
- 126.96.36.199: NPCs now look at the character.
- Shops now sell items back to you. Shift-clicking items will automatically sell them.
- New sound for initiating a conversation to an NPC.
- 1.0.4: Added an option that will pause the game while talking to an NPC in single player. It defaults to off.
- Pre-Release: Introduced.