Cook and package
Cook the mod's sources - imported models, replaced models and textures, animations, remasters - into the pack the game reads, and package the mod without its sources to share it.
Some of what a mod holds is sources: models, images and clips the game can't read as they are. Cook & Package (Mod section) turns them into the one pack the game reads, and packages the mod for others.
What needs cooking
| Source | Cooked into |
|---|---|
assets/models/*.glb |
New models, the archives @<mod>/<name> (Model Import, Rigging) |
assets/replace/<container>/*.glb |
Replaced disc models |
assets/textures/..., loose images at disc entries' paths |
Replaced textures |
replacers.toml and assets/sources/ |
Every replacer: Model Replacer meshes, textures and remasters, Animation Replacer and Animation Editor clips, Material Editor looks |
Everything else (game data, maps, scripts, text, sounds, cloth, interface files) is read by the game as it is, and needs no cook.
Note The game reads only the cooked pack, never the sources. After changing a model, texture, clip or replacer, cook again to see it in the game. The game warns in its log when a mod has sources but no cooked pack.
Cook the mod
Cook the mod writes cooked/mod.rpak. The cook runs on all cores in the background; failures are listed with
their reasons.
BC7 textures (as the game's) compresses textures as the game's own are. Leave it on; turning it off cooks faster while you iterate, at the cost of a larger pack and more memory.
When the game prepares its data, it copies each pack's entries over the disc's, later mods over earlier ones.
Remastering a disc model needs the disc image (the original is read from it).
Package
Package... copies what the game reads of the mod into <chosen folder>/<mod id>/, ready to zip and hand out:
- copied:
mod.toml,cooked/,gamedata/,maps/,cloth/,ui/and its loose replacement files (sounds, text, level scripts), - left out: the sources (
assets/,replacers.toml, loose source images), which are already in the pack.
A packaged mod is installed by copying its folder into the game's mods/ folder.
To share a mod on returntonorrath.com, use Publish: it packages the mod the same way, checks it and uploads it.
The game's own caches
Separately from the devkit's cook, the game converts your disc and each enabled mod into caches of its own when it
starts (data/cache/ and data/cache-mods/), and keeps them until something changes. Turning mods on or off, or
reordering them, converts nothing already converted; changing a mod's files converts only that mod again.
RTN.exe --recook converts everything again. See Command line tools.
