Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Gez

Detecting GOG.com IWADs

Recommended Posts

Many source ports already have code to query the Steam path and then find out if there are IWADs of games bought through Steam. (For reference, you need to find "InstallPath" in HKLM\Software\Valve\Steam, then add "/SteamApps/common/" to it, and finally add the game's own subdirectory.)

Here's how to do the same thing for GOG IWADs. I have already implemented it on ZDoom, and I'd like to see it adopted by other ports as well -- at least those that already have a feature to seek for installed IWADs.

Each game (currently: Ultimate Doom, Doom II + Master Levels, and Final Doom) has its own registry folder and its own install path (so contrarily to Steam, there's no "SteamApps/common/<gamename>" set up). First you need to find the parent folder for all GOG games. It will be in HKLM\Software\GOG.com\Games. If you compile your port as a 64-bit application, you should probably use HKLM\Software\Wow6432Node\GOG.com\Games instead.

The subfolder with the game-specific keys are identified by their IDs. More precisely, we have:
HKLM\Software\GOG.com\Games\1435827232 for Ultimate Doom
HKLM\Software\GOG.com\Games\1435848814 for Doom II and the Master Levels
HKLM\Software\GOG.com\Games\1435848742 for Final Doom

For each game, you'll want to find the "Path" key, as it contains the installation path for that game. For example, for Ultimate Doom, what you'll want to do is query the value of HKLM\Software\GOG.com\Games\1435827232\Path.

Once you have queried the value, make sure it is valid (if the string is empty, the key does not meaningfully exists). Then you can use that path to find the wads.


Ultimate Doom:
<Ultimate Doom path>\DOOM.WAD

Doom II:
<Doom II path>\doom2\DOOM2.WAD

Master Levels:
<Doom II path>\master\wads\ATTACK.WAD to <Doom II path>\master\wads\VIRGIL.WAD

Plutonia
<Final Doom path>\Plutonia\PLUTONIA.WAD

TNT: Evilution
<Final Doom path>\TNT\TNT.WAD

Share this post


Link to post

UPDATE! For Strife!

Yes, forum, I know this thread is more than three months old.



Anyway:

HKLM\Software\GOG.com\Games\1432899949 for Strife: Veteran Edition

<Strife path>\Strife1.wad (voices.wad and SVE.wad are there too)

Share this post


Link to post

Thanks for the good info. Would you mind listing the Steam method for completeness? Thanks in advance.

Share this post


Link to post

I already did:

(For reference, you need to find "InstallPath" in HKLM\Software\Valve\Steam, then add "/SteamApps/common/" to it, and finally add the game's own subdirectory.)


Here are the relevant Steam paths:

<InstallPath>/SteamApps/common/doom 2/base/DOOM2.WAD
<InstallPath>/SteamApps/common/DOOM 3 BFG Edition/base/wads/doom.wad
<InstallPath>/SteamApps/common/DOOM 3 BFG Edition/base/wads/doom2.wad
<InstallPath>/SteamApps/common/final doom/base/PLUTONIA.WAD
<InstallPath>/SteamApps/common/final doom/base/TNT.WAD
<InstallPath>/SteamApps/common/heretic shadow of the serpent riders/base/HERETIC.WAD
<InstallPath>/SteamApps/common/hexen/base/HEXEN.WAD
<InstallPath>/SteamApps/common/Hexen Deathkings of the Dark Citadel/base/HEXDD.WAD
<InstallPath>/SteamApps/common/Hexen Deathkings of the Dark Citadel/base/HEXEN.WAD
<InstallPath>/SteamApps/common/ultimate doom/base/DOOM.WAD
<InstallPath>/SteamApps/common/Strife/strife1.wad

Share this post


Link to post

That's not the correct method for Steam games, as the client allows you to install to different drives/locations. You actually need to check the client's manifest for the real install location. Likewise I believe the GOG Galaxy client allows for the same, although I have no idea how it tracks that.

Share this post


Link to post
Edward850 said:

That's not the correct method for Steam games, as the client allows you to install to different drives/locations. You actually need to check the client's manifest for the real install location.

Feel free to submit the appropriate pull request to ZDoom. (And other ports.)

Edward850 said:

Likewise I believe the GOG Galaxy client allows for the same, although I have no idea how it tracks that.

If you take another look, we're getting the install directory of each game specifically. Unless for some reason GOG decided that games installed through Galaxy would use different registry keys than games installed through installers...

Share this post


Link to post

Games installed standalone and through GOG Galaxy use the same registry keys. (Actually, I believe Galaxy just downloads the standard setup*.exe files and runs them with unattended switches. I haven't confirmed this, but I have a strong suspicion of it being the case)

You can see an example here:

Share this post


Link to post
Gez said:

I already did:

Oops, don't know how I missed that... Thanks!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×