Documentation
LoreHub Dialogue System

Link version 1.1

Link 1.1 is Link v1 with one more optional field, entry. Everything else is the same: from, to, requiredVariables with operators and state data conditions.

Schema

A normal link has no entry:

{
  "type": "@lorehub/dialogue-link",
  "apiVersion": "1.1.0",
  "id": "dialogue/6147dcb9-b8bd-4238-9c8b-5b773260570c/dialogue-link/ef5c3115-f7d4-4f42-9d87-79b046be56f9",
  "from": "dialogue/6147dcb9-b8bd-4238-9c8b-5b773260570c/dialogue-node/2d6b1c8e-0f1a-4f7e-9b0e-6c3a1f2d4e5a",
  "to": "dialogue/6147dcb9-b8bd-4238-9c8b-5b773260570c/dialogue-node/895b060b-8af4-47c7-b607-98455103e9b1"
}

A link that returns to the options of a node:

{
  "type": "@lorehub/dialogue-link",
  "apiVersion": "1.1.0",
  "id": "dialogue/6147dcb9-b8bd-4238-9c8b-5b773260570c/dialogue-link/0b7e3c55-1d2f-4a8e-9f61-3c5d7e9a1b24",
  "from": "dialogue/6147dcb9-b8bd-4238-9c8b-5b773260570c/dialogue-node/2d6b1c8e-0f1a-4f7e-9b0e-6c3a1f2d4e5a",
  "to": "dialogue/6147dcb9-b8bd-4238-9c8b-5b773260570c/dialogue-node/895b060b-8af4-47c7-b607-98455103e9b1",
  "entry": "options"
}

from, to, requiredVariables - as in Link v1. to is always the node itself, also when the link returns to its options.

entry - optional. How the link enters the node it leads to. Left out for a normal link, which plays the node from the start.

  • "options" - return to the node's options:
    • don't show the node's content again;
    • don't run its setVariableOnStart again;
    • its stateData.played stays true;
    • show its options, and check each option's requiredVariables again on every return, so an option can be hidden once it was picked.

LoreHub only lets a link return to the options of a node that has options.

Question hub

A link with "entry": "options" lets the player come back to the same questions. Sam asks "Do you have questions?" and offers three options. Each option leads to Sam's answer, and each answer links back to Sam's node with "entry": "options". After the answer the game shows the three questions again, without Sam asking "Do you have questions?" a second time.

Reading 1.1.0 with a 1.0.0 reader

A reader written for 1.0.0 ignores entry and plays the node from the start. The dialogue still works: the player still gets back to the options, only the node's line repeats.