Mods

A game's mods go in the mods folder of its data folder, one folder each, named as you like: recompiled/<id>/<id>_data/mods/<mod name>/exefs/ and .../<mod name>/romfs/. A mod lies over the game the way an update does, and over the update too when one is checked. A file in its romfs/ replaces the RomFS file at the same path, or is added to the RomFS when the game has none there. A file in its exefs/ (main, subsdk0 and the other modules, or main.npdm) replaces the program's file of that name. Mods are laid in the order of their names, so a later one wins over an earlier one where both have the same file.

Every mod in the folder is played until it is turned off. Opening a game in the launcher lists its mods under its updates and DLCs, each with a box to check, and Open Mods Folder opens the folder in the file manager (it is made first when it isn't there). M on Games opens that box for the game in focus, one with nothing beside it too. The mods turned off are kept in mods_off= in the game's .ini, their folder names with a / between two.

Add Mod, in the same box, opens the system's folder picker and copies the folder picked, whole, into the mods folder under its own name, the original left where it is; the mod shows checked at once, and the message says where it went. The copy goes into a hidden .<name>.adding first and takes the mod's name once every file is in, so a copy that stops never shows as a mod. It refuses, naming the folder: a name the mods folder has already, a folder inside the mods folder or one that holds it, one with neither exefs/ nor romfs/, a name that starts with a dot (the mods list hides those), a link inside the folder, and on a phone a folder of an app or a cloud that no path reaches; a file that cannot be copied is named with the system's reason. On Android and iOS Open Mods Folder, Open Cheats Folder and Open Folder show the folder in the system's Files app: Android's shows the app's data folder and the shared storage (a dump's folder in Download/), iOS's the app's Documents alone, so there a folder of the app's Library/ is greyed and says so.

The box also has Open Folder, the game's other folders a row each: its dump's (as the recompile named it), the game's own, its saves (the user playing's where the game plays them: the data folder's save/user.<uid>/<title ID>/, the game's <id>_data/save/ while only that is there, for a homebrew and with save_layout=game, Users), its settings, its logs and its caches, each where the table below puts it. One not known (a game made before the recompile named its dump) or not there yet is greyed, and pressed it says why and makes nothing; Back goes back to the box's rows. Clean Cache deletes the game's shader cache (shader_cache/ of its cache folder: the pipeline cache, the translated shaders and those prepared ahead of time) and its code cache (<id>.jitcache), asked first with each one's size and folder; the game makes them again as it runs (its next run says Compiling shaders over the game as it starts), and its saves, settings and dump stay. It is greyed while the game has neither.

A mod's exefs/ changes the game's code, which ScarletNX compiles ahead of time. The game's stamp (<id>.abi) records the mods' ExeFS files it was recompiled with, and playing it through the driver or the launcher recompiles it when the mods played have other ones. Run directly, a game made with other mods' files runs the ExeFS it was made from, and the log says so.

A mod's exefs/ can also hold patches, each made for one build of a module: an IPS or IPS32 file named after the module's build ID (exefs/<build id>.ips), and IPSwitch text (exefs/<name>.pchtxt, the build ID after its @nsobid-), read as Eden reads them. Each is written over the module it is for when the game is recompiled, and over that module's segments as the game loads them. A patch that does not fit its module (a record past its end, a line the format has no meaning for) stops the recompile, which names the file, the line and the value. Patches count in the stamp as the mods' ExeFS files do: turning a mod with one on or off, or changing one, recompiles the game. Cheats in exefs/ are not applied.

A game's cheats go in the cheats folder of its data folder, in the Atmosphere format, a file named after the main module's build ID: recompiled/<id>/<id>_data/cheats/<build id>.txt, each cheat a [name] line and its codes under it. Every cheat in it runs once per frame shown until it is turned off. Opening a game in the launcher lists its cheats under its mods, each with a box to check, and Open Cheats Folder opens the folder (made first when it isn't there). The cheats turned off are kept in cheats_off= in the game's .ini, their names with a | between two; a cheat with a | in its name always runs, and the launcher says so.

Add Cheats, in the same box, opens the system's file picker for a .txt and copies it into the cheats folder as <build id>.txt, the only name the runtime reads; the original stays where it is, and its cheats show checked at once. A file already named by a build ID (16 hex digits) keeps that name, in capitals, and is refused when the game plays with another, the message naming both. Another takes the build ID of the main module the game plays with as the box has it: a played mod's exefs/main, else the checked update's own (from its extraction: one read from its dump has none the launcher can read), else the game's exefs/main or main.nro; with none to read, the file is refused, the message naming the module it looked for. It refuses too a name the cheats folder has already (files are never merged), a file that is not a .txt, one over 1 MiB, one with no [name] line, and on a phone a document of an app or a cloud that no path reaches.

Run the same command again to retry after a failure or interruption:

Failures stop the workflow and print the failed stage and exit status or signal. On POSIX, stopping a child also aborts that stage so it can be retried, except for intentional debugger stops. Uncatchable termination of the driver itself, such as SIGKILL, cannot print a diagnostic. Do not run concurrent workflows for the same output name. Existing manually extracted directories are assumed complete. Remove stale checkpoints or use the explicit commands when changing a dump or rebuilding game code.


Made from docs/user/usage.md at 69237645142c. GPL-3.0-or-later.