Publishing a mod#
How to package a mod for other players and what shows up in Installed Mods.
Ship layout#
my-mod/
├── mod.json
├── main.luau
├── assets/ # shaders, audio, data (your files only)
└── creact/
├── panel.bundle.js # needed for Courage.UI.show
└── popup.bundle.js # needed for Courage.UI.showPopup
You can omit panel.tsx from a release if you only distribute the compiled bundle. See Build a CReact mod.
TypeScript mods ship the compiled out/main.luau and point entry at it in mod.json.
Example mod.json for release#
Include loader fields and any metadata you want in the mod list:
{
"id": "gossip-pack",
"name": "Gossip Pack",
"type": "luau",
"entry": "main.luau",
"version": "1.2.0",
"hostVersion": "0.8.0",
"engineVersion": "1.0.0",
"author": "Mod Author",
"kind": "code",
"description": "Custom hint text on select gossip signs.",
"conflicts": [],
"loadOrder": 0,
"enabled": true
}
Field reference: Mod manifest.
When a player toggles a mod or changes load order in the menu, the game saves those preferences for the next launch. Petrichor still loads any folder with a valid mod.json on disk. To stop a code mod from running, remove or rename its folder.
Legal distribution#
Do not redistribute Nintendo copyrighted assets (vanilla .bmd, .bti, full .arc files, and so on). Ship your own Luau, HLSL, models, textures, and JSON data. Asset overrides should replace files with your work. See Asset modding.