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 supports BSAs used from:
* Oblivion
* Fallout 3
* Fallout: New Vegas
* Skyrim
* Skyrim: Special Edition
If Skyrim VR uses the same BSA format as Skyrim SE, that's also supported.
Morrowind BSAs are intentionally not supported because they cannot be
loaded by plugins and so are of no interest to LOOT.
The BSA parsing code has been adapted from my abandoned libbsa library.
This doesn't bother reading folder and file names as hash collisions
seem pretty unlikely (2^64 possible folder hashes, and 2^64 possible
file hashes per folder).
The code checks and requires that BSAs use little-endian numbers, as
while big-endian BSAs are apparently possible I've never seen one,
and I don't want to try adding support without one to test against.
- Don't use a class, it doesn't add anything.
- Use constexpr for the individual version numbers
- Use a function to get the revision string, for consistency with the
version string.
LOOT now uses Qt's support for Markdown, but its support for GFM is
bugged so LOOT uses CommonMark instead. The practical impact is very
minor, but reflect the difference in libloot's docs.
LOOT no longer uses Git to keep its copies of the masterlists up to
date, so this functionality is no longer needed. The removed API items
are:
- UpdateFile()
- GetFileRevision()
- IsLatestFile()
- libgit2_category()
- GitStateError
Older versions of Sphinx don't work with whatever the default version of
Python is on GitHub Actions, and never versions of Sphinx need a newer
version of Python.
Also update the RTD theme and Breathe while I'm at it.
They don't need to be member functions, and needing a pointer to an
instance of that interface is awkward.
The function names have also changed to reflect that they're not
specific to the masterlists.