You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to run EasyNPC against a Fallout 4 installation, the program fails to load any plugins. Instead it reports them all as "Invalid, unreadable, or corrupted"
and with a similar message repeated for each plugin in the logs:
2024-06-01 06:48:43.713 -05:00 [04] [WRN] Plugin Fallout4.esm appears to be corrupt and cannot be loaded.
System.ArgumentException: Value does not fall within the expected range.
at Mutagen.Bethesda.Skyrim.SkyrimReleaseExt.ToSkyrimRelease(GameRelease release)
at Focus.Providers.Mutagen.GameSetup.TryGetMasterNames(String dataDirectory, String pluginFileName)
The text was updated successfully, but these errors were encountered:
This might ironically only be a bug with the validation. The vast majority of the code is game-agnostic, but it looks like I made some specific assumptions about being a Skyrim variant when doing the pre-startup validation during the master scan used to ensure consistency on the plugin selection.
Fixing it should only be a matter of actually looking at the GameInstance/GameSelection, or refactoring the get-masters snippet to be a method of one of them.
Of course that does not guarantee that there won't be some other FO4 issue that shows up immediately afterward, but we'll take them one at a time...
ETA is still roughly end of the month before I can get started.
Mutagen has a [convenience method](https://mutagen-modding.github.io/Mutagen/Big-Cheat-Sheet/#get-list-of-masters-from-a-mod) to perform this exact task more precisely, but we also want to really try to load the mod in order to do basic validation.
Unfortunately this does not have any async support, but for the moment it seems to be fast enough not to seriously delay startup.
This probably fixes the issue described in #202, although there may be many other FO4-related issues to follow. It definitely does fix the `ObjectDisposedException` encountered in Mutagen 0.45 when calling `CreateFromBinaryOverlay`.
When attempting to run EasyNPC against a Fallout 4 installation, the program fails to load any plugins. Instead it reports them all as "Invalid, unreadable, or corrupted"
and with a similar message repeated for each plugin in the logs:
The text was updated successfully, but these errors were encountered: