Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CHT — Cheat Persistence

Raw dump of the engine’s cheat state array, written by the savecheats cheat command to REDGUARD.CHT in the game directory.

Overall Structure

[Cheat state array — 64 × u32 LE values, 256 bytes total]

Format

The file is exactly 256 bytes: 64 little-endian u32 slots. Each slot holds the state value for one cheat. The first 13 slots correspond to the built-in cheat codes; slots 13–63 are unused (always zero in practice).

OffsetSizeTypeNameDescription
0x004u32oracleCheat #0 state
0x044u32nodemarkerCheat #1 state
0x084u32moonrakerCheat #2 state
0x0C4u32taskCheat #3 state
0x104u32animationCheat #4 state
0x144u32magiccarpetCheat #5 state
0x184u32savecheatsCheat #6 state
0x1C4u32drevilCheat #7 state
0x204u32drnoCheat #8 state
0x244u32goldfingerCheat #9 state
0x284u32neversaydieCheat #10 state
0x2C4u32oddjobCheat #11 state
0x304u32yeahbabyCheat #12 state
0x34204—unusedSlots 13–63, always zero

State values: 0 = off, 1 = on. The console cheat = N syntax can set arbitrary integer values, but normal toggle usage produces only 0 or 1.

Behavior

  • Write: The savecheats cheat (index 6) clears its own slot, writes the 256-byte state array to REDGUARD.CHT, then sets its slot to one after closing the file. The stored savecheats value is therefore zero.
  • Read: On startup, the engine checks for REDGUARD.CHT and restores all cheat states from it.
  • Reset: Delete the file to clear all persisted cheats.

See Cheat System for cheat descriptions and activation methods.

External References