Novelcrafter
Course cover image
Codex Recipes
Level:
Advanced
Lessons:
12 Lessons

Using Codex relations for complex worldbuilding

Create a hierarchy of references that automatically brings entries into context when an entry they are linked to is mentioned.

Reading Time
approx. 4 min

Have you ever been brainstorming in chat, and want to refer to your worldbuilding notes… only to need to add dozens of manual references to the chat message? Did you know that we have a feature that solves this?

The relations panel in Novelcrafter’s Codex allows you to establish connections between entries, so that when one entry is mentioned, all its linked entries are automatically included in the AI context.

When should I use this?

  • Your world contains complex organizations or hierarchies
  • You want related concepts to be automatically included when mentioning major elements (magic systems, important lore)
  • You are brainstorming and you want your “cast of characters” to call up all of your characters without having to write them all down

How to Create Codex Relations

  1. Create your “linking” Codex entry (e.g., a kingdom, organization, or system)

  2. Create individual entries for each related “linked” concept

  3. In the linking entry, navigate to the relations tab Relations tab

  4. Hit add, search for your linked entry and click it to confirm Adding a relation to a Codex entry

  5. Repeat for all related elements

Now, whenever the linking entry is mentioned, all its links will be included in the prompt as well. As this is recursive, Novelcrafter will add a little warning if it knows that a lot of entries may be included by accident.

Calling Codex relations in chat

I’ve called the above Codex entry ‘Characterz’, not ‘Characters’. Since Codex entries are detected by name, using a common word like ‘Characters’ would trigger the entry every time that word appears in your text or chat messages. AI is great at understanding misspellings, so I don’t have to worry about any confusion from the changed letter.

Examples

Fantasy Political Structure

Linking Entry: Kingdom of Enathia

Linked Entries:

  • House Bob — The ruling family, their sigil, and political goals
  • House Greg — A rival house with trade connections
  • House Edna — A fallen house seeking to reclaim power
  • Enathian Royal Guard — Their uniforms, hierarchy, and oath
  • The Order of Whispers — The kingdom’s spy network
  • Festival of Seven Moons — Annual celebration with political significance

When you mention “Kingdom of Enathia” in a scene or chat, you don’t need to remember which houses exist or what the guards wear. The AI already has that context and can reference details.

Science Fiction Corporate Hierarchy

Linking Entry: NeuralTech Industries

Linked Entries:

  • Bioengineering Division — Works on human augmentation; based on Floor 12
  • Quantum Computing Department — Developing experimental AI; highly secretive
  • CEO Mira Cherry — Her background, management style, and hidden agenda
  • Project Helios — A weapons program disguised as energy research
  • Project Daedalus — The failed predecessor to Helios; caused the '47 incident

Corporate intrigue often involves multiple departments, projects, and executives. Relations let you keep these separate for easy editing while ensuring the AI understands they’re all connected to the same company.

Magic System Components

Linking Entry: Elemental Magic

Linked Entries:

  • Pyromancy — The manipulation of fire
  • Aquatic Resonance — The control of water
  • Geometric Binding — The shaping of earth
  • Aero Manipulation — The handling of air

Magic systems have rules. By grouping all branches under one parent, you ensure the AI always knows the full system when any part is mentioned—reducing contradictions like a pyromancer suddenly using water spells.

Other examples of useful linking entries:

  • The Adventuring Party — A “Cast of Characters” entry that links to party members. Mention it in chat when brainstorming group dynamics or planning scenes where everyone appears.
  • The Wandering Minstrel Tavern — Links to the barkeep, the signature drink, the back-room gambling den, and the rumor board. When the tavern appears in a scene, its atmosphere comes with it.
  • The Romano Family — Links to all family members. Useful for family sagas or mafia stories where blood ties matter.
  • The USS Defiance — A starship entry linking to crew members, ship systems, and its notorious history. When the ship is mentioned, the AI knows who’s on board.
  • Worldbuilding Dump — A non-story entry (named something like “Alekabonato Context”) that links to country, customs, religion, and social structure. Use it when brainstorming to pull in everything at once.

Troubleshooting

Context overload

Cause: Creating excessive connections that flood the AI context with unnecessary information.

Solution: Be selective and hierarchical; only link when it is necessary, otherwise you’ll end up with hundreds of Codex entries.

Codex entries not appearing when expected

Cause: Incorrect relation structure or misunderstanding which entry is linking to something vs linked by something

Solution: Test your relation structure by checking context when mentioning linking entries. You can use the prompt preview to assist in this.

If you have linked your Codex entries in the wrong order, you can click on the double arrow next to a link to reverse the link.

Overreliance on automatic inclusion making explicit mentions awkward

Cause: Assuming the AI will always perfectly incorporate background information without guidance.

Solution: Use relations for consistent background context, but still explicitly mention elements when they’re central to a scene’s action or dialogue.

This lesson was taught by:

Profile image of Kate

Based in the UK, Kate has been writing since she was young, driven by a burning need to get the vivid tales in her head down on paper… or the computer screen.