mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-22 05:05:56 +00:00
Merge the resource size table of the enabled mods at start
The game sizes the buffer for a file from its entry in System/Resource/ResourceSizeTable.*.rsizetable.zs, so a mod file that grew could fail to load, and a file a mod added had no entry. With a player mod enabled, romfs.c restbl_overlay now rebuilds the table at start from: - the game's table; - every table of this version that a mod (or the Xbox prompts folder) ships, where the larger entry wins; - a mod's table for another version, for that mod's own files only; - each served mod file: a grown file's entry rises by the growth times its type's factor, and an added file gets an estimate. The factors come from the 1.4.3 table measured against its own files (most types need the size plus at most 8 KiB; bfres 1.5x, bkres 2x, bgyml 3.85x). The result is served from <profile>/mods/ and takes about 90 ms. A mod's table no longer counts as a clash with the Xbox prompts. Game entries are never lowered. tests/mods_romfs_check.py checks the merged table and now passes probe-fs a profile of its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ac69f39529
commit
3dd7f846b8
5 files changed
+537
-6
No files matched your search
@@ -64,6 +64,10 @@ it up or down. When two mods change the same file, the higher one wins.
|
||||
export location to an empty folder inside `mods/` (for example `mods/TKMM`). That folder is then one mod here.
|
||||
- Files made for another game version (names with `.Product.<number>.` that this version does not have) are left out;
|
||||
the Mods tab counts them. Look for the mod's release for your game version.
|
||||
- The resource size table (`System/Resource/ResourceSizeTable.Product.<n>...rsizetable.zs`), which tells the game how
|
||||
much memory each file needs, is rebuilt at every start with mods enabled: the tables the mods ship are merged and
|
||||
the entries of files a mod made larger or added are raised. The log line `RomFS: resource size table: ...` says
|
||||
how many. A mod's table for another game version still counts for that mod's own files.
|
||||
- Mods that patch the game code (`exefs/*.ips`, `exefs/*.pchtxt`) are listed but not applied yet; a mod with both kinds
|
||||
of files stays off as a whole until they are.
|
||||
- Mods with their own code (`exefs/subsdk*` or a replaced `exefs/main`, such as UltraCam) never load, their RomFS files
|
||||
|
||||
Reference in new issue
Block a user