Mod System#
Courage Reborn mods use two libraries:
- Petrichor, loads mods from
mods/and readsmod.json. - Augment, hooks game functions at runtime (before, after, replace).
Loading sequence#
game starts
├─ load augment.bin (symbol map for hooks)
├─ register host Luau modules (e.g. Courage.Shaders)
└─ petrichor_run(host)
├─ initialize mod backend
├─ scan mods_dir/
│ └─ for each subdirectory
│ ├─ read mod.json (PetrichorManifest)
│ ├─ check engineVersion & hostVersion compatibility
│ ├─ find backend that handles manifest.type
│ └─ backend.load(dir, manifest)
│ ├─ compile + run entry file (mod class table)
│ ├─ Class.new() (init runs here)
│ └─ store instance for tick / shutdown
each frame (Courage Reborn calls petrichor_tick)
└─ for each luau mod instance: tick(delta)
game exit / mod shutdown (petrichor_stop)
└─ for each luau mod instance: shutdown()
All luau mods share one Luau VM. Your entry file returns a class from mod(). Hooks you register in init or new stay for the session.
Sections#
- Mod manifest,
mod.jsonfields - Publishing a mod, metadata and release layout
- Folders and paths, where mods and saves live on disk
- Mod types