Documentation
LoreHub Dialogue System

Dialogue Node version 1

Node without content

{
  "type": "@lorehub/dialogue-node",
  "apiVersion": "1.0.0",
  "id": "1270e167-31a0-457d-acee-654a94259445",
  "stateData": { "played": false }
}

Node that will end dialogue

{
  "type": "@lorehub/dialogue-node",
  "apiVersion": "1.0.0",
  "id": "1270e167-31a0-457d-acee-654a94259445",
  "contentBlockId:": "6a302631-8e79-405e-8bc7-0e2d68b02a32"
}

Schema: Node that is linked to the next node

{
  "type": "@lorehub/dialogue-node",
  "apiVersion": "1.0.0",
  "id": "1270e167-31a0-457d-acee-654a94259445",
  "contentBlockId:": "6a302631-8e79-405e-8bc7-0e2d68b02a32",
  "nextDialogueNodeId": "ec29227d-1bcf-42dd-87ba-e16fd0c40f02"
}

Schema: Node with options

{
  "type": "@lorehub/dialogue-node",
  "apiVersion": "1.0.0",
  "id": "1270e167-31a0-457d-acee-654a94259445",
  "contentBlockId:": "6a302631-8e79-405e-8bc7-0e2d68b02a32",
  "optionsIds": [
    "553cd90c-0b6f-4d5a-8bdf-4c83183fb65e",
    "d0d93878-797a-42ae-ac8b-19d77d5d4042"
  ]
}

Schema: Node with Meta Schema

{
  "type": "@lorehub/dialogue-node",
  "apiVersion": "1.0.0",
  "id": "1270e167-31a0-457d-acee-654a94259445",
  "contentBlockId:": "6a302631-8e79-405e-8bc7-0e2d68b02a32",
  "setVariableOnStart": [
    {
      "variableId": "f7fbdcd0-60ac-407e-9239-bb3214119298",
      "value": "true"
    }
  ],
  "metaData": [
    {
      "metaSchemaId": "f1752f55-4a68-4289-9e11-b1a91620f926",
      "metaSchemaValue": "castle.png"
    },
    {
      "metaSchemaId": "f7fbdcd0-60ac-407e-9239-bb3214119298",
      "metaSchemaValue": "23"
    }
  ]
}

SetVariableOnStart

Contains reference to variable and value that should be set on start.

A number variable can also be changed by an amount. Such an entry has operation:

{
  "variableId": "3b0c3e4e-5b1c-4a55-8f0a-5f7d1d2a9b11",
  "value": "5",
  "operation": "subtract"
}

operation - optional, left out when it is set. set gives the variable value; add and subtract add or subtract value, which is 0 or more. An unsignedNumber never goes below 0. Boolean variables are only set.

MetaData

Is an object that contains reference to Meta Schema and value as string. Meta Schema is a JSON object that contains metadata about the node.

StateData

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

"stateData": {
  "played": false
}

played - false until the node is shown, 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.