mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 20:09:57 -04:00
Read the mods folder the way the setup's tools do, and keep each mod's start state with it.
- A pchtxt file's build id is read as tools/exefs_patches.py reads it: after a UTF-8 BOM and blanks, the last @nsobid line before @stop, a // comment after it left out. A file saved with a BOM or an indented line was taken for another game version although the setup had built it into the game. - A symbolic link or junction to a folder in mods/ is a mod, as the setup's tools see it; it was left out, so the patch sets built for it were never switched on. - A relative mods_dir is under the game's folder, not the folder the game was started from. - A mods folder that cannot be listed is logged instead of showing no mods without a word. - The start state of a mod's switch moves with the mod when the list is reordered, so the ExeFS patches waiting for the rebuild are counted for the right mods. --probe-mods checks each of these. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
// Player mods (mods.c): one folder per mod under mods/ next to nx2navi.exe (NX2NAVI_MODS_DIR), unpacked as emulators take
|
||||
// them: <mod>/romfs, <mod>/exefs and <mod>/cheats, the Atmosphere layout (atmosphere/contents/<title id>/romfs,
|
||||
// atmosphere/exefs_patches/<name>/*.ips) or a mod manager's merged output (romfs or romfslite, exefs, cheats). ExeFS patch
|
||||
// files (.ips, .pchtxt) for the game's main are patch sets the setup builds into the game (tools/exefs_patches.py),
|
||||
// switched with their mod (mods_exefs_switch). The list is scanned once at start (romfs.c overlay_init);
|
||||
// Player mods (mods.c): one folder per mod under mods/ next to nx2navi.exe (NX2NAVI_MODS_DIR; a relative one is under
|
||||
// that folder too), unpacked as emulators take them: <mod>/romfs, <mod>/exefs and <mod>/cheats, the Atmosphere layout
|
||||
// (atmosphere/contents/<title id>/romfs, atmosphere/exefs_patches/<name>/*.ips) or a mod manager's merged output
|
||||
// (romfs or romfslite, exefs, cheats). ExeFS patch files (.ips, .pchtxt) for the game's main are patch sets the setup
|
||||
// builds into the game (tools/exefs_patches.py), switched with their mod (mods_exefs_switch). The list is scanned once at start (romfs.c overlay_init);
|
||||
// its order and switches live in nx2navi.ini [mods] (NX2NAVI_MODS_ORDER: names top first, separated by '|';
|
||||
// NX2NAVI_MODS_DISABLED: names switched off). The top mod wins a file two mods replace.
|
||||
#pragma once
|
||||
@@ -27,6 +27,7 @@ typedef struct {
|
||||
char exefs[2048]; // UTF-8 path of its ExeFS folder; "" none
|
||||
char cheats[2048]; // UTF-8 path of its cheats folder; "" none
|
||||
int kind, enabled;
|
||||
int start_enabled; // enabled at the scan: what romfs.c, cheats.c and the ExeFS patch sets go by this run
|
||||
ModProblem problem;
|
||||
uint32_t replaced, added, overridden; // romfs.c: files served (replacing / added), files a higher mod serves
|
||||
uint32_t other_version; // files for another game version (RomFS *.Product.<n>.*, ExeFS patches
|
||||
|
||||
Reference in New Issue
Block a user