bsatool and NIF debugging improvements

Various changes to make testing NIF reading in all the games much more convenient now that almost all official files are read to the end (excluding Starfield).

  1. Significant changes to niftest. These seem to do pretty much everything I wanted it to do, but there could very well be things that could be further unfuckulated, as some things niftest does with the VFS are somewhat unique to it.
  • Added logging as to which data sources are added/read and which files are read, controlled by quiet flag. In current OpenMW, niftest doesn't log anything when you run it except when NIF debug logging is on or there are errors, which makes it difficult to tell what it actually did.
  • Corrected path logging in all cases to avoid duplicated quote marks.
  • Replaced double quote marks with singular quote marks to be consistent with the engine when it prints paths.
  • The most important one: fixed reading of archives within supplied data directories in case-sensitive filesystems. This allows to properly run niftest on e.g. the main Data directory of any game with the expectation that it'll go through both the loose files and all the archives in that directory. This is probably a regression of fs-strict flag removal, as VFS was previously always case-sensitive in niftest.
  • Some updates to what was logged in existing cases, e.g. make niftest realize it's called niftest and not niftool.
  1. In bsatool, allow extracting individual files from BSAs that use forward slash as the path separator. Known perpetrator is Fallout 76.
  2. Revamp NIF debug logging.
  • It's now disabled by default in the engine now that most files are read to the end without issue. This somewhat improves cell transition performance in games that aren't Morrowind.
  • It's extended to 4.0.0.2 files, as it's useful for them too.
  • It logs user and Bethesda stream versions, which is useful for games starting from FO3 where the stream version matters more than the NIF version (always 20.2.0.7).
  • It no longer prints the filename for each loaded record. The reason it did that is because NIF files may be loaded from multiple threads, but honestly it causes more noise than help, especially in niftest where loading is always single-threaded.
Edited by Alexei Kotov

Merge request reports

Loading