Quest Dialog
Version support
Section titled “Version support”| Version | Status |
|---|---|
| v92 | Full |
| v90 | - |
| v86 | - |
QuestDialog files define NPC dialog sequences used during quests. Each file contains a single dialog identified by a composite key of huntingZoneId and id, with ordered Text entries containing Page elements that hold the actual dialog content.
Files are partitioned by composite key: QuestDialog_{huntingZoneId * 100 + id}.xml.
DSL support
Section titled “DSL support”Entity: questDialogs
Operations: upsert, update (text-level CRUD + reorder)
The questDialogs section uses a two-tier operation model:
upsertoperates on the root dialog — creates or fully replaces the dialog and all its textsupdatetargets individual texts within an existing dialog — supports create, update, delete, and reorder sub-operations
Quick recipes
Section titled “Quick recipes”Upsert a dialog
Section titled “Upsert a dialog”Creates the dialog if it does not exist, or fully replaces all texts if it does. Text list order determines physical XML element order.
spec: version: "1.0" schema: v92
questDialogs: upsert: - huntingZoneId: 100 id: 1 voiceTypeId: 0 texts: - id: 1001 npcZoneId: 100 villagerId: 63001 pages: - social: 0 content: "Greetings, adventurer." - social: 0 content: "I need your help with something." - id: 1002 npcZoneId: 100 prevId: 1001 villagerId: 63001 pages: - social: 0 content: "Thank you for accepting."Add a text to an existing dialog
Section titled “Add a text to an existing dialog”questDialogs: update: - huntingZoneId: 100 id: 1 texts: create: - id: 1003 after: 1001 npcZoneId: 100 prevId: 1001 villagerId: 63002 pages: - social: 0 content: "A new dialog entry."Update text attributes
Section titled “Update text attributes”Omitted fields are left unchanged. Setting pages replaces all pages; omitting pages preserves existing pages.
questDialogs: update: - huntingZoneId: 100 id: 1 texts: update: - id: 1001 villagerId: 63005 pages: - social: 1 content: "Updated dialog text."Delete texts
Section titled “Delete texts”questDialogs: update: - huntingZoneId: 100 id: 1 texts: delete: - 1002 - 1003Reorder texts
Section titled “Reorder texts”Specifies the complete desired order. Texts not listed are appended at the end.
questDialogs: update: - huntingZoneId: 100 id: 1 texts: reorder: - 1003 - 1001 - 1002Combined text operations
Section titled “Combined text operations”A single update block can carry multiple text operations. They execute in order: create, update, delete, reorder.
questDialogs: update: - huntingZoneId: 100 id: 1 texts: create: - id: 1004 npcZoneId: 100 villagerId: 63001 pages: - social: 0 content: "New entry." update: - id: 1001 villagerId: 63010 delete: - 1002 reorder: - 1004 - 1001 - 1003Properties reference
Section titled “Properties reference”Dialog root (upsert)
Section titled “Dialog root (upsert)”| Property | Type | Since | Required | Description |
|---|---|---|---|---|
huntingZoneId | int | v92 | Yes | Hunting zone identifier (part of composite key) |
id | int | v92 | Yes | Dialog identifier within the zone (part of composite key) |
voiceTypeId | int | v92 | No | Voice type identifier. Defaults to 0. |
texts | list[text] | v92 | No | Ordered list of text entries. Order determines XML element sequence. |
Text entry (upsert inline)
Section titled “Text entry (upsert inline)”Used within the texts list of an upsert operation.
| Property | Type | Since | Required | Description |
|---|---|---|---|---|
id | int | v92 | Yes | Unique text entry identifier |
npcZoneId | int | v92 | Yes | NPC zone identifier (written as huntingZoneId in XML) |
prevId | int | v92 | No | Previous text ID in the dialog chain. Omit when no predecessor. |
villagerId | int | v92 | Yes | NPC villager identifier |
pages | list[page] | v92 | Yes | Ordered list of dialog pages |
Text entry (create)
Section titled “Text entry (create)”Used within texts.create of an update operation.
| Property | Type | Since | Required | Description |
|---|---|---|---|---|
id | int | v92 | Yes | Unique text entry identifier |
after | int | v92 | No | Insert after the text with this ID. Omit to append at end. |
npcZoneId | int | v92 | Yes | NPC zone identifier |
prevId | int | v92 | No | Previous text ID in the dialog chain |
villagerId | int | v92 | Yes | NPC villager identifier |
pages | list[page] | v92 | Yes | Ordered list of dialog pages |
Text entry (update)
Section titled “Text entry (update)”Used within texts.update of an update operation. Omitted fields are left unchanged.
| Property | Type | Since | Required | Description |
|---|---|---|---|---|
id | int | v92 | Yes | Text entry to update |
npcZoneId | int | v92 | No | NPC zone identifier |
prevId | int | v92 | No | Previous text ID. Cannot remove via update; use upsert to replace the dialog without prevId. |
villagerId | int | v92 | No | NPC villager identifier |
pages | list[page] | v92 | No | Replaces all pages. Omit to preserve existing pages. Empty list removes all pages. |
| Property | Type | Since | Required | Description |
|---|---|---|---|---|
social | int | v92 | Yes | Social animation type |
voiceTypeId | int | v92 | No | Voice type for this page. Omitted in XML when absent. |
content | string | v92 | No | Dialog text content. Null for empty placeholder pages. |
XML structure
Section titled “XML structure”QuestDialog_{huntingZoneId * 100 + id}.xml└── QuestDialog (huntingZoneId, id, voiceTypeId) └── Text (huntingZoneId, id, prevId?, villagerId) [multiple, ordered] └── Page (social, voiceTypeId?) [up to 7] └── text content- Composite key: Dialogs are identified by
huntingZoneId+id. Both are required for all operations. - File partitioning: Each dialog gets its own file:
QuestDialog_{huntingZoneId * 100 + id}.xml. - Text ordering: The physical order of
Textelements in XML matters. Use thereorderoperation or control order via thetextslist in upsert. npcZoneIdvshuntingZoneId: In YAML, text-level zone is callednpcZoneIdto avoid ambiguity with the roothuntingZoneId. Both map to the XML attributehuntingZoneId.prevIdremoval: TheprevIdattribute cannot be removed via a partial update. To remove it, upsert the entire dialog withoutprevIdon the target text.- Page limit: The XSD allows up to 7 pages per text entry.
- Idempotent upsert: Applying the same upsert spec twice produces identical XML output.