Documentation
LoreHub Dialogue System

Link version 1

Schema

{
  "type": "@lorehub/dialogue-link",
  "apiVersion": "1.0.0",
  "id": "dialogue/6147dcb9-b8bd-4238-9c8b-5b773260570c/dialogue-link/ef5c3115-f7d4-4f42-9d87-79b046be56f9",
  "from": "dialogue/6147dcb9-b8bd-4238-9c8b-5b773260570c",
  "to": "dialogue/6147dcb9-b8bd-4238-9c8b-5b773260570c/dialogue-node/895b060b-8af4-47c7-b607-98455103e9b1",
  "requiredVariables": [
    {
      "variableId": "f7fbdcd0-60ac-407e-9239-bb3214119298",
      "value": "true"
    }
  ]
}

from - the fully qualified name of the resource link starting from.

to - the fully qualified name of the resource link leads to.

requiredVariables - optional. Conditions to follow the link: every variable must have the given value, so all conditions must be met (AND). Left out when the link has no conditions.

A node without options, or an option, can have several links. Follow a link whose conditions are all met. The dialogue has one link, to its first node.

State data conditions

A condition can check the dialogue's state data (node, option) instead of a variable: whether a node was played or an option was selected. Such a condition has kind, and its variableId is the id of the node or option, which is always in the same dialogue:

{
  "variableId": "08acd44c-a3f6-4f82-9adf-c0b6f87b882d",
  "value": "true",
  "kind": "stateData.isOptionSelected"
}

kind - optional. Left out when variableId is a variable.

  • stateData.isNodePlayed - variableId is a node; the condition is met when the node's stateData.played equals value.
  • stateData.isOptionSelected - variableId is an option; the condition is met when the option's stateData.selected equals value.

value - "true" or "false".

LoreHub doesn't let authors delete a node or option while a condition checks it, so variableId always points to a node or option of the exported dialogue.