Skip to main content

NPC Data Structure

NPCs (Non-Player Characters) and mobs are defined in JSON manifests and loaded at runtime. This data-driven approach allows content to be modified without code changes.
NPC data is managed in packages/shared/src/data/npcs.ts and loaded from world/assets/manifests/npcs.json.

Data Loading

NPCs are NOT hardcoded. The ALL_NPCS map is populated at runtime:

NPC Data Schema

Each NPC has the following structure:

NPC Categories

New Mobs (February 2026)

Combat Mobs

  • Cow (Level 2): Docile animal that drops cowhide for tanning
  • Bandit (Level 7): Aggressive outlaw with bronze sword
  • Barbarian (Level 14): Fierce desert warrior with iron equipment
  • Guard (Level 21): Town guard with bronze sword, drops iron equipment
  • Dark Ranger (Level 33): Ranged attacker using bronze arrows
  • Dark Wizard (Level 42): Magic attacker using Wind Strike spell

Quest NPCs

  • Captain Rowan: Town guard captain, starts “Goblin Slayer” quest
  • Forester Wilma: Woodcutting trainer, starts “Lumberjack’s First Lesson” quest
  • Fisherman Pete: Fishing trainer and shop owner, starts “Fresh Catch” quest
  • Torvin: Dwarven smith, starts “Torvin’s Tools” quest
  • Wizard Zamorin: Magic shop owner, starts “Rune Mysteries” quest
  • Lowe: Bowyer and fletcher, starts “Fletcher’s Introduction” quest
  • Dommik: Crafting supplier, starts “Crafting Basics” quest
  • Ellis: Tanner who converts hides to leather

Dialogue System

NPCs now support quest-aware dialogue with stage-specific responses:
Quest Overrides: NPCs can have different dialogue based on quest progress:
  • in_progress: Shown while quest is active
  • ready_to_complete: Shown when quest objectives are met
  • completed: Shown after quest completion

Aggression Types

NPCs have different aggression behaviors:

Aggro Rules


Drop Tables

Each NPC has a DropTable defining loot:

Drop Calculation


Available 3D Models

NPCs use rigged VRM models from /assets/models/:

Helper Functions

Get NPC by ID

Get NPCs by Category

Get NPCs by Biome

Get NPCs by Level Range

Check if NPC Can Drop Item


Combat Level Calculation

NPC combat level is calculated from stats:

Spawn Constants

Global spawn settings:

Example NPC Definition


Adding New NPCs

1

Add to JSON Manifest

Add entry to world/assets/manifests/npcs.json
2

Choose or Create Model

Use existing model or generate new one in 3D Asset Forge
3

Restart Server

Server must restart to reload manifests
DO NOT add NPC data directly to npcs.ts. Keep all content in JSON manifests for data-driven design.