Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallout 4 Support Broken #202

Open
TheMerricat opened this issue Jun 2, 2024 · 1 comment
Open

Fallout 4 Support Broken #202

TheMerricat opened this issue Jun 2, 2024 · 1 comment
Labels
bug Something isn't working easynpc Issues/requests relating the EasyNPC app

Comments

@TheMerricat
Copy link

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
Copy link
Owner

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.

@focustense focustense added bug Something isn't working easynpc Issues/requests relating the EasyNPC app labels Jun 2, 2024
focustense added a commit that referenced this issue Aug 21, 2024
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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working easynpc Issues/requests relating the EasyNPC app
Projects
None yet
Development

No branches or pull requests

2 participants