NPCs

An NPC (Non-Player Character) is an automated character that provides some service to players. Most NPCs are vendors, providing items in exchange for coins (and coins in exchange for items). Exceptions are the Guide, who provides information, and the Old Man (before he becomes the Clothier). The Nurse doesn't sell items, but provides Health restoration in exchange for coins. Players can utilize NPCs by standing near them and right-clicking on them.

Conditions
An NPC will spawn when its specific conditions are met, usually by achieving a certain level of advancement in the game. Examples include acquiring 50 silver coins for the Merchant to spawn, or beating your first Boss for the Dryad to appear. See specific NPC requirements in the table below.

An additional condition required by all NPCs (except the Guide) is a vacant house built by the player. A house must include a table, a chair, and a door, be fully enclosed in blocks made of something other than dirt, have walls behind it made of something other than dirt or dungeon walls, and must have at least one light source. See Home for a full list of requirements. The Guide is an NPC that spawns upon creating a world, but will also move into the first house you build.

Multiple NPCs of one type
It is possible for up to three Merchants and two Nurses to spawn on a multiplayer server, given their spawn conditions :