How is Codex context added in Novelcrafter prompts?
How context works when you add Codex entries to prompts.
You may be wondering what happens when you mention a Codex entry, or add it to the scene or beat context. What happens to it all? In which order is it added into your prompt?
When collecting up all the Codex data for your prompts, we work in the following order:
- All mentions within the beat/chat message AND text prior to the beat are added to the context.
- Any manual references to the scene are added
- The POV entry (if any, and not already mentioned) is added
- All global entries are added
- Any related (child) entries to the context in steps 1-4 are added (the relation between the two is NOT added).
- We then filter out any entries that don’t have a description or any text within them.
The Codex entries are then sorted in the prompt by:
- Global entries
- By Type
- By Name
Because the ordering happens after all Codex entries are added, it does not matter which order you mention any Codex entries, or whether you add them to the scene vs beat context.
There are a few exceptions to this, based from the ‘tracking’ options:
“Always Include” (previously global entries) are always included and are at the top of the Codex entry list.
“Include when detected”
“Don’t include when detected”
- Skipped when MENTIONED in message/prior text
- Can be added manually/via being ‘related’ to a Codex entry that are mentioned.
“Never include” – literally never included.
To avoid sending duplicate Codex entries, the “additional context” section of our prompts will add the codex entries to the general codex context. Snippets or Scenes etc are added into another section.