- summary: What the NPC says now and the replies you may choose; answer with one reply_id or leave the dialog.
- area: Game.Npc
What the NPC says now and the replies you may choose; answer with one reply_id or leave the dialog.
Kind event · Area Game.Npc
What the NPC says now, and the replies you may choose. It arrives right after
NpcDialogCreationEvent (the first line) and after each
NpcDialogReplyRequest that leads to another line.
WHAT TO DO WHEN YOU RECEIVE IT
1. SHOW OR LOG THE LINE. message_id is the NPC's line of text: an NPC
message id of the game data (the NPC data lists the messages it can say;
the message table holds the text). Substitute dialog_params, in order,
into its placeholders.
2. LIST THE REPLIES. Each entry of visible_replies is one answer you may
give: its reply_id names the reply text in the game data (the NPC data
lists its replies) and is THE id you send back. Its actions say what
picking it does (start a quest, validate a quest step, start a fight...);
the official client only uses them to choose each reply's icon.
3. ANSWER WITH ONE OF THEM, OR LEAVE. Send NpcDialogReplyRequest with a
reply_id taken from THIS message's visible_replies - never one from an
earlier line, never an id you made up - or close the dialog with
DialogLeaveRequest. The server then sends the next line (this message
again) or closes the dialog (DialogLeaveEvent).
4. AN EMPTY visible_replies means nothing to answer: leave the dialog.
WHAT THE OFFICIAL CLIENT DOES WITH IT
- Its dialog service builds a table reply id -> list of (action id, action
argument) from visible_replies, waits until the dialog window opened by
NpcDialogCreationEvent is ready (its routine WaitForDialogUi), then
shows message_id with dialog_params and one button per reply.
- The buttons send NpcDialogReplyRequest with the clicked reply's id.
YOUR CAPTURE (3.6.12.16): message_id 30637, no dialog_params, one reply, reply_id 36979, no actions - the Incarnam portal NPC's single answer.
Builds pad this message, its replies and their actions with unread strings, enums, int64 lists or nested decoys; the client reads only the members above.
When you may send it
- Requires
npc_dialog_openinferred
Related messages
- Arrives after
NpcDialogCreationEvent - Arrives after
NpcDialogReplyRequest
Fields
| # | Field | Type | Meaning | You set it |
|---|---|---|---|---|
| 1 | visible_replies | repeated VisibleReply | The replies you may choose now, in display order. Send one VisibleReply.reply_id back in NpcDialogReplyRequest.Empty means there is nothing to answer. | never |
| 2 | dialog_params | repeated string | Values to substitute, in order, into the line's placeholders. Often empty. The client copies them into a list and hands them to the dialog window with the message id. | never |
| 3 | message_id | int32 | The NPC's line of text, as an NPC message id of the game data. (NPC message id) Your capture: 30637 on the Incarnam portal NPC. | never |