Prerequisites
Required tools#
Courage Reborn#
Mods depend on the Augment symbol map, which is only emitted when the game is built with hooks enabled.
This produces:
pc/build/tp_pc(ortp_pc.exeon Windows), the game binarypc/build/augment.bin, packed symbol map your mods resolve against (loaded from the game launch directory at runtime)
Optional: TypeScript support#
If you want to write mods in TypeScript and compile them to Luau, you need Node.js ≥ 18 from nodejs.org, plus two repositories: ts-luau (the compiler) and crxts-types (game API typings).
Clone and build ts-luau first:
Clone crxts-types anywhere on disk (it is not vendored in Courage Reborn):
In your mod's package.json, point @courage/types at that clone with a file: path:
From your mod directory, run npm install so the local types package is linked:
See the TypeScript scripting guide for the full setup.
Optional: CReact UI panels#
Mods with CReact UI compile TSX to creact/panel.bundle.js and/or creact/popup.bundle.js using Bun in pc/ui/. Install Bun from the official installation guide, then run bun install once in pc/ui/.
Walkthrough: Build a CReact mod.
Folder conventions#
Courage Reborn looks for a mods/ folder in this order:
<data_path>/modswhendata_pathis set inconfig.iniand that folder exists<launch_dir>/modsbeside the game executable (common for local dev)<user_data>/modsunder Application Support (or the platform equivalent)
During development, keep mods next to your build output:
If that folder exists, the game prefers it over the copy under Application Support. See Folders and paths for platform defaults and config.ini keys.
Scripted mod package#
Petrichor loads every subdirectory that contains a mod.json:
mods/
└── my-mod/
├── mod.json # required
├── main.luau # entry (or path from mod.json)
├── assets/ # images, HLSL, data (optional)
│ └── icons/
│ └── heart.png
└── creact/ # CReact bundles (optional)
├── panel.bundle.js
└── popup.bundle.js
TypeScript layout#
If you use TypeScript, source lives in src/ and compiles to out/. Copy or symlink out/ into the mod directory before testing: