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

Patchers apply to other game modes. #18

Open
mrudat opened this issue Nov 27, 2019 · 2 comments
Open

Patchers apply to other game modes. #18

mrudat opened this issue Nov 27, 2019 · 2 comments

Comments

@mrudat
Copy link

mrudat commented Nov 27, 2019

I've got a patcher that supports only gmFO4, but it is allowed to (attempt, and fail) to be applied to gmSSE and gmTES5.

I figure it should either be hidden entirely, given that it does not apply to the game mode at all, or it should be marked in red, similar to the patchers that do not have their required mods installed.

@mrudat
Copy link
Author

mrudat commented May 17, 2020

Session with expected behaviour:

================================================================================
Session started at Sun May 17 2020 22:35:37 GMT+1000 (Australian Eastern Standard Time)

[INFO] zEdit v0.6.5 x64
...
[INFO] Modules loaded
[INFO] User selected profile: Fallout 4
[INFO] Using game mode: gmFO4
[INFO] DataPath: E:\Program Files (x86)\Steam\steamapps\common\Fallout 4\data\
[INFO] AppDataPath: C:\Users\Martin Rudat\AppData\Local\Fallout4\
[INFO] MyGamesPath: C:\Users\Martin Rudat\Documents\My Games\Fallout4\
[INFO] GameIniPath: C:\Users\Martin Rudat\Documents\My Games\Fallout4\Fallout4.ini
[INFO] Loading deferred modules...

Session with unexpected behaviour:

================================================================================
Session started at Sun May 17 2020 22:33:40 GMT+1000 (Australian Eastern Standard Time)

[INFO] zEdit v0.6.5 x64
[INFO] Initializing xelib with "E:\Games\zEdit\XEditLib.dll"
[INFO] xelib v0.6.0.0 initialized successfully
[INFO] xelib working directory: "E:\Games\zEdit\"
[INFO] Loading modules...
[INFO] Loading module itemTypeService v1.9.0
[INFO] Loading module referencesServices v0.0.1
[INFO] Loading module skyrimKeywordHelpers v1.0
[INFO] Loading module unifiedPatchingFramework v1.5.1
[INFO] Loading module skyrimMaterialPatcher v1.0.0
[INFO] Modules loaded
[INFO] Loading deferred modules...
[INFO] Loading module aCastOfThousands v0.0.1
...
[INFO] Loading module theJoyOfPerspective v0.0.1
[INFO] Deferred modules loaded
[INFO] User selected profile: Fallout 4
[INFO] Using game mode: gmFO4

It looks like sometimes the profile gets selected after the deferred modules are loaded, and usually before. I'm supplying the profile on the command line (I'm launching zEdit from MO2, so I know for certain what profile I want to load).

@mrudat
Copy link
Author

mrudat commented May 22, 2020

This doesn't fix why it's not working, but it does make the problem go away without restarting repeatedly:

     this.reloadPatchers = function() {
         let patcherIds = patchers.map(patcher => patcher.info.id);
         patchers = [];
         patcherIds.forEach(id => {
             let patcherPath = fh.jetpack.path(`modules\\${id}`);
             moduleService.loadModule(patcherPath);
         });
+        this.updateForGameMode();
     };

     this.updateForGameMode = function(gameMode) {
+        if (gameMode) this.gameMode = gameMode;
+        if (this.gameMode) gameMode = this.gameMode;
         patchers = patchers.filter(patcher => {
             return patcher.gameModes.includes(gameMode);
         });
     };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant