Skip to main content

Category Menu

Category Menu Configuration

Configures the menu for a specific quest category via declarative layout pools. Place a "SORT_SLOT" placeholder in your layout pool to have the sort button automatically injected at that position with per-mode display customization.

Fields

FieldTypeDefaultDescription
categoryString—Category this menu configuration applies to. Leave empty for main menu.
titleString—Menu title shown to the player. Supports MiniMessage and PlaceholderAPI.PlaceholdersColors
rowsInt4Number of inventory rows (3-6).
menuRef<OpenGuiActionEntry>—GUI entry providing the layout pool, main layout, type and audio configuration.
sortDisplayList<SortDisplayConfig>emptyPer-mode display overrides for the sort button. Define one entry per sort mode.
SortDisplayConfig (4)
FieldTypeDefaultDescription
modeSortModeConfigALLSort mode this display applies to.Values:ALLNOT_STARTEDACTIVECOMPLETED
itemItem?—Item shown when this sort mode is active.
labelString—Label shown when this sort mode is active. Supports MiniMessage.PlaceholdersColors
loreList<String>emptyAdditional lore lines. Supports MiniMessage and PlaceholderAPI.PlaceholdersColors
viewsList<MenuViewData>emptyAddressable screens of this menu.
defaultViewIdString?—View opened first. Empty = the first declared view.
breadcrumbSeparatorStringDEFAULT_BREADCRUMB_SEPARATORMiniMessage separator inserted between breadcrumb segments by the {breadcrumb} title token.Colors
baseMenuIdString—Shared OpenGui chassis whose layout pool and views are inherited before this menu's own values.
pushHistoryOnViewSwitchBooleanfalsePush the previous view onto history when switching tabs.
Common TypeWriter fields (criteria, modifiers, triggers)
FieldTypeDefaultDescription
criteriaList<Criteria>empty—
modifiersList<Modifier>empty—
triggersList<Ref<TriggerableEntry>>empty—

How to use it​

A Category Menu is the entry that opens a codex screen, and it can also be fired as an action from a quest, an NPC or a button. What it opens depends on category:

categoryOpensMarker the layout needs
emptyThe main menu, listing root categoriesCATEGORY_SLOT
a category nameThe quests of that categoryQUEST_SLOT
@trackedThe quests the player tracksTRACKED_QUEST_SLOT

menu references an Open GUI that is used only for its layoutPool, mainLayoutId, guiType and audio. Markers are items with buttonPrefix codex_button: and buttonType set to the marker, placed in simple layouts of that Open GUI.

  • rows must equal the height of the Open GUI, otherwise slots below the smaller height are dropped.
  • sortDisplay customizes the sort button, one element per mode (ALL, NOT_STARTED, ACTIVE, COMPLETED) with its own item, label and lore.
  • baseMenuId, views, defaultViewId, breadcrumbSeparator and pushHistoryOnViewSwitch turn the menu into a tab of a shared chassis, as in Views, tabs and inheritance. Keep the markers in the layouts of the Open GUI named by menu, not in the shared chassis.

The console lists every menu that cannot draw at startup, with the fix. See Building Codex menus.