NPCs and Dialog
Villagers (NPCs) are the people of your world: they stroll near home, talk, sell, and can carry quests.
The NPC Portfolio
The NPC Portfolio page of Edit > Project Settings (under NPCS) opens one page per villager, or right-click a villager on the map and choose View In Editor. The list on the left is everyone on this map.
- Shop
- Talking to them opens their counter directly.
- Killable
- They can be struck down, whether or not they run a shop. See Killable Characters. They drop their Drop Stock, their type's drop list from ENEMIES > Loot and their money, the flag
killed_<name>is set, and their event's[killed]section runs. - Name
- Their tag. A tagged villager speaks from their own dialogue document (
assets/dialog/<tag>.vfa) and keeps their own shop stock, so two villagers of one kind lead two lives. - NPC type
- Which body they wear.
- Talk event
- An event whose
[talk]section runs when a conversation starts. - Quest tags
- A comma list of the quests they carry.
Edit Inventory fills two pockets. Shop Stock is what they sell, with the merchant's own settings above it: Starting funds (the money in their purse, used when Merchants have their own money is on, on the MONEY > Shops page), Sell price, Markup, Buy only, Buys (the item types they take), Faction (whose prices they use), Restock every and Haggle. A blank box uses the Shops page. Each ware has a count: press - on a count of 1 to make the ware unlimited (an infinity sign shows), and + to give it a count again. Under each ware, Price is its own price (blank uses the item's), Costs is what it takes in items (3 Wolf Pelt), and the chip at the end is the currency it is priced in. Shops tells what each does. Drop Stock is what they leave when they die, and Coin dropped is the money they spill. Changes save as you make them, and anything else written in the file by hand is kept, including wares whose item has left the catalog (they show dimmed).
Placing a villager
- Open Edit > Project Settings... and choose NPC Portfolio under NPCS.
- If a villager's page is showing, press Types / Place New under the list on the left.
- Pick a type from the Types: list. Every character and enemy type in the project is there. A new project has one villager type, Villager: a plain body, drawn as a picture in a 2D project and as a model in a 3D one, and in a 2.5D project as Characters are on the Project page of Project Settings says. A project with no NPC type of its own (the player's character does not count) shows Villager at the end of the list, and the type is made the first time you place one or change its Category.
- Leave Aggressive unticked. A type whose box reads Aggressive (always) is a Creature and is placed as an enemy.
- Press Place on map. The settings window closes while you place.
- Click the map where they should stand, then press Esc to stop placing.
Open the NPC Portfolio again and the new villager is in This map's cast: on the left. Click a name to open that villager's page.
Pick a type that talks in the Types: list and its Dialog look shows under the list: where its dialogue box sits, its colours, font, typing and portrait. Every villager of that type wears it. See The Dialog Box.
A name over their head
In play a villager's name can float over them as the player comes near: their tag, else their type's name. A new project shows it within 12 metres. NPC names on the ENEMIES Types page turns it on for the project. Show name under Category on the Types: view sets it for one type: Never, Always, Near or After a hit. Name distance is on the ENEMIES Stats page. See Names Over Characters.
Moving them
Villagers stroll near their home spot on their own. A script sends one somewhere with move <npc> <x> <y> and turns them with face <npc> <0-7|player>. Pathing takes them around walls.
Crowds
File villagers in an Outliner folder (right-click one, Move to Folder) and they move as a crowd. Click the folder's row and set its Crowd in Properties: Wander has each pick its own spots near home and pause between them, Idle stands each at home, Patrol walks each a beat round its home, and Follow keeps them near the folder's first villager. A villager with Own crowd settings ticked keeps its own instead. The other rows (roam, walk speed, pauses, personal space, keeping together) and the paths a crowd keeps to, like sidewalks and queues, are on Pathing.
Dialogue documents
A conversation is a Dialogue document in assets/dialog/. Write it on the Dialog page (Edit > Project Settings, under NPCS), or open it in the asset manager. Every document needs a start node.
VordrAsset { AssetType = Dialogue }
comp node start -1 -
field line Well met, traveller. The road north is closed.
comp reply start.1 -1 -
field text Why is it closed?
field go why
comp reply start.2 -1 -
field text Surely you can let me through.
field go passed
field stat charisma
field dc 12
field fail refused
comp reply start.3 -1 -
field text About that beacon...
field go beacon
field flag beacon_lit
comp reply start.4 -1 -
field text Take the sword.
field go end
field act give iron_sword 1 ; flag set gave_sword
comp node why -1 -
field line Wolves. Three nights running.- node
- A page of the conversation. Each
linefield is something they say, one page each. - reply
- A choice the player can pick, belonging to the node above it.
- text
- The words of the reply.
- go
- Where the reply leads: a node,
endto close the talk, or@shopto open their counter. - stat, dc, fail
- A quiet stat check. The player sees only the stat's name, never the number. A failed check goes to
fail(or ends the talk). - flag, noflag
- The reply is shown only while the flag is set (flag) or not set (noflag).
- if, ifnot
- The reply is shown only while a line-script reading is true (if) or false (ifnot).
- act
- Rune verbs,
;between them, run when the reply is picked and before it leads on. On a checked reply they run only when the check passes.
A tagged villager reads <tag>.vfa first, then their kind's document, then default.vfa.
A line of speech can carry marks: {shake} and {wave} move the letters (end each with {/shake} or {/wave}), {color=#RRGGBB} colours them until {/color}, {pause=1} stops the words a while, {speed=2} types them faster until {/speed}, and {face=happy} turns the portrait to that frame. {{ writes a plain {.
Writing it on the Dialog page

- Open Edit > Project Settings... and choose Dialog under NPCS.
- At the top left is who talks. Click the name to pick a tagged villager, a type, or
default(read in the order above). Beside it is the document it writes;(new)means it does not exist yet. Style picks the UI style pack this conversation's chat box wears; Project's uses the project's own pack. Look folds out this conversation's own dialog box look: whether the box sits at the bottom, the top, the middle or beside the speaker, whether it covers the HUD or keeps clear of the skill bar, its opacity, font, colours, portrait and typing. The two icons beside Style show the conversation as an outline or as a node graph. The disk at the top right saves it, and wears a dot while there are changes not yet written. - On the left is the conversation's outline:
start, and under each node where its replies lead. End and Shop end a road, a road a failed check takes is red, and a node reached a second time shows dim, as a link to it. Click a node to write it; its chevron folds what is under it. + under the outline adds a node. - On the right is the node you picked. Node is its name; renaming it renames every road that leads to it, and the trash beside it removes the node. A new document starts with its
startnode. - Under Says, press +, type what they say and press Enter. Each line is one page of speech. Clear a line, or press the trash at its right, to take it out.
- Under Replies, press + and type the reply's words. Each reply folds to one row: its words, chips for what it needs and does, and at the right where it leads. Click a reply's row to open it, and its chevron to fold it again.
- An open reply has its own rows. Goes to is where it leads: a node, End to close the talk, or Shop to open their counter; the arrow beside it opens that node. Shown gates the reply: a flag is picked from the flags the project names, or New... to type one, and a reading is picked in parts: what is read, of what, how it compares, and the number. Check picks an attribute for a quiet stat check, with its DC beside it, and If it fails is where a failed check leads.
- Does is what the reply does, one action to a row: a Rune verb first (give, take, gold, flag, quest and say head the list), then each of its words, picked from what the project has, or typed when it is a number or a sentence. A flag's name can be New... too. + adds an action and opens its verbs; the trash takes one out. Eight actions show as rows; an act with more keeps the rest as written, under Then. A change that would make the act longer than a reply holds is refused.
- Press the disk to save.
The rows match the document's fields: a line under Says is line, a reply's words are text, Goes to is go, Shown picks flag, noflag, if or ifnot, Check, DC and If it fails are stat, dc and fail, and Does is act. A reply's say action shows its words at the foot of the screen when it is picked, so the player sees what happened.
The graph
In the graph, every node is a card with its lines and its replies, and a wire runs from each reply to where it goes. Pull a wire from a reply's pin onto a card to send it there; drop it on open canvas for a list of End, Shop or a new node. Drag cards to arrange them, middle-drag to pan, and use the wheel to zoom. Click a card to write it in the sheet beside the graph. The cards' places are saved in the document (pos), and the game ignores them. The editor remembers which view you last used.
From a script
dialog elder_runa open a conversation
shop smith_bryn open a shop counter
say Cold night, traveller.