Codex LoreNarrative

World-building is delivered through collectible, discoverable, or unlockable text entries separate from the main interaction flow.

World-building through collectibles: each tome picked up unlocks the next codex entry, filling the index and revealing its passage.

How codex lore works in Godot

World-building delivered as discoverable entries kept separate from the main loop. Finding one unlocks it; a journal UI lists what you've unlocked.

Resourceprimitive

Each entry is a LoreEntry resource — title, body, category. The codex is an array of these, authored as data.

class_name LoreEntry extends Resource
@export var title: String
@export var body: String
@export var category: String

Dictionaryprimitive

Unlock flags track which entries the player has found, so the journal shows only discovered lore and persists across saves.

var unlocked := {}
func discover(id):
    unlocked[id] = true; lore_found.emit(id)

ItemListnode

A simple journal UI: list unlocked entry titles; selecting one shows its body. Keeps lore browsable without interrupting play.

for id in unlocked:
    $Journal.add_item(LORE[id].title)

In short: Array of LoreEntry Resources; unlocked_lore flags in GameState; journal/log UI displays unlocked entries

Retro games that use codex lore

11 catalogued game(s) use this mechanic, spanning 1992–1999.

Related narrative mechanics

▶ Explore Codex Lore interactively — see every game + the Godot system