Pular para o conteúdo principal

Discovery Codex Open

Open a discovery codex category

Action entry that opens a discovery codex category for a player. Can be triggered from quests, NPCs, items, or other Typewriter systems.

Campos

CampoTipoPadrãoDescrição
definitionRef<DiscoveryCodexDefinition>—Category to open (reference to a DiscoveryCodexDefinition)
DiscoveryCodexDefinition (34)
CampoTipoPadrãoDescrição
categoryString—Unique identifier for this discovery category
titleString—Title displayed at the top of the inventoryPlaceholders
rowsInt6Number of rows for the inventory (1-6)
orderInt0Display order when listing categories
iconItem—Icon used when referencing this category
iconNameString?—Optional custom name for the icon when displayed in menus. Placeholders: {unlocked}, {locked}, {total}, {percent}Placeholders
iconLoreList<String>emptyOptional lore lines for the icon when displayed in menus. Placeholders: {unlocked}, {locked}, {total}, {percent}PlaceholdersVárias linhas
lockedIconLoreList<String>emptyLore to display for the icon when the category is locked. Placeholders: {unlocked}, {locked}, {total}, {percent}PlaceholdersVárias linhas
backgroundItem?—Optional background filler item
itemSlotRangeString—Range of slots where discovery items will be displayed (e.g. '1-25')
startSlotInt0Slot index where items start (0-based)
fillByRowBooleantrueIf true, items fill row by row; otherwise column by column
previousButtonItem?—Item used for the previous page button
previousButtonSlotInt0Slot for the previous page button
previousButtonNameString?—Custom name for the previous page button. Placeholders: {page}, {max_page}, {unlocked}, {locked}, {total}, {percent}Placeholders
previousButtonLoreList<String>emptyLore for the previous page button. Placeholders: {page}, {max_page}, {unlocked}, {locked}, {total}, {percent}PlaceholdersVárias linhas
nextButtonItem?—Item used for the next page button
nextButtonSlotInt8Slot for the next page button
nextButtonNameString?—Custom name for the next page button. Placeholders: {page}, {max_page}, {unlocked}, {locked}, {total}, {percent}Placeholders
nextButtonLoreList<String>emptyLore for the next page button. Placeholders: {page}, {max_page}, {unlocked}, {locked}, {total}, {percent}PlaceholdersVárias linhas
backButtonItem?—Item used for the back button
backButtonSlotInt44Slot for the back button (default: 44, bottom-right area)
backButtonNameString?—Custom name for the back buttonPlaceholders
backButtonLoreList<String>emptyLore for the back buttonPlaceholdersVárias linhas
infoButtonItem?—Item used for the info button
infoButtonSlotInt4Slot for the info button
infoButtonNameString?—Custom name for the info button. Placeholders: {unlocked}, {locked}, {total}, {percent}Placeholders
infoButtonLoreList<String>emptyLore for the info button. Placeholders: {unlocked}, {locked}, {total}, {percent}PlaceholdersVárias linhas
parentCategoryString?—Optional parent category identifier; if set, this category becomes a sub category
criteriaList<Criteria>emptyCriteria that must be met for this category to be unlocked
itemsList<DiscoveryItemConfig>emptyItems contained within this category
DiscoveryItemConfig (10)
CampoTipoPadrãoDescrição
entryIdString—Unique identifier for this discovery item
itemItem—Base item to display in the codex
overrideNameString?—Optional display name override. Placeholders: {unlocked}, {locked}, {total}, {percent}Placeholders
overrideLoreList<String>emptyLore to override the item's default lore when unlocked. Placeholders: {unlocked}, {locked}, {total}, {percent}PlaceholdersVárias linhas
overrideOrderInt?—Display order override
lockedLoreList<String>emptyLore to display when the item is locked. Placeholders: {unlocked}, {locked}, {total}, {percent}PlaceholdersVárias linhas
unlockedLoreList<String>emptyLore to append when the item is unlocked. Placeholders: {unlocked}, {locked}, {total}, {percent}PlaceholdersVárias linhas
criteriaList<Criteria>emptyCriteria that need to be met for the item to be unlocked (Typewriter facts)
lockedItemItem?—Optional item to display when the entry is locked
onUnlockTriggersList<Ref<TriggerableEntry>>emptyTriggers to fire when this specific item is unlocked by a player
guiLayoutCodexGuiLayoutPAGINATEDGUI layout type for the codex menuValores:PAGINATEDSCROLLABLEFRAMESIMPLE
onUnlockTriggersList<Ref<TriggerableEntry>>emptyTriggers to fire when this category is unlocked by a player
baseMenuIdString—Entrée open_gui servant de châssis partagé (ex. menu_shell). Vide = la catégorie s'ouvre en inventaire autonome (comportement historique). Renseigné = la catégorie devient un écran du menu global : son propre plan de slots (itemSlotRange/boutons) doit alors tenir dans la zone de contenu du châssis (rows ≤ 3), pas l'inventaire entier.
titleOverrideString—Optional title override for the menuPlaceholders
soundString—Sound to play when opening the codex, as a namespaced key such as 'minecraft:item.book.page_turn'. Empty = no sound
soundVolumeFloat1.0Volume of the opening sound (1.0 = normal)
soundPitchFloat1.0Pitch of the opening sound (1.0 = normal)
Campos comuns do TypeWriter (criteria, modifiers, triggers)
CampoTipoPadrãoDescrição
criteriaList<Criteria>empty—
modifiersList<Modifier>empty—
triggersList<Ref<TriggerableEntry>>empty—

How to use it​

Set definition to a Discovery Codex Category. The menu opens only if the category's criteria are met for the player.

  • titleOverride replaces the title of the opened codex (MiniMessage and placeholders). Empty keeps the title of the category.
  • sound is a namespaced sound key such as minecraft:item.book.page_turn, played once when the codex opens. Empty plays nothing. An invalid key writes a warning in the console and the codex opens anyway.
  • soundVolume (default 1.0, never below 0) and soundPitch (default 1.0, kept between 0.5 and 2) tune that sound.