caseif / SkyMM-NX

Simple mod manager for Skyrim: Switch Edition.
MIT License
16 stars 4 forks source link

App can generate an invalid INI file (entry character length) #3

Open caseif opened 4 years ago

caseif commented 4 years ago

SkyMM-NX does not do any length checks at the moment and will dutifully generate INI entries which exceed the maximum character limit if too many mods are enabled. It should either fix the issue so that the generated INI file is valid, or refuse to save it.

caseif commented 3 years ago

So I think the behavior of SkyMM is incorrect here - looking further into it, it seems like the game automatically loads BSAs that are associated with a plugin without the need for them to be present in sResourceArchiveList. If this is true (I haven't tested it yet), then we could probably just skip adding BSAs for ESP plugins to the list and fix the issue for common use cases with minimal effort.

Alternatively, if we still want to address the underlying issue, we could map the BSAs to magic names (like "a", "b", "aa", "ab") and store the map as a local CSV, then symlink the corresponding BSAs to their "magic" names. With this approach I think we could fit somewhere in the neighborhood of 128 BSAs.

Finally, to fix the issue entirely, we could look into something like generating dummy ESLs to wrap the loose BSAs. I'm not familiar with the file format and I'm not sure if there's any documentation available (given it's most definitely proprietary), but I think this would outright remove the BSA limit.

SundayReds commented 3 years ago

So I think the behavior of SkyMM is incorrect here - looking further into it, it seems like the game automatically loads BSAs that are associated with a plugin without the need for them to be present in

Where did you find this? That would be pretty huge if it's true. I've tried removing a - Meshes.bsa for Cloaks of Skyrim but then all i got were invisible cloaks.

Alternatively, if we still want to address the underlying issue, we could map the BSAs to magic names (like "a", "b", "aa", "ab") and store the map as a local CSV, then symlink the corresponding BSAs to their "magic" names. With this approach I think we could fit somewhere in the neighborhood of 128 BSAs.

I was modifying your app for my own use and did something similar. In https://github.com/SundayReds/SkyMM-NX/pull/2 I gave the app the ability to store "nicknames" (alias) for each mod. The list of nicknames would be stored in a simple .txt which can be edited manually as well without too much effort. I considered .csv but the data really isn't that complicated, and it's slightly more troublesome to create or edit one manually on PC on a whim.

In https://github.com/SundayReds/SkyMM-NX/pull/3 I gave the app the ability to auto-rename the base_name of all mods to short letter names like "a", "b", ... "aa" etc. as well as to auto shorten all recognized suffixes to single letters. In addition, using the above nicknaming function, the newly renamed mod will be "nicknamed" with the original base_name before the shortening.

I was originally going to take the repo private after I'm done making my own personal modifications, but if you like I can PR them as contributions before doing that.