During the daytime of 15 minutes, only 1 NPC can spawn every 2 minutes, the NPC must not exist yet and the necessary conditions (separate houses, …) must be met. If multiple NPCs are eligible, then only the first eligible will spawn. It is checked in the following order:
- Guide: No conditions.
- Merchant: House, players have more than 50 silver together (in their inventory).
- Nurse: House, used a crystal heart.
- Arms Dealer: House, carry a gun in your inventory.
- Dryad: House, must have killed a boss.
- Demolitionist: House, Merchant, explosive material in inventory.
- Clothier: House, Skeletron killed.
Exceptions to the single NPC rule, which spawn before the order given above:
- Second Merchant: House, at least 3 players having more than 10 gold together.
- Second Nurse: House, at least 3 players having 20 hearts (i.e., 400 combined health or more).
- Third Merchant: House, at least 5 players having more than 5 platinum together.
There is no order in which they spawn over time. But they can't spawn together, thus first in order…
else ifinstead of checkingspawnNPCa dozen times. – a cat Jun 11 '11 at 20:35else ifconditions, the proper way to do this is to create policies which you put in a list and enumerate over... – Tamara Wijsman Jun 11 '11 at 20:38