add_dialog_node
Adds a node to an existing dialog. Use parentType to add a PC reply, an NPC entry from a reply, or a root NPC entry to StartingList for quest-stage branching with condition scripts.
Instructions
Add a node to an existing dialog. If parentType is 'entry', adds a PC reply linked from that entry. If parentType is 'reply', adds an NPC entry linked from that reply. If parentType is 'dialog', adds a new NPC root entry to the StartingList (use for quest-stage branching with condition scripts). For 'dialog' mode, parentIndex controls insertion position: 0 inserts at the beginning (evaluated first), -1 or omit appends at the end (evaluated last).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"dialog": "<dialog>",
"parentIndex": "<parentIndex>",
"parentType": "<parentType>",
"text": "<text>"
},
"name": "add_dialog_node"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Dialog text for the new node | |
| dialog | Yes | Dialog resref | |
| script | No | Action script resref (runs when node plays) | |
| condition | No | Condition script on the link from parent | |
| parentType | Yes | Type of parent: 'entry' adds PC reply, 'reply' adds NPC entry, 'dialog' adds NPC root entry to StartingList | |
| parentIndex | Yes | Index of parent node in its list (EntryList or ReplyList). For parentType 'dialog': 0=insert at start, -1=append at end |