focustense / easymod

Modding for the modern age.
44 stars 2 forks source link

Fallout 4 Support Broken #202

Open TheMerricat opened 5 months ago

TheMerricat commented 5 months ago

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"

image1 image2

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)

focustense commented 5 months ago

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.