Preserve authored BFRES resource sizes during merge#16
Conversation
|
I can see this potentially causing issues, since cross-version differences will be included, as well as accidental changes and/or previously automated changes. (Especially since a lot of older mods aren't tkcls.) It sounds like Bubbles has already suggested making this flag-enabled in the tkproj, but it might be even better to control exactly which entries have overrides. I propose this feature look more like defining exactly which files have overrides in the tkproj and then storing them in an RSTB changelog (to avoid using up This also expands the feature beyond just BFRES files. |
|
Changed this to be fully opt-in instead of automatically retaining values from a mod’s RSTB. Overrides are now explicitly defined by canonical path and value in the .tkproj, then packaged as a small RSTB changelog rather than using Reserved1. So it now also works beyond BFRES and avoids carrying over unwanted RSTB changes. The TKMM Advanced tab includes controls for manually adding values or importing selected entries from an existing RSTB. Overrides apply across all game versions. Companion PR: TKMM-Team/Tkmm#172 Also, overrides are serialized in the .tkproj JSON and can be edited manually: |

Goal
Preserve resource-size values of bfres that were hand tweaked in mods instead of always replacing them with TKMM’s calculated estimate.
This supports intentionally optimized values that are smaller than TKMM’s overestimation of bfres files but are known to work correctly.
Changes
Reserved1metadata.Using the existing reserved changelog metadata avoids changing the binary package format or requiring a package-version migration. Older readers can safely ignore the added metadata.
Notes
An authored size is preserved only when:
When multiple mods replace the same BFRES, both the file and its resource-size value come from the same winning mod.