All news
Release

Your documents, with their fields, in the JSON export

Worldbuilding 2.0 gave your documents templates and fields: a character's age and portrait, a quest's reward, the variables a case document needs before it can be solved. Until today, the JSON export only knew each document's id and name, so none of that reached your game. Starting today, it does.

A Document 1.1 resource from the JSON export: Mira Voss, a Character, with her age, family, portrait and the gold she tracks

What's new

  • Template and parent. Each document says which template it follows, such as "template": "Character", and which document it sits under in your world's tree.
  • Field values, by key. Every field you include in the game export is listed under its export key, such as age or eye_color. The key never changes when you rename the field, so your game code keeps working.
  • Game variable fields, ready to run. A Tracks field lists every variable it stands for, in order, such as gold and gold_coins. A Requires field lists its conditions and a Sets field its changes, in the same shape as option conditions and node changes, so your game can check and apply them with the code it already has.
  • Links between documents. A Document link or Document list field gives the ids of the documents it points to, so your game can follow them.

Choose what goes out

Every field has Include in the game export. It's on by default for new fields, except rich text. Switch it off for notes that are only for your team, and the export leaves the field out of every document.

In the export

Documents are @lorehub/document resources, now at version 1.1.0. The export itself stays at 2.0.0, and a document without a template, parent or values looks just as it did before, so a game that reads only names keeps working. The Document v1.1 reference shows every field type. Relations between documents stay in relations.json, with the same document ids.

You get the new export from the Export button, from Game Sync in JSON format, and from the get_export tool of the LoreHub MCP server.

Try it

Open a document in LoreHub, fill in a few fields, then export a dialogue and find the document in the file. If something feels off, tell us on Discord or Reddit.