Adding NPCs¶
Status: Current Last reviewed: 2026-09-07
NPCs are placed as npc_spawn objects and derived into NpcEntity at zone build time.
Placing an NPC¶
- In
/admin, pick NPC from the palette and click the ground. - In the inspector
props, set:
| Prop | Meaning |
|---|---|
npcId |
Stable id used by quests (giverNpcId) and dialogue. Make it unique. |
npcName |
Display name over the head and in dialogue. |
role |
Drives the model and colour. |
dialogue |
Array of lines shown when the player interacts. |
questIds |
Array of quest ids this NPC offers and completes. |
- Save Zone.
Roles¶
role maps to a Blender-authored model in client/src/render/characterAssets.ts. Shipped roles: militia_captain (helmed, spear), quartermaster, magic_trainer (hat, staff), banker, healer, villager. Editable source lives in art/blender/vyrgarde_characters_v2.blend; the repeatable authoring script is tools/blender/create_character_models.py, and runtime GLBs live in client/public/models/characters.
Wiring Quests to an NPC¶
An NPC offers a quest when its questIds contains the quest id and the player meets the quest's requires. The same NPC completes the quest if it is the quest's giverNpcId. So to make Captain Rusk give and complete a quest:
- Set the quest's
giverNpcIdtonpc_rusk. - Add the quest id to the
npc_ruskNPC object'squestIds.
Dialogue then lists the quest with its state, and pressing G (or clicking the row) accepts or turns it in. See Adding Quests.
Note
NPC positions and body headings stay fixed on the server. On the client they breathe, shift their weight, make role-specific idle gestures and glance at nearby players in front of them. These visual movements do not change interaction range. See Character models and animation for the Blender workflow and local preview.