mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 20:09:57 -04:00
Add a Mods screen to the launcher and build the mods' code patches into the launcher's game.
Mods, on the home screen, opens the game's mods folder, adds a downloaded mod from its .zip, .7z or .rar file or its folder, switches each mod on or off, and sets the load order (mods_disabled and mods_order in nx2navi.ini, written as the game writes them). Each mod's description says what it changes, which other mod changes the same files and which of the two wins, and why the game leaves it off when it does. Before the game starts, Play puts the mods folder in order (launcher/mods.py prepare): an archive in it is unpacked into a folder of its name and kept, a mod whose files sit a folder or more down has them moved up, and a romfs, exefs or cheats folder put straight into the mods folder becomes a mod of its own. An archive that would write outside its folder is refused, and nothing is deleted. The launcher's build (tools/make_game.py) left the mods' code cheats and ExeFS patch files out, so those mods stayed off. The lift now turns them into patch sets first, as the setup does, with the files in the lift's key and build-cache/mod-code.json recording what it took up. Play builds the game again before it starts when an enabled mod brings code no build has seen. The shaders' key names the lift and the compile without the mods' code, so such a build compiles only what the patches change and leaves the shaders prepared. tools/mod_files.py is the one place the tools, the build and the launcher find a mod's parts. Tested: a zipped mod holding its own folder, put into a mods folder, was unpacked and moved up by the launcher's code, and the game served its file in place of the game's. The lifter took a code cheat and a pchtxt patch made for the game's main as patch sets. The launcher's and the setup's tests pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -731,13 +731,13 @@
|
||||
|
||||
[mods]
|
||||
# Folder with the player's mods, one subfolder per mod (<name>/romfs, <name>/exefs, <name>/cheats). A relative folder
|
||||
# is under the game's folder. Default: mods next to the game's exe. The setup builds the ExeFS patches and code cheats
|
||||
# of the mods folder next to the exe only.
|
||||
# is under the game's folder. Default: mods next to the game's exe. The build takes the ExeFS patches and code cheats
|
||||
# of the mods folder next to the exe only. The launcher's Mods screen adds mods and puts downloads in order.
|
||||
# mods_dir =
|
||||
# Load order, top first, names separated by |; a mod not listed goes below the listed ones, by name. The top mod wins a
|
||||
# file two mods replace. Set it here: the in-game menu has no Mods tab.
|
||||
# file two mods replace. The launcher's Mods screen sets it (Load Order); the in-game menu has no Mods tab.
|
||||
# mods_order =
|
||||
# Mods switched off, names separated by |.
|
||||
# Mods switched off, names separated by |. The launcher's Mods screen sets it.
|
||||
# mods_disabled =
|
||||
# auto: when an enabled mod has cheats that change the game's code and the game was built without them, the game starts
|
||||
# the setup's rebuild at start (a few minutes) and starts again after it. off: the game starts with the code it has.
|
||||
|
||||
Reference in New Issue
Block a user