Open Pickysaurus opened 2 years ago
FWIW EpicData should be a close equivalent of steamdb for epic. And EA desktop is anything but similar to origin by now.
@mirh EpicData seems to be very incomplete. It doesn't have Skyrim, for example. Edit: Found it, the site is just structured in a weird way.
Whether you're developing an extension for Vortex or another tool, having your app automatically detect the install folder of a game can be incredibly useful and provides added convenience for your users. In this article we'll discuss how to find the identifiers used by different game stores and use them to resolve the install folder.
Steam
Being the biggest game store on the internet, Steam game detection and IDs are well documented. Steam stores a lot of it's metadata in
.acf
files. You may need a special parsing library to properly decode these.You can find the Steam App ID of a particular game by using the Steam DB website. App IDs are numerical e.g.
12234
. Remember, that some games may have multiple different editions on Steam which each have their own ID.You can also find the app ID for the installed version of the game inside the
.acf
file underappid
as shown below. This ID is also part of the filename e.g.appmanifest_629730.acf
.GOG
Similarly to Steam, GOG games have numerical IDs. You can usually find this information by using GOG DB, however, if you have the game installed the ID can also be extracted from the registry as one of the keys found under
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\GOG.com\Games
.You can use the same registry path to identify the install location. The numerical key will have a
PATH
attribute containing the folder path you require.Epic Games
At the time of writing, there is no centralised database for game codenames used by the Epic Games Store. If you do not own the game on Epic, you'll usually need to find someone who does to properly identify it. However, in some cases, the ID can be approximated by inspecting the network requests used by the webpage view of the store page for your desired game.
To find the ID for an installed game, first, open the menu under the game tile.![epicgames1](https://user-images.githubusercontent.com/31670524/169086423-33c48a9f-ad89-4dd9-b0c2-9c69e54c2d9e.jpg)
Then create a new shortcut. This will add an icon to your desktop.![epicgames2](https://user-images.githubusercontent.com/31670524/169086468-d86ee071-f16c-42c6-8429-de361d1221ec.jpg)
Right click the icon and select "Properties". Under the "URL" field you will find the app codename with in open command for the Epic Games Launcher. In this example, the codename is
Stellula
.Once you know the game ID, you'll be able to find the installation path front the Epic Games launcher manifests. To find where these are stored, you can check the
AppDataPath
key underHKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Epic Games\EpicGamesLauncher
in the registry.Inside the "Manifests" subfolder you'll see a list of files with long coded file names and the file extension
.ITEM
. These are simply JSON files which contain data similar the to the example below.From the manifest we can confirm the game codename under
AppName
and the installation path underInstallLocation
.Origin/EA Play
Origin (or more recently, EA play) stores manifest files on your PC containing meta information about the installed games. This can be found under
C:\ProgramData\Origin\LocalContent
where you will find a named folder for each game. Inside each folder you will find several different files, the ones we are interested in are the.mfst
files. These can be opened in a text editor.This can be quite an intimidating block of text. What you are looking for specifically is the part that starts with
&id=
, so in the example above&id=OFB-EAST%3a52209
. You may also realise that part of the ID is URL-encoded, so we need to convert%3a
back into a colon. The resulting ID isOFB-EAST:52209
.Windows Store (Xbox)
With games installed with the Xbox app, it can be quite difficult to acquire the game ID. You will also find that unless the game specifically allows you to enable mods via the Xbox App you may not be able to mod it at all as you will not have permission to edit or even view the required files.
Enable Modding (if possible)
If your game supports modding, you'll find an option in the context menu next to the play button to enable mods. Make sure you do this before attempting to track down the app manifest file, otherwise you won't have permission to view it.
Extract the ID from the appmanifest.xml
Once you have mods enabled, you'll be able to open the mods folder either from within on the Xbox app or by finding the game folder under
C:\Program Files\ModifiableWindowsApps
. Inside the game folder you're looking for anappxmanifest.xml
file similar to the example below.In the example above, you can find the application ID and publisher ID under the
Identity
tag. So Pillars of Eternity 2 has an application ID ofVersusEvil.PillarsofEternity2-PC
and a publisher ID ofN=AC6C8E65-87DD-4311-AFEA-997EC62C606E
. In order to launch Xbox games through Vortex, you will need to ascertain the id of the game's executable, luckily this information can be found in the appmanifest under theApplication
tag - you will need to look for the target executable, in this casePillarsOfEternity2.exe
. Note in the data provided above that the application Id isApp
(this is generally the default id for most game executables but can differ from game to game)The game ID required for Vortex to detect this game is
VersusEvil.PillarsofEternity2-PC
, and the app Id required to start the game isApp
.Getting the ID from the registry
An alternative way to find the game ID is to use a tool like the Windows Registry Editor to dive into the registry keys for the Xbox app. Each game is considered a "package" as far as this data structure is concerned, so we'll be using that term to refer to a game in this section.
Find the package full name.
Each Windows Store ID is made up of the publisher ID and the app ID which should be fairly easy to separate. These keys are found under
HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Families\{package_name}
.The sub-key inside each of these package keys will correspond with a different build of the game.
Find the package index
Now we have the full package name, we need to find it's "mutable location" but to get that, we first need to find it's index. You can find this as a sub key under the full package name at
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModel\StateRepository\Cache\Package\Index\PackageFullName\{full_name}
.Find the mutable location
Finally, to get the mutable location, you'll need to use the index at look at
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModel\StateRepository\Cache\Package\Data\{index}\MutableLocation
Generally, this will point to the location discussed in Extract the ID from the appmanifest.xml above.
Ubisoft Connect (UPlay)
Games from Ubisoft Connect can be identified from the system registry, similar to Xbox games.
The installation path for each game can be found under the keys for each installed game at![The registry key for the game install location shown in Registry Editor](https://user-images.githubusercontent.com/31670524/169087254-b3bd4cb7-d710-4781-ae38-20cda679b31f.jpg)
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Ubisoft\Launcher\Installs
. Each numerical ID here is the ID of the game in question. You can work out which is which by theInstallDir
subkey. In the example below, the game ID of Rayman Origins is80
.For whatever reason, the install location does not include the game name. This can be found at
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\UPlay Install {id}
under theDisplayName
subkey.Amazon Games
Games included with an Amazon Prime membership can be installed from the dedicated Amazon Games app. The metadata for these games is well organised into SQLite tables inside AppData. You will need a library to read SQLite tables, or to view it manuually you can use a tool like DB Browser for SQLite.
There are several tables and manifest files dotted around which include useful information such as game metadata and file hashes of all installed files, however the table we are interested in can be found at
%localappdata%\Amazon Games\Data\Games\Sql\GameInstallInfo.sqlite
. Each row in this table contains the ID, install location, name and more.In this example we have the game "Blue Fire" installed via Amazon Games.
As you can see in the image above, the ID for this game is
amzn1.adg.product.0d364464-032c-40c9-a6da-c633a53e3374
and the install directory isC:\Amazon Games\Library\Blue Fire
.