-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Extraction and repacking errors for packfiles (.vpp_pc and .str2_pc) can be notoriously hard to find and fix in my experience. If you're lucky it'll cause the game to crash or have obvious bugs but that's not always the case. Unpacking and repacking packfiles is a critical part of modding RFG. If a packfile is repacked incorrectly you might as well not bother making that mod. That's why it'd be useful to have some automated tests.
How these tests could work:
- Unpack all vpp_pc and str2_pc files. Hash all extracted files and compare to a premade list of file hashes to ensure they've been unpacked correctly. Could also check the magic signature for formats which have them but this excludes a large amount of files (every gxxx_pc format).
- Repack all str2_pc and vpp_pc files and try verify integrity by comparing them with the games files. One problem with this is that repacked files are not always 100% identical to the vanilla game files. There are some values in vanilla packfiles which are just junk data that are set at runtime, the packers set these to zero. Depending on the order of packfile entries the resulting file may also be slightly bigger or smaller due to different alignment byte counts (since the final file doesn't get alignment bytes). This could be fixed by repacking the entries in the same order and/or writing a tool that validates the important values rather than doing a plain byte comparison.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels