Add support for checking assets in BA2 files

They're used by Fallout 4.

BA2 file and folder hashes are 32-bit, so collisions are much more
likely than with BSAs, which use 64-bit hashes. I put in some logging
to check the likelihood of collisions, and found that the largest
number of assets loaded was by Fallout4.esm (no surprise), which loaded
371182 files across 5746 folders, with the most files in one folder
being 124871. That puts the probability of a hash collision within that
folder at above 80%.

I did see different Fallout4 -*.ba2 files contain files with the same
combination of folder and file hashes, and similar for
DLCUltraHighResolution -*.ba2 files, so I'm going to try calculating
64-bit hashes from the file paths stored in the BA2 files.
This commit is contained in:
Oliver Hamlet
2022-12-31 18:55:43 +00:00
parent d05685aea4
commit 38cecac07d
6 changed files with 328 additions and 74 deletions
+3 -3
View File
@@ -59,9 +59,9 @@ can be corrected.
Plugin overlap edges are then added. Two plugins overlap if they contain the
same record, i.e. if they both edit the same record or if one edits a record the
other plugin adds. Plugins also overlap if they both load one or more BSAs and
the BSAs loaded by one plugin contain data for a file path that is also included
in the BSAs loaded by the other plugin.
other plugin adds. Plugins also overlap if they both load one or more BSAs (BA2s
for Fallout 4) and the BSAs loaded by one plugin contain data for a file path
that is also included in the BSAs loaded by the other plugin.
For each plugin, skip it if it overrides no records, otherwise iterate over all
other plugins.