Skip to content

SetCodexEntryHidden

Stops the game from unlocking a Codex entry by itself - or lets it again.

A hidden entry is never unlocked by the game itself: not at a character’s start, not by a discovered place, not by a story event. A player who has it loses it at once (or when they join), unless the mode gave it to them with SetPlayerCodexEntry - which still unlocks it. The list is the mode’s: a reload clears it, so set it in OnGameModeInit. At most 1024 entries.

SetCodexEntryHidden(entry [, hidden])
Parameter Type
entry string the entry’s perk GUID or name
hidden boolean true (the default) hides it, false lets the game unlock it again (optional)

boolean - false for an entry name the server’s tables do not know

function OnGameModeInit()
-- a server set before the story: none of the game's characters in anyone's Codex
for _, entry in ipairs(MY_CHARACTER_ENTRIES) do SetCodexEntryHidden(entry) end
end

IsCodexEntryHidden · GetHiddenCodexEntries · SetPlayerCodexEntry · the The Codex group of the index