Create shopkeepers, quest givers, and townspeople.
NPCs & Dialogue
NPCs are the non-player characters that bring your world to life — quest givers, merchants, trainers, and ambient townspeople.


NPC Properties#
| Property | Description |
|---|---|
| Name / Title | Display name and subtitle (e.g., "Kira — Village Blacksmith") |
| Role | Vendor, quest giver, innkeeper, blacksmith, stable master, etc. |
| Faction | Faction affiliation (affects reputation interactions) |
| Zone + Position | Which zone and X/Y coordinates |
| Portrait | Image shown during dialogue |
| Sprite | In-world visual appearance |
| Active | Whether the NPC is currently in the world. Dropping an NPC onto a map switches it on; after that, saving the map leaves Active exactly as you set it — an NPC you switched off stays off, even while it still has a spot on the map |
What NPCs Can Do#
| Role | Function |
|---|---|
| Quest Giver | Offers and completes quests (linked quest definitions) |
| Merchant | Has a shop with items to sell and buys player items |
| Innkeeper | Provides rest and HP/MP recovery |
| Blacksmith | Offers "Repair my gear", which opens the Repair window; may sell weapons/armor |
| Stable Master | Manages pet and mount storage |
| Trainer | Teaches the abilities on its Trainer list, for a gold or item fee you can price per ability — see Trainers and lesson prices below. Can be limited to players who meet its requirements (guild members only, a minimum level) — see Trainer requirements |
| Guard / Ambient | Has dialogue but no special function |
A trainer is how a spell reaches a player. Players can only cast abilities they have learned or that their gear grants — so any spell that is not on a class or template's starter list, in a skill book, or in a quest or event reward needs a trainer, or nobody will ever be able to use it. See Who can cast what.
Trainers and lesson prices#
A trainer lists every ability it teaches as a "Train Fireball (50 silver)" choice in its dialogue. Each ability can have its own price, so a master can teach a starter spell cheaply and charge far more — in silver, in a rare item, or both — for a top-tier one. Anything you don't price per ability costs the trainer's default cost.
Where: NPCs → (an NPC) → Behavior → Trainer card. The card only appears once the NPC has the Trainer role (set on the Identity tab).
How to set it up:
- Open the NPC and tick Trainer under Roles on the Identity tab.
- On the Behavior tab, find the Trainer card and pick abilities from + Add ability… — each one becomes a row.
- Set the Default cost fields at the bottom of the card. This is what every ability costs unless you say otherwise.
- For any ability that should cost something different, fill in its row: Silver, Cost Item and/or Qty. Leave a field blank to keep the default for that part of the fee.
- Save. Talk to the NPC in game — each Train choice shows the price that ability will actually charge.
| Field | What it does |
|---|---|
| Ability (row) | An ability this NPC teaches. The × removes it — and its price — from the trainer. |
| Silver (row) | Silver charged for this ability only. Blank = the default silver cost; 0 = free, even if the default isn't. |
| Cost Item (row) | Item taken from the player's bag for this ability. — NPC default — = use the default cost item (if any). |
| Qty (row) | How many of the cost item this ability takes. Blank = the default quantity. Needs a cost item — its own or the default. |
| Default cost (silver) | Silver charged for every ability without its own silver price. Blank or 0 = free. |
| Default cost item | Item taken for every ability without its own cost item. — None — = no item fee. |
| Default cost item qty | How many of the default cost item each lesson takes (at least 1). |
Gotchas:
- Each part falls back on its own. A row with only Silver filled still charges the default cost item. A lesson cannot waive a default item fee — if only some lessons should take an item, leave the default item empty and set the item on those rows.
- The player pays only when the lesson works. If they can't afford it, already know the ability, or are at the world's Max Learned Abilities, nothing is charged.
- The price is checked on the server. The player only picks which ability to learn; they can't change what it costs.
- Content checks flag bad prices. A price set for an ability the NPC no longer teaches is ignored, a negative price is treated as 0, and a cost item that no longer exists makes the lesson impossible to pay — each shows as a content warning (AI Validate on the NPC, and the game server's content problems list).
Trainer requirements#
A trainer can refuse to teach until a player has earned it. Give the trainer Requirements and it lists its lessons only for players who meet every one of them — a guild trainer that teaches members only, a master who wants level 20 first, a hermit who asks to see a token. Everyone else sees a single greyed-out Training row with your Locked message beside it, so they know why there is nothing to learn yet.
Where: NPCs → (an NPC) → Behavior → Trainer card → Requirements, at the bottom of the card. The card only appears once the NPC has the Trainer role.
How to set it up — a guild trainer that teaches members only:
- Build the quest that makes a player a member (the guild's joining quest) in the quest editor, if you haven't already.
- Open the trainer NPC. On the Behavior tab, scroll to Requirements at the bottom of the Trainer card.
- Click + Add condition, choose Quest is completed, and pick the guild's joining quest.
- Write the Locked message — for example "Only members of the Mages Guild are taught here."
- Save, then talk to the trainer on a character who has not handed the quest in: the lessons are gone, and a greyed-out Training row shows your message.
- Hand the joining quest in and talk to the trainer again: every lesson is back, at its usual price.
| Field | What it does |
|---|---|
| Requirements | The conditions a player must meet to be taught. They are the same conditions a conversation uses — quest state, flag, faction, level, item, silver, quest objective, time of day, skill level, variable — each with a Not tick to invert it. See the Conditions table in NPC Conversations. No conditions = the trainer teaches anyone. |
| Locked message | What a player who doesn't meet the requirements reads: beside the greyed-out Training row, and in chat if a lesson is refused. Up to 160 characters. Blank = "You don't meet this trainer's requirements yet." |
Gotchas:
- Every requirement must hold. Two rows mean both, never either. For "a member of this guild or that one", have each route set the same flag (a conversation choice's Set flag ON action) and require the flag.
- A requirement that can't be checked keeps the trainer locked. A condition the game doesn't recognise, or one left half-filled (Quest is completed with no quest picked), never holds — so the trainer teaches nobody, rather than everybody. The card lists these under the conditions while you edit.
- Deleting the quest or item a requirement names breaks the gate. Quest is completed on a deleted quest can never be met, so the trainer stays locked for everyone. It shows as a content warning (AI Validate on the NPC, and the game server's content problems list), which also says when a broken requirement would let everyone through instead.
- The gate also applies if the lessons were already on screen. A requirement is checked again the moment a lesson is picked. A player who stops meeting it with the window open — they sold the token, night fell — is refused with the locked message and nothing is charged. It is checked on the server, so a player can't get round it.
- "Quest is completed" means handed in. A quest whose objectives are done but which hasn't been turned in doesn't count. Use a one-time quest for membership: a repeatable quest stops counting while the player has taken it again.
- It locks the whole trainer, not one lesson. To teach some abilities to everyone and others to members only, use two trainers.
- Nothing is taken back. A player who stops meeting the requirements can't learn anything new from this trainer, but keeps every ability it already taught them.
- Translate the Locked message on the Localization page, like the NPC's other lines.
- There is no feature flag. Requirements are part of the Trainer role and always available.
Dialogue#
There are two ways to give an NPC something to say, and you can mix them across a world.
On the NPC itself — NPC Conversations. The NPC's own Conversation card holds nodes, player choices and server-run actions: give an item, take payment, set a flag, start a quest, teleport, open a shop. This is the one to reach for when the conversation belongs to the character rather than to a spot on the map.
On a map event — the event command system, the same tool used for cutscenes. You build the conversation by chaining commands:
- Show Text — "Welcome to my shop! See anything you like?"
- Show Choices — "Show me your goods" / "Got any quests?" / "Goodbye"
- Conditional Branch — check if a quest is active, if the player has an item, etc.
- Open Shop — opens the merchant's inventory
- Start Quest — begins a new quest
This gives you complete control over branching dialogue trees with conditions, loops, and variable tracking.
They don't stack. If a map event is bound to this NPC, that event takes the whole conversation and the NPC's own Conversation never opens. Pick one per NPC.
Shops#
NPC merchants have a configurable shop inventory:
| Property | Description |
|---|---|
| Item | Which item to sell |
| Base Price | Gold cost |
| Stock | Available quantity (-1 = unlimited) |
| Restock Interval | Seconds between restocks |
| Required Reputation | Faction reputation needed to see the item |
Stocking a lot at once#
Under Stock, Add many… opens the same browsable item list the loot editor uses — search plus Category / Type / Rarity / Tier filters, shift-click for a run, and Select all N matching. Everything you tick is stocked in one save rather than one save per item, which is the difference between a two-second general store and a forty-round-trip one.
Items the shop already stocks are greyed out as added, and if a selection includes one anyway it is skipped rather than duplicated — the result line tells you how many were stocked and how many were already there. Every new row lands on Auto pricing with unlimited stock; tune the rows afterwards. Loadout kits are still added one at a time, because a stock row sells exactly one kit.
Shops also support a buyback system — items players sell to the NPC can appear for other players to purchase.
Shops paid in your own currency#
Set Paid in on a shop (NPCs → Shops → a shop) to one of your Currencies and every price in it is an amount of that currency instead of silver. Such a shop only sells: it has no Sell or Buyback tab. If you delete the currency, the shop says it is not trading rather than falling back to silver.
Exchange vendors (items for items)#
Any stock row can be an exchange instead of a sale: the vendor asks for items and hands items back, no silver involved. Author it on the row in NPCs → Shops → (a shop) → Stock:
| Field | What it does |
|---|---|
| Exchange costs | The items the vendor wants — one or more entries of item × quantity. The player must hand over all of them per trade. |
| Gives per trade | How many of the stocked item one trade hands over (default 1). |
A row with exchange costs ignores its price fields entirely — in the shop window it lists with a ⇄ cost line, an "The vendor wants" panel showing owned vs. needed counts, and an Exchange button instead of Buy.
How to set one up:
- Open NPCs → Shops and create a shop (or open an existing one).
- On the Stock tab, add the item the vendor gives out, then add its Exchange costs (e.g. 5× Wolf Pelt) and set Gives per trade.
- Assign the shop to an NPC as usual — the exchange rows sit beside normal priced rows in the same window.
Gotchas:
- Rotation and restock work unchanged — exchange rows honor stock sets, rotation groups, quantities and restock timers exactly like priced rows, so a rotating exchange list is just a rotation group of exchange rows.
- Stock counts units of the given item: a trade that gives ×5 consumes 5 stock.
- A full bag can still trade when handing over the payment frees the slot the goods need. If they would not fit even then, the vendor refuses and takes nothing.
- List each cost item once. Two cost entries for the same item are added together: 3× Wolf Pelt twice means the vendor wants 6.
- If a cost item's definition is deleted, the row is hidden rather than listed as unpayable.
- Adventurer NPCs never take exchange rows — they only spend coin.
Roles are freeform tags on top of a small set of interaction types (dialogue, quest giver, vendor, trainer, service), so "Innkeeper" or "Blacksmith" is a flavor label on a vendor/service NPC rather than a distinct engine mode.
Death VFX#
Like mobs, each NPC can pick a per-NPC Death VFX from the VFX editor, falling back to the editable engine default when unset.
AI Chat (optional, runtime LLM dialogue)#
When the npcAiChat feature is enabled and an AI provider/credits are configured, players can talk freely to an NPC and the server answers in character through the normal dialogue channel, with hard per-conversation budget caps. With no key or credits it simply falls back to the authored event-command dialogue — so AI chat is a live enhancement layered on top of your scripted lines, never a replacement. (This is a player-facing runtime feature, distinct from the authoring-time Studio AI; see Providers & AI Credits for the cost model.)