From 4ae392fdfc12b589d314cc0f120379ce5eb23b28 Mon Sep 17 00:00:00 2001 From: Zash Date: Sun, 5 Jan 2025 17:14:29 +0100 Subject: [PATCH 1/6] Fix Epic game store detection (ProgramData) --- epic_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epic_utils.py b/epic_utils.py index 67762cf0..588a4b1c 100644 --- a/epic_utils.py +++ b/epic_utils.py @@ -16,11 +16,11 @@ def find_epic_games() -> Iterable[tuple[str, Path]]: winreg.HKEY_LOCAL_MACHINE, r"Software\Wow6432Node\Epic Games\EpicGamesLauncher", ) as key: - epic_app_data_path, _ = winreg.QueryValueEx(key, "AppDataPath") + epic_data_path, _ = winreg.QueryValueEx(key, "AppDataPath") except FileNotFoundError: - return + epic_data_path = r"%ProgramData%\Epic\EpicGamesLauncher\Data" - manifests_path = Path(os.path.expandvars(epic_app_data_path)).joinpath("Manifests") + manifests_path = Path(os.path.expandvars(epic_data_path)).joinpath("Manifests") if manifests_path.exists(): for manifest_file_path in manifests_path.glob("*.item"): try: From a280e5dadeb0b20853eb433a954423276f60ad24 Mon Sep 17 00:00:00 2001 From: Zash Date: Sun, 5 Jan 2025 16:59:03 +0100 Subject: [PATCH 2/6] Add heroic launcher support for epic games --- epic_utils.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/epic_utils.py b/epic_utils.py index 588a4b1c..c056252e 100644 --- a/epic_utils.py +++ b/epic_utils.py @@ -38,10 +38,10 @@ def find_epic_games() -> Iterable[tuple[str, Path]]: ) -def find_legendary_games() -> Iterable[tuple[str, Path]]: +def find_legendary_games(config_path: str | None = None) -> Iterable[tuple[str, Path]]: # Based on legendary source: # https://github.com/derrod/legendary/blob/master/legendary/lfs/lgndry.py - if config_path := os.environ.get("XDG_CONFIG_HOME"): + if config_path := config_path or os.environ.get("XDG_CONFIG_HOME"): legendary_config_path = Path(config_path, "legendary") else: legendary_config_path = Path("~/.config/legendary").expanduser() @@ -61,8 +61,14 @@ def find_legendary_games() -> Iterable[tuple[str, Path]]: ) +def find_heroic_games(): + return find_legendary_games(os.path.expandvars(r"%AppData%\heroic\legendaryConfig")) + + def find_games() -> dict[str, Path]: - return dict(itertools.chain(find_epic_games(), find_legendary_games())) + return dict( + itertools.chain(find_epic_games(), find_legendary_games(), find_heroic_games()) + ) if __name__ == "__main__": From 5bf8a6cd5880c7d9ade4b067fa617c90dda91c29 Mon Sep 17 00:00:00 2001 From: Zash Date: Sun, 5 Jan 2025 17:20:26 +0100 Subject: [PATCH 3/6] Add unofficial EGS ID DB to README https://erri120.github.io/egs-db/ --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f1d55949..2c0e98bc 100644 --- a/README.md +++ b/README.md @@ -206,7 +206,8 @@ Game IDs can be found here: - For Origin from `C:\ProgramData\Origin\LocalContent` (.mfst files) - For Epic Games (`AppName`) from: - `C:\ProgramData\Epic\EpicGamesLauncher\Data\Manifests\` (.item files) - - or: `C:\ProgramData\Epic\EpicGamesLauncher\UnrealEngineLauncher\LauncherInstalled.dat` + - or `C:\ProgramData\Epic\EpicGamesLauncher\UnrealEngineLauncher\LauncherInstalled.dat` + - or [Unofficial EGS ID DB](https://erri120.github.io/egs-db/) - For Legendary (alt. Epic launcher) via command `legendary list-games` or from: `%USERPROFILE%\.config\legendary\installed.json` - For EA Desktop from `\\__Installer\installerdata.xml` From 1c70bd33c59a8ec0d3ac56d32303f6fcdfef1c13 Mon Sep 17 00:00:00 2001 From: Zash Date: Sun, 5 Jan 2025 17:27:56 +0100 Subject: [PATCH 4/6] Add Epic ID to Subnautica Below Zero --- games/game_subnautica-below-zero.py | 1 + 1 file changed, 1 insertion(+) diff --git a/games/game_subnautica-below-zero.py b/games/game_subnautica-below-zero.py index 5e7177f4..d16cff17 100644 --- a/games/game_subnautica-below-zero.py +++ b/games/game_subnautica-below-zero.py @@ -13,6 +13,7 @@ class SubnauticaBelowZeroGame(game_subnautica.SubnauticaGame): GameShortName = "subnauticabelowzero" GameNexusName = "subnauticabelowzero" GameSteamId = 848450 + GameEpicId = "foxglove" GameBinary = "SubnauticaZero.exe" GameDataPath = "_ROOT" GameDocumentsDirectory = "%GAME_PATH%" From 6d3a40656d40e7372097c401a73157d08ee74e3c Mon Sep 17 00:00:00 2001 From: Zash Date: Sun, 5 Jan 2025 17:28:13 +0100 Subject: [PATCH 5/6] Add Epic ID to Cyberpunk --- games/game_cyberpunk2077.py | 1 + 1 file changed, 1 insertion(+) diff --git a/games/game_cyberpunk2077.py b/games/game_cyberpunk2077.py index f2ad5a35..ac50a6c6 100644 --- a/games/game_cyberpunk2077.py +++ b/games/game_cyberpunk2077.py @@ -201,6 +201,7 @@ class Cyberpunk2077Game(BasicGame): GameSaveExtension = "dat" GameSteamId = 1091500 GameGogId = 1423049311 + GameEpicId = "77f2b98e2cef40c8a7437518bf420e47" GameSupportURL = ( r"https://github.com/ModOrganizer2/modorganizer-basic_games/wiki/" "Game:-Cyberpunk-2077" From 1b22f3053ef12b97f11c766bf79b505a8e8d655a Mon Sep 17 00:00:00 2001 From: Zash Date: Sun, 5 Jan 2025 17:28:21 +0100 Subject: [PATCH 6/6] Add Epic ID to Control --- games/game_control.py | 1 + 1 file changed, 1 insertion(+) diff --git a/games/game_control.py b/games/game_control.py index 23c05818..8fa0c064 100644 --- a/games/game_control.py +++ b/games/game_control.py @@ -16,6 +16,7 @@ class ControlGame(BasicGame): GameNexusId = 2936 GameSteamId = 870780 GameGogId = 2049187585 + GameEpicId = "calluna" GameBinary = "Control.exe" GameDataPath = ""