Documentation
LoreHub Dialogue System

Dialogue Node Option version 1

Schema: Dialogue Node Options that ends Dialogue

{
  "type": "@lorehub/dialogue-node-option",
  "apiVersion": "1.0.0",
  "id": "f1752f55-4a68-4289-9e11-b1a91620f926",
  "text": "Bye",
  "stateData": { "selected": false }
}

Schema: Dialogue Node Option that leads to next node

{
  "type": "@lorehub/dialogue-node-option",
  "apiVersion": "1.0.0",
  "id": "f1752f55-4a68-4289-9e11-b1a91620f926",
  "nextDialogueNodeId": "c8781d12-1b55-40b9-8ae5-aed5f32b85dd",
  "text": "How are you?"
}

Schema: Dialogue Node Options with required variables

{
  "type": "@lorehub/dialogue-node-option",
  "apiVersion": "1.0.0",
  "id": "f1752f55-4a68-4289-9e11-b1a91620f926",
  "text": "Bye",
  "requiredVariables": [
    {
      "variableId": "f7fbdcd0-60ac-407e-9239-bb3214119298",
      "value": "true"
    }
  ]
}

RequiredVariables

Contains reference to variable and value that is required for this dialog option.

A required variable with kind (stateData.isNodePlayed or stateData.isOptionSelected) checks a node's stateData.played or an option's stateData.selected instead of a variable, see state data conditions.

StateData

Every option has a stateData block. It is required and always exported with its default value:

"stateData": {
  "selected": false
}

selected - false until the player picks the option, then the game engine or player sets it to true. It is runtime state: authors can't set it in LoreHub and it is not saved with the dialogue. Your game keeps it per playthrough and decides when to reset it.