Respawn Areas Entity
Respawn Areas Entity
The respawn entity configures automatic respawning for objects including NPCs, enemies, and items.
Key Properties
- object_id: Reference to objects entity
- respawn_time: Time in milliseconds between respawns
- instances_limit: Maximum concurrent instances (0 = unlimited)
- layer: Tilemap layer for respawn placement
How Respawn Works
- Object is defeated, collected, or removed
- Timer starts based on respawn_time
- After timer expires, object reappears at original position
- Respects instances_limit for spawn caps
Use Cases
- Enemy Respawn: Enemies respawn after defeat for grinding
- Item Respawn: Collectible items reappear after pickup
- NPC Respawn: NPCs return after being killed
- Resource Nodes: Harvestable resources regenerate
Instance Limits
The instances_limit property controls how many copies of an object can exist simultaneously:
- 0: Unlimited instances (object respawns indefinitely)
- 1: Only one instance at a time (wait for defeat before respawn)
- N: Maximum N instances active simultaneously
Respawn Strategies
- Fixed Location: Object always respawns at original position
- Timed: Respawn after fixed time delay
- Capped: Limit concurrent instances per area
Database Relations
- objects: Parent object to respawn
Implementation
Configure respawn settings in the admin panel under Objects → Respawn. Set respawn_time in milliseconds and instances_limit based on desired gameplay balance.
Example Configuration
- Boss Enemy: respawn_time=1800000 (30 minutes), instances_limit=1
- Regular Enemy: respawn_time=60000 (1 minute), instances_limit=5
- Collectible Item: respawn_time=300000 (5 minutes), instances_limit=1
- Resource Node: respawn_time=180000 (3 minutes), instances_limit=3
reldens