51. Add a new topic while the game is running
Dialogue-editing actions can add a clue topic after a discovery. Add the answer first, then add the response that points to it. Both IDs must be new in the intended scope.
await AddDialogueLine({
"dialogueId":"archive_chat",
"nodeId":"lantern_reply",
"speakerId":"elias",
"text":"The lantern is by the workshop door.",
"returnToPrevious":true
})
await AddDialogueChoice({
"dialogueId":"archive_chat", "nodeId":"topics",
"choiceId":"ask_lantern",
"text":"Where is the lantern?",
"next":"lantern_reply"
})Figure 37. The new lantern question appears in the running conversation.
The same actions are available visually. Add Dialogue Choice Node creates a menu node; it does not automatically invent its options or connect that menu into the conversation.
These changes affect the running game’s project data. They do not silently rewrite your authored editor file. Save/load can preserve the runtime changes, so test both a fresh game and a loaded save.
