Documentation
LoreHub Dialogue System
Documentation & Tutorials
LoreHub Dialogue System
Introduction
Dialogue Schema
Concept
Examples
Tutorials
Dialogue System for Unity
Dialogue System for Godot
Dialogue Schema API
Export Schema v.1
Export Schema v.2
Relations v.1
Document v.1
Dialogue v.1
Dialogue v.2
Dialogue Node v.1
Dialogue Node v.2
Dialogue Node Option v.1
Dialogue Node Option v.2
Variable v.1
Meta Schema v.1
Content Block v.1
Link v.1
Link v.1.1
Relations version 1
relations.json holds every relation between documents in a world: who is whose parent, ally or rival, and how strongly. Game Sync writes it at the top of a game's folder, next to the dialogues, whenever the world has relations. You can also download it from GET /api/v2/Export/ExportRelations/{worldId}.
Schema
{
"schemaVersion": 1,
"relationTypes": [
{ "key": "ally", "id": "5f0c7a52-3e8e-4f5b-9a8f-0c3b6b1d9f10", "sides": ["Ally", "Ally"], "shape": "mutual", "hasValue": true, "colour": "green" },
{ "key": "parent_child", "id": "b8d1f7e4-0a52-4c39-8c1d-7f1e2a6c4b90", "sides": ["Parent", "Child"], "shape": "hierarchy", "hasValue": false, "colour": "blue" }
],
"documents": [
{ "id": "031476c0-2504-4ed7-aa79-e5fce21e2091", "name": "Mira Voss", "template": "Character" },
{ "id": "4a8e2d10-6c1f-4f0e-9d7a-2b5c8e3f1a77", "name": "Edda Voss", "template": "Character" },
{ "id": "9c3b7e21-5d4a-4b8f-a1e6-0f2d7c9b3e55", "name": "Oskar Venn", "template": "Character" }
],
"relations": [
{ "id": "e1c4a7b2-3f6d-4e9a-8b0c-5d2f1a7e9c33", "type": "ally", "from": "031476c0-2504-4ed7-aa79-e5fce21e2091", "to": "9c3b7e21-5d4a-4b8f-a1e6-0f2d7c9b3e55", "value": 60, "note": "Since the harbor fire" },
{ "id": "7b2e9f40-1a3c-4d5e-b6f7-8c9d0e1f2a3b", "type": "parent_child", "from": "4a8e2d10-6c1f-4f0e-9d7a-2b5c8e3f1a77", "to": "031476c0-2504-4ed7-aa79-e5fce21e2091" }
]
}
Relation types
| Field | Description |
|---|---|
key | The type's export key, unique in the world and in snake_case (lowercase letters, digits and underscores). You can set it in Relation types. A new type gets one from its side names (ally for a mutual type, parent_child for the others, _2, _3 when taken), and renaming a side keeps it. A type made before export keys existed gets its key from its side names until it is edited. |
id | The type's id in LoreHub. It never changes. |
sides | Side A's name, then side B's. A mutual type has the same name twice. |
shape | directed, mutual or hierarchy. |
hasValue | Whether relations of this type carry a value from -100 to 100. |
colour | The type's colour in LoreHub: grey, red, orange, yellow, green, teal, blue, indigo, purple or pink. |
Documents
Only the documents that relations join are listed. id is the same as in the dialogue export's Document resources, so a speaker in a dialogue can be matched to their relations. template is the name of the document's template, or absent for a document without one.
Relations
| Field | Description |
|---|---|
id | The relation's id. It stays the same when the relation is edited. |
type | The key of its relation type. |
from | The document on side A. In a hierarchy type it is the parent. |
to | The document on side B. |
value | From -100 to 100. Only written when the type has values switched on and the relation has one. |
note | The writer's note, when there is one. |
A mutual relation is listed once: read it both ways. Files are sorted by key and id, so a pull request from Game Sync shows only what changed.
On this page