Hello.
I'm looking for informations on the way .ba2 files are loaded / optimized in the game, based on what's specified in the ini settings.
As you probably are aware of, the archive format changed from .bsa to .ba2. With this came a lot of optimization in resource management from the game, and a few more complexity.
In Skyrim, we had :
sResourceArchiveList which listed all common .bsa
sResourceArchiveList2 which listed location-based .bsa (voices)
In FO4, we have :
sResourceIndexFileList
sResourceStartUpArchiveList
SResourceArchiveList
SResourceArchiveList2
sResourceDataDirsFinal
SGeometryPackageList
SCellResourceIndexFileList
SResourceArchiveMemoryCacheList
Which is... something else, to say the list.
Here is a quick anolysis of what I can guess / already figured out :
1.
sResourceDataDirsFinal have to point loose folders/files you want to have loaded in the game if you don't have bInvalidateOlderFiles set to 1.
What I don't know : Is there a performance/stability/whatever difference between the two options :
bInvalidateOlderFiles=1
or
sResourceDataDirsFinal=STRINGS\, TEXTURES\, MUSIC\, SOUND\, INTERFACE\, MESHES\, PROGRAMS\, MATERIALS\, LODSETTINGS\, VIS\, MISC\, SCRIPTS\, SHADERSFX\
(I can't help but think that only folders/files actually installed should be listed in sResourceDataDirsFinal, but haven't tested it).
2.
sResourceIndexFileList list all the texture-related .ba2. By its name and default content, it'd seem that .ba2 somehow optimized for textures have to be listed here to take advantage of that. Also, archive listed here don't have to be listed anywhere else. By the look of it, only a texture-optimization mod would have to be its archive added here, provided his archive have been optimized the same way beth's .ba2 were. I think this is something to keep in mind for the UFO4P if you guys reword/optimize some textures.
3.
sResourceStartUpArchiveList by default load "Startup" (meshes, music, sounds, textures and interface files loaded related to the loading menu), Shaders, and Interface. "Startup" isn't listed anywhere else. It'd seem that files listed here are loaded at the launch of the game, while others are loaded later.
4.
sResourceStartUpArchiveList seems similar to skyrim, except that voices files are also loaded here. basically, generic .ba2 goes in here.
SResourceArchiveList2 point to the animations .ba2 by default... why ? mistery. This is completely different than what Skyrim used this ini entry for.
5.
SGeometryPackageList and SCellResourceIndexFileList respectively load Fallout4 - Geometry.csg and Fallout4.cdx. I haven't invesitgated those files yet. Any input is welcome.
6.
SResourceArchiveMemoryCacheList, a very interesting entry. Especially because it point to .ba2 already listed in other settings. Misc (scripts and some texture effects used to alter the visuals during weather or specific atmospheres), Shaders, Interface, and Materials. All those files have one common point : They're fairly dynamic stuffs which the game need to have quick access to. This, plus the name, lead me to think that .ba2 listed here are kept in memory in a specific way so that the game can access to it way faster than to others. The downside being probably a higher RAM usage/reservation.
Have anyone figured / proved / know more about all this ? (xSE guys maybe ? I guess anolyzing runtime code is the best way to understand this kind of things).