Skip to content

Quest Dialog

VersionStatus
v92Full
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.


Entity: questDialogs Operations: upsert, update (text-level CRUD + reorder)

The questDialogs section uses a two-tier operation model:

  • upsert operates on the root dialog — creates or fully replaces the dialog and all its texts
  • update targets individual texts within an existing dialog — supports create, update, delete, and reorder sub-operations

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."
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."

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."
questDialogs:
update:
- huntingZoneId: 100
id: 1
texts:
delete:
- 1002
- 1003

Specifies the complete desired order. Texts not listed are appended at the end.

questDialogs:
update:
- huntingZoneId: 100
id: 1
texts:
reorder:
- 1003
- 1001
- 1002

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
- 1003

PropertyTypeSinceRequiredDescription
huntingZoneIdintv92YesHunting zone identifier (part of composite key)
idintv92YesDialog identifier within the zone (part of composite key)
voiceTypeIdintv92NoVoice type identifier. Defaults to 0.
textslist[text]v92NoOrdered list of text entries. Order determines XML element sequence.

Used within the texts list of an upsert operation.

PropertyTypeSinceRequiredDescription
idintv92YesUnique text entry identifier
npcZoneIdintv92YesNPC zone identifier (written as huntingZoneId in XML)
prevIdintv92NoPrevious text ID in the dialog chain. Omit when no predecessor.
villagerIdintv92YesNPC villager identifier
pageslist[page]v92YesOrdered list of dialog pages

Used within texts.create of an update operation.

PropertyTypeSinceRequiredDescription
idintv92YesUnique text entry identifier
afterintv92NoInsert after the text with this ID. Omit to append at end.
npcZoneIdintv92YesNPC zone identifier
prevIdintv92NoPrevious text ID in the dialog chain
villagerIdintv92YesNPC villager identifier
pageslist[page]v92YesOrdered list of dialog pages

Used within texts.update of an update operation. Omitted fields are left unchanged.

PropertyTypeSinceRequiredDescription
idintv92YesText entry to update
npcZoneIdintv92NoNPC zone identifier
prevIdintv92NoPrevious text ID. Cannot remove via update; use upsert to replace the dialog without prevId.
villagerIdintv92NoNPC villager identifier
pageslist[page]v92NoReplaces all pages. Omit to preserve existing pages. Empty list removes all pages.
PropertyTypeSinceRequiredDescription
socialintv92YesSocial animation type
voiceTypeIdintv92NoVoice type for this page. Omitted in XML when absent.
contentstringv92NoDialog text content. Null for empty placeholder pages.

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 Text elements in XML matters. Use the reorder operation or control order via the texts list in upsert.
  • npcZoneId vs huntingZoneId: In YAML, text-level zone is called npcZoneId to avoid ambiguity with the root huntingZoneId. Both map to the XML attribute huntingZoneId.
  • prevId removal: The prevId attribute cannot be removed via a partial update. To remove it, upsert the entire dialog without prevId on 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.