NPCs/cs


 * For a complete list of NPC names, see NPC names.

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 using the button 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. Most NPCs also have an attack method, which they will use to defend themselves against enemies in the vicinity. Some NPCs also perform other functions.

Most NPCs are "Town" NPCs, appearing after various milestones are achieved in game advancement (details below). They move into structures the player must generally build, 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 increases 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. These reductions are usually overridden by special Events like the Blood Moon or Goblin Invasion, during which spawn rates return to normal, or are elevated, and enemies will once again attack players and NPCs in the area.

Town NPCs generally walk around during the day, occasionally sitting in Chairs and "talking" to each other, or to the player (shown by mouth movement and speech bubbles). They remain still in their assigned Houses at night. NPCs have limited health and can take damage and ultimately die from enemies, Traps, or Lava, though they cannot be attacked by players (outside of special Voodoo Doll accessories or Rotten Eggs). Their health regenerates over time, and if killed, they will also respawn following a delay, as long as a suitable vacant House is still available.

There are currently 22 Town NPCs, 6 of whom can only appear in Hardmode. An additional 3 NPCs can be encountered that don't move into Houses.

Ubytování
Town NPCs require a suitable, vacant House. 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 House 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.

Town NPCs' home assignments can be re-arranged using NPC Flags from the Housing Menu, where you can also check whether a room is a suitable House.

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. A house submerged in water remains valid housing for an NPC.

Nákup a prodej
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.

You can decrease prices of some items if you use a Discount Card, which is a rare drop from the Pirate Invasion.

Městská NPC
Seřazeny podle pořadí, v jakém je lze nejčastěji získat.

Před hardmódem

 * *Prodává dodatečné předměty během Halloweenu, Vánoc a během krvavého měsíce.

Hardmód

 * *Prodává dodatečné předměty během Halloweenu.

Další NPC
Následující NPC nejsou považovány za městské NPC, protože se za žádných okolností nenastěhují do volného domu.

Poznámky

 * 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.
 * Unlike chests and structures generated on world creation, bound NPCs spawn around the player's position on-the-fly, similar to enemy spawns. They are temporary, and can respawn again elsewhere if missed (see NPC spawning).
 * 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.
 * 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).
 * As the mobile version currently has no housing interface, it is not possible to assign NPCs to certain houses, therefore making it difficult to control which house each of them lives in.