Open SundayReds opened 3 years ago
Are voices and sounds the same?
Ah it should be sounds not voices?
It seems 2 and 3 are being put into 1 for some reason?
What version are you using? I haven’t had this issue ever
Oh! the g_archive_types_1 has a “” in it, maybe it’s putting everything in it because all the bsa files fall under it?
@Witherking25 you're absolutely right. I was thinking the same thing last night since that seems to be the only abnormality among the three lists, and i only just had time to test it out on repl it.
the problem is with the following line - specifically, the std::string::find()
used to compare suffixes:
Here's the sandboxed code where it returns a wrong result when compared against an empty suffix: third case. I think a simple fix would be to use the ==
operator to compare the suffixes. ie. if (suffix_pair.first == expected_suffix) {
There's another line within the same file that concerns me as well:
From cppreference, this is the description for std::string:find_last_of(const basic_string& str, size_type pos = npos)
:
Finds the last character equal to one of characters in the given character sequence. Return Value: Position of the found character or npos if no such character is found.
It seems to me that the intended purpose is to compare if the strings are equal, which is not the same as the above function and could possible give much more false positives (and probably some false negatives as well) than intended.
@caseif : are you able to confirm this?
i can confirm that replacing both of those with == fixes the issue
I found this out when I was tweaking the application and I thought you might want to know.
Expected: According to Skyrim-NX-Toolkit, under
Skyrim.ini
'ssResourceArchiveList=
, only meshes, animations, and sounds-suffixed bsa's are needed along with the non-suffixed bsa'sActual: Almost everything is added. I've found
- Voices.bsa
,- Textures.bsa
, and- Animations.bsa
in mine. EDIT: Apologies,- Animations
is supposed to be there, but the other two aren'tThe funny thing is that the voices, textures and animations are getting added properly to their other locations in
Skyrim.ini
andSkyrim_en.ini
, and they all rely on the samewriteFileList()
function inini_help.cpp
to get it done.The
g_archive_types_1
passed however seems to be defined properly (it only contain meshes, animations, sounds and empty suffixes), so honestly I'm really stumped at why this is happening without tracing out the entire code in detail. Maybe you could take a look.