Terraria game artwork
Terraria

Terrariaguide

NPC spawning: slot order, replacement and spawn rate

How Terraria assigns a new NPC to one of 200 slots, what happens when all slots are full, why a kill briefly halts spawns, and what the default spawn rate means per tick and per second.

About 1 min read

AI-assisted editorial · Independently AI-reviewed, not gameplay-tested.

Terraria artwork
Progress 0 / 3

Slot selection and replacement

A new NPC spawn attempt scans the 200 slots in order from the start and takes the first empty one, with a few exceptions to that rule. If no slot is free, the game looks for a replaceable NPC and puts the incoming NPC in its place; when none qualifies as replaceable, the attempt fails and nothing appears.

Spawn rate basics

Spawn rate determines the chance of an NPC spawning on each tick. The default value is 1/600, which the source describes as a 0.17% per-tick chance and about a 9.52% chance per second that at least one NPC spawns.

Step-by-Step Guide

  1. Expect first-empty-slot placement

    New NPCs generally go into the earliest empty slot, keeping in mind that the source notes exceptions to this ordering.

  2. Fill slots with replaceable NPCs

    When every slot is taken, a spawn succeeds only by swapping out a replaceable NPC; lacking any replaceable occupant, the attempt produces nothing.

  3. Allow for the post-death gap

    After any NPC dies or despawns, spawning is suppressed for the next tick for all players.

Did this answer your question?

Report a correction

Explore Terraria

Game hub

More from this game

Terraria

Master Mode difficulty and boss rewards

Master Mode is a world-creation difficulty above Expert Mode. All Expert changes carry over, bosses scale higher, and boss kills add Master-exclusive rewards such as relics and themed summons.