All news
Feature

Every node knows if it was played, every option if it was selected

A dialogue often needs to remember what already happened in it: grey out a question the player already asked, or skip a line they have heard. Now every node and every option carries that state in the export, so your game doesn't need a variable for each one.

What's new

  • A stateData block in the export. Every node is exported with "stateData": { "played": false } and every option with "stateData": { "selected": false }. The block is always there, in both export v1 and v2.
  • Your game fills it in. Set a node's played to true when it is shown, and an option's selected to true when the player picks it. You decide when to reset them, for example on a new playthrough.
  • Nothing to author. You can't edit these values in LoreHub and they are not saved with your dialogue. The node inspector shows them locked, as played on the node and selected on each option.
  • In the player. When you test a dialogue, the player keeps the same state: nodes become played as you reach them and options selected as you pick them. The locked values in the inspector show the live state while the player is open. Step back and restart undo them.

In your export

{
  "type": "@lorehub/dialogue-node-option",
  "apiVersion": "2.0.0",
  "id": "dialogue/…/dialogue-node/…/dialogue-node-option/…",
  "text": "Who are you?",
  "stateData": { "selected": false }
}

See Dialogue Node v2 and Dialogue Node Option v2 for the details.

Try it

Export a dialogue from LoreHub and look for stateData on its nodes and options. If something feels off, tell us on Discord or Reddit.