ModOrganizer2 / modorganizer

Mod manager for various PC games. Discord Server: https://discord.gg/ewUVAqyrQX if you would like to be more involved
http://www.nexusmods.com/skyrimspecialedition/mods/6194
GNU General Public License v3.0
2.24k stars 163 forks source link

MO2-managed Skyrim SE from GOG won't load mods #1744

Open packdstack opened 2 years ago

packdstack commented 2 years ago

The problem:

Loading mods via MO2 for GOG's Skyrim SE doesn't work, but copying loadorder.txt & etc to the directory GOG's SSE is expecting works (until you make a mod change and now the two directories are out of sync). (See details.) Due to other changes (stated in details), I suspect there's other things that likely don't work that I haven't tested yet.

To Reproduce:

  1. Install GOG's Skyrim SE & MO2
  2. Install a mod in MO2. (I'll use Alternate Start as an example, since it's easy to see if it works when selecting new game, though there may be an easier mod to show this behavior.)
  3. Start Skyrim via SkyrimSE or skse. (Doesn't matter.)
  4. Start a new game to see if mod loads. (If you're in the cart, Alternate Start didn't load.)

Environment:

Details:

Per nexusmods: The game version is 1.6.659.0. Game settings (INI files) are stored under "%userprofile%\Documents\My Games\Skyrim Special Edition GOG". Saved games are stored under "%userprofile%\Documents\My Games\Skyrim Special Edition GOG\Saves". Load order data (plugins.txt and loadorder.txt files) is stored under "%localappdata%\Skyrim Special Edition GOG".

Link to Mod Organizer logs:

USVFS:

usvfs log

MO Interface:

mod_interface.log

packdstack commented 2 years ago

Side note: @LostDragonist I appreciate you adding the username blacklist code. I was searching my logs for my user name prior to uploading my logs and was pleasantly surprised it wasn't in there.

triffid commented 2 years ago

Mine's complaining about MO2/logs/usvfs-2022-09-30_18-22-05.log:02:54:53.233 [I] "C:\users\USERNAME\Local Settings\Application Data\Skyrim Special Edition" doesn't exist too, when it should be looking for C:/users/triffid/Local Settings/Application Data/Skyrim Special Edition GOG

Can't find any option in MO to change it either…

qudix commented 2 years ago

The paths are specific to the game edition. The solution in this case would be to either make another game_plugin for the GOG edition, or modify the existing one to check for the new paths.

AnyOldName3 commented 2 years ago

It's better UX-wise if the plugin works with both versions. We should be able to detect if a Skyrim install is a Steam one, e.g. by:

packdstack commented 2 years ago

I can confirm that my GOG copy doesn't have steam_api.dll, steam_api64.dll, or steam_appid.txt. (I'm pretty sure I've seen other games from GOG have steam api dlls.)

I can also say mine came with a Galaxy64.dll, but I installed it via GOG Galaxy, so I'm unsure if it's in their offline installer, but I can say it won't run without it.

hacsuser commented 2 years ago

Just in case it's helpful: I used the offline Installer and can confirm that there's a Galaxy64.dll in the Game's Folder. Apart from that there's a gog.ico, goggame-1711230643.hashdb, goggame-1711230643.ico and goggame-1711230643.info

ghost commented 2 years ago

I'd kindly suggest abstaining from checking parent directories. In our age of spare SSDs, it's easy to break compatibility with multiple potential install locations (i. e. Steam library folder at non-C:/ drive - where GOG version could be installed TOO! - or symlinked folders or whatnot) It's end user's choice - not ours.

AnyOldName3 commented 2 years ago

Steam has to have the files I mentioned to work, whether or not the library folder is on a non-default drive. You can't have a Steam version of the game without those files - if you do, it's pirated, which we already explicitly don't support.

We're going to pick whichever detection method is most reliable. So far, the only things we know about that don't check parent directories are known to have flaws, so if we don't discover something new, that might mean we have to check parent directories. If the only downside is that Gog installs installed within a Steam library directory don't work properly, it wouldn't be the end of the world if we declared that such a silly setup wasn't supported.

LuckyTrixx commented 2 years ago

Hay, have the same problem. MO complains about a missing Plugins.txt. That one is, as mentioned, under "%localappdata%\Skyrim Special Edition GOG". If i write the Mod.esp into that file, and start the Game via MO, the Mods load. So i guess, MO isn't aware of the Location differences for the GOG Version? Maybe you can do something via shortcuts?

Edit: I found a temporary Solution: I deleted the plugins.txt in the Mod organizer 2 Location, restart Mod Organizer 2 to re-create it. Then i Symlinked it into "%localappdata%\Skyrim Special Edition GOG". -> Proft.

hacsuser commented 2 years ago

Steam has to have the files I mentioned to work, whether or not the library folder is on a non-default drive. You can't have a Steam version of the game without those files - if you do, it's pirated, which we already explicitly don't support.

We're going to pick whichever detection method is most reliable. So far, the only things we know about that don't check parent directories are known to have flaws, so if we don't discover something new, that might mean we have to check parent directories. If the only downside is that Gog installs installed within a Steam library directory don't work properly, it wouldn't be the end of the world if we declared that such a silly setup wasn't supported.

Parent Folder Checking wouldn't really help, at least for the GOG Version. That's because you can download a Offline Installer which allows you to install the Game wherever you want. For Detection of the GOG Version of Skyrim checking for Galaxy64.dll within the Game's Directory seems to be the most reliable way, as both the Offline Installer and the GOG Galaxy Client seem to install this File.

AnyOldName3 commented 2 years ago

We'd be checking the parent directory to see if it were a Steam install, and declaring anything else to be a Gog install rather than checking the parent directory to see if something was a Gog install, as the Gog version doesn't write anything to its parent directory. Obviously, we wouldn't try and do a thing that was impossible as it wouldn't work.

Now we've got confirmation from Ian on the SKSE team that the Gog version has Galaxy64.dll whether or not it's installed from Galaxy, though, it's probably a better idea to check for that file and assume everything else is a Steam version.

mikomuto commented 2 years ago

We know that steam installs record the path to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Bethesda Softworks\Skyrim Special Edition string value:Install path but registry keys for GOG depend on version?:

Skyrim SE: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\GOG.com\Games\1711230643 string value:path

Skyrim AE: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\GOG.com\Games\1162721350 string value:path

The offline installer will update the registry with the current install directory. Both keys are present when installing base Skyrim SE first and then installing the AE update. I can't verify if true with GOG Skyrim AE as I purchased the upgrade separately.

packdstack commented 2 years ago

AE is just treated as SE + AE Upgrade (DLC) and the game's listed as SE in your library. I purchased AE. Imagine my surpise when I saw it was SE in my library. :) AE's only 2.5GB, so I wager it's all just CC content. (Galaxy just auto-installs everything.)

SE's install path's likely what you're looking for, though it could be inferred from AE Upgrade if you purchased it. Honestly, the AE upgrade one is probably not all that useful. (See attached.)

Note: Registry key path seems to be based on product ID. Note: The AE one says it depends on the SE one and the SE one mentions the AE one as DLC.

1162721350 1711230643

packdstack commented 2 years ago

Personally, I'd rather use the Galaxy64.dll method than rely on registry keys. I can't imagine the game uses them for anything. They're likely more for GOG's own housekeeping, but I couldn't tell you for sure without deleting them. I'd rather not. :)

packdstack commented 2 years ago

A follow-up. I moved the game into a subfolder to move MO2 out of Skyrim's folder. (I wanted to keep them close, for archiving purposes, but not in each other's way. Also to reduce the possibility of vfs shenanigans.) The game loaded fine. Mods loaded as expected (since I re-linked the loadorder and plugins symlinks). The registry entries were untouched. GOG Galaxy may not know how to manage it now, but the game has its own uninstaller. I'm sure it'll be fine.

packdstack commented 2 years ago

One more thing. On skse mods. I hear tell you may already be aware, but skse dlls & bins don't appear to load. I could only verify that recently by copy-pasting Soaking Wet into the game's own data directory to see that it actually works. (Admittedly, any broken skse mod could have been sufficient, since I wasn't getting any complaints from skse itself and certain features of such mods wouldn't work while others did.)

If this needs to be in a separate issue, I'm willing to create a new one, but I can see how it can be considered part of this one.

Silarn commented 2 years ago

I probably should have checked the tickets first but there is an updated game plugin available in the discord server dev-builds channel. I did an initial standalone plugin just to make sure the basic functionality worked, but I have now released a combined plugin which should be able to handle both versions using the DLL check mentioned above.

More testers would be welcome as I do not own the GOG version at the moment.

Gr3q commented 2 years ago

@Silarn If you need it I can gift the game to you on GOG (I would hope while it's still on sale), all I need is an email address.

Silarn commented 2 years ago

An updated game plug-in has been released on Nexus, so feel free to try it out.

Gr3q commented 2 years ago

It's working, thanks.

badgerbadgerdroid commented 11 months ago

I seem to be having the same issue with Nehrim from GOG store. Checking/unchecking ESP in MO2 does not actually activate or deactivate it. I have to open wryebash and enable the mod there for MO2 to load it in game.