Building Codex Menus
The Quest Codex draws zero hardcoded menus. Every screen a player sees — the category browser, the quest list, the sort button — is a regular GUI Extension layout pool that you design. The codex only injects content into the slots you mark for it. If you haven’t read the GUI guides yet, start there: Introduction → Layout Types → Interactions. Everything on this page builds on those concepts.The big picture
Three entry types share the work:| Entry | Role | Analogy |
|---|---|---|
quest_category | Declares a category: title, icon, parent, visibility criteria | The folder |
quest_assignment | Links quests into a category, with ordering and per-status overrides | The folder’s contents |
category_menu | The menu design: a full GUI layoutPool with placeholder slots | The folder’s appearance |
Slot placeholders — the one codex-specific concept
Inside acategory_menu layout pool you place placeholder slots. At render time the codex replaces them with live content:
| Placeholder | Replaced by |
|---|---|
CATEGORY_SLOT | One sub-category icon per visible category (title, icon, click → opens it) |
QUEST_SLOT | One quest per assignment (icon + per-status lore from quest_lore, click → track/untrack) |
SORT_SLOT | The sort-mode button (cycles All → Not Started → Active → Completed) |
A complete category menu
A 6-row browser: border, scrollable quest area, sort button bottom-right:- The structure is 100 % GUI Extension:
compositestacking, ascrollableviewport, repetition fields for the border. - Placeholder slots are ordinary items tagged with
buttonType— the codex fills them and multipliesQUEST_SLOT/CATEGORY_SLOTacross the available area. - Scrolling, clicks and sounds are handled by the GUI engine; the codex only decides what goes in each slot.
The sort button
SORT_SLOT renders the current sort mode and cycles on click. Each mode can have its own label, lore and item via the menu’s sortDisplay configuration — see category_menu. Modes: All → Not Started → Active → Completed.
Per-status quest appearance
A quest slot adapts to the player’s progress.quest_lore defines the lore blocks per status (not started / active / completed), and quest_assignment can override icon or visibility per status. Clicking an active quest tracks/untracks it through QuestExtension’s native tracker.
Checklist for a working codex
- A
quest_codex_configentry (global sounds, defaults, messages). - At least one
quest_category(top level = no parent). - One
quest_assignmentper category, listing quest entries. - A
category_menuwhose layout pool contains at least oneQUEST_SLOT(andCATEGORY_SLOTif you use sub-categories). - Open it via the commands or a Typewriter trigger.