Codex
The Codex Extension allows you to create comprehensive discovery logs where players unlock entries through exploration, crafting, or specific actions. It handles tracking, percentage completion, and automatic GUI generation for browsing unlockables.
Features
- Discovery Logs — Group items or monsters into categories that unlock as the player encounters them.
- Recipe Books — Display custom crafting recipes in a dedicated, navigable UI.
- Progression Tracking — Automatically calculates % completion for categories.
- Auto-Generated GUIs — Menus are built automatically based on your definitions.
- Fragments & Treasure Hunts — Collectible fragments grouped into collections, with treasure hunt definitions that reward completing a set.
Fragments
The former Fragment extension is now part of the Codex: fragments are collectible pieces (fragment_definition) organized into groups (fragment_group) and collections (fragment_collection_config). A treasure_hunt_definition turns a set of fragments into a hunt with completion rewards. Player collection state persists in fragment_artifact.
If you previously used the standalone Fragment extension, its entries now live in the Codex extension — same entry names, same data shape.
Entries
- Definitions — Discovery Category: Define unlocking categories and progression logs. Recipe Definition: Create custom recipe books and crafting guides. Fragments:
fragment_definition,fragment_group,fragment_collection_config,treasure_hunt_definition.- Actions & Menus — Open Codex: Action to open specific codex menus. Global Menu:
codex_global_menu— OmniGUI-layout codex hub. - Artifacts —
fragment_artifact: player fragment collections.codex_unlock_artifact: which unlock triggers already fired per player — unlock rewards fire exactly once.
- Actions & Menus — Open Codex: Action to open specific codex menus. Global Menu:
Quick Start
- 1. Define — Add definition entries: discovery_categ_definition, discovery_recipe_definition, discovery_categ_open. These define the structures, entities, or rules the extension operates on. → discovery_categ_definition → discovery_recipe_definition
Commands
| Command | Description | Aliases |
|---|---|---|
/tw codex open <category> | Open a specific codex category menu. | /tw dcx open |
Placeholders
Global placeholders for tracking progress.
| Placeholder | Description |
|---|---|
%discoverycodex_category_<id>_name% | Display name of the category. |
%discoverycodex_category_<id>_unlocked% | Count of discovered entries. |
%discoverycodex_category_<id>_total% | Total entries in the category. |
%discoverycodex_category_<id>_percent% | Completion percentage (0-100). |
%discoverycodex_item_<id>_unlocked% | true/false if specific item is unlocked. |
Dependencies
| Extension | Required | Usage |
|---|---|---|
| GUI Extension | Required | Menu rendering and layout system. |
| PlaceholderAPI | Optional | For @Placeholder fields. |