From c3a946ecdb3f11b8e1f8710a4a09fb19b79bc739 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Sat, 30 Sep 2023 18:51:57 -0500 Subject: [PATCH 1/5] Virtualize both FalloutNV / _Epic for plugins.txt - Apparently BGS shipped with the launcher using one and the game using the other. (The game uses the original directory.) --- src/gamefalloutnv.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gamefalloutnv.cpp b/src/gamefalloutnv.cpp index d9bb80d..a12a905 100644 --- a/src/gamefalloutnv.cpp +++ b/src/gamefalloutnv.cpp @@ -296,8 +296,13 @@ MappingType GameFalloutNV::mappings() const for (const QString& profileFile : {"plugins.txt", "loadorder.txt"}) { result.push_back({m_Organizer->profilePath() + "/" + profileFile, - localAppFolder() + "/" + gameDirectoryName() + "/" + profileFile, + localAppFolder() + "/" + gameShortName() + "/" + profileFile, false}); + if (selectedVariant() == "Epic Games") { + result.push_back( + {m_Organizer->profilePath() + "/" + profileFile, + localAppFolder() + "/" + gameDirectoryName() + "/" + profileFile, false}); + } } return result; From 10079e95b8523ec06205fa99e3a4b8eddc13931b Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Sat, 30 Sep 2023 19:46:05 -0500 Subject: [PATCH 2/5] Update launch args to work properly with EGS --- src/gamefalloutnv.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/gamefalloutnv.cpp b/src/gamefalloutnv.cpp index a12a905..4143a91 100644 --- a/src/gamefalloutnv.cpp +++ b/src/gamefalloutnv.cpp @@ -141,19 +141,24 @@ void GameFalloutNV::detectGame() QList GameFalloutNV::executables() const { - QList executables = + ExecutableInfo game("New Vegas", findInGameFolder(binaryName())); + ExecutableInfo launcher("Fallout Launcher", findInGameFolder(getLauncherName())); + QList extraExecutables = QList() - << ExecutableInfo("New Vegas", findInGameFolder(binaryName())) << ExecutableInfo("Fallout Mod Manager", findInGameFolder("fomm/fomm.exe")) << ExecutableInfo("Construction Kit", findInGameFolder("geck.exe")) - << ExecutableInfo("Fallout Launcher", findInGameFolder(getLauncherName())) << ExecutableInfo("BOSS", findInGameFolder("BOSS/BOSS.exe")) << ExecutableInfo("LOOT", QFileInfo(getLootPath())) .withArgument("--game=\"FalloutNV\""); - if (selectedVariant() == "Epic Games") { - executables.append(ExecutableInfo( + if (selectedVariant() != "Epic Games") { + extraExecutables.append(ExecutableInfo( "NVSE", findInGameFolder(feature()->loaderName()))); + } else { + game.withArgument("-EpicPortal"); + launcher.withArgument("-EpicPortal"); } + QList executables = {game, launcher}; + executables += extraExecutables; return executables; } From 662b84ac39211f41e3cce832bf1db98b7ef5c612 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Sat, 30 Sep 2023 19:54:33 -0500 Subject: [PATCH 3/5] Move NVSE to top of 'extra' executables --- src/gamefalloutnv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gamefalloutnv.cpp b/src/gamefalloutnv.cpp index 4143a91..565a33a 100644 --- a/src/gamefalloutnv.cpp +++ b/src/gamefalloutnv.cpp @@ -151,7 +151,7 @@ QList GameFalloutNV::executables() const << ExecutableInfo("LOOT", QFileInfo(getLootPath())) .withArgument("--game=\"FalloutNV\""); if (selectedVariant() != "Epic Games") { - extraExecutables.append(ExecutableInfo( + extraExecutables.prepend(ExecutableInfo( "NVSE", findInGameFolder(feature()->loaderName()))); } else { game.withArgument("-EpicPortal"); From 72cfce0910362937d9b9d2f25a2b9be4ed7fe1ac Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Sun, 1 Oct 2023 17:14:51 -0500 Subject: [PATCH 4/5] GOG 'support' --- src/gamefalloutnv.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gamefalloutnv.cpp b/src/gamefalloutnv.cpp index 565a33a..7ddf316 100644 --- a/src/gamefalloutnv.cpp +++ b/src/gamefalloutnv.cpp @@ -55,8 +55,11 @@ void GameFalloutNV::setVariant(QString variant) void GameFalloutNV::checkVariants() { + QFileInfo gog_dll(m_GamePath + "\\Galaxy.dll"); QFileInfo epic_dll(m_GamePath + "\\EOSSDK-Win32-Shipping.dll"); - if (epic_dll.exists()) + if (gog_dll.exists()) + setVariant("GOG"); + else if (epic_dll.exists()) setVariant("Epic Games"); else setVariant("Steam"); @@ -248,7 +251,7 @@ QStringList GameFalloutNV::primaryPlugins() const QStringList GameFalloutNV::gameVariants() const { - return {"Steam", "Epic Games"}; + return {"Steam", "GOG", "Epic Games"}; } QString GameFalloutNV::gameShortName() const From d90aac56052bc99548d7e5038645bd7585a76858 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Mon, 2 Oct 2023 19:31:23 -0500 Subject: [PATCH 5/5] Filter the install directories to avoid grabbing a hidden directory --- src/gamefalloutnv.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gamefalloutnv.cpp b/src/gamefalloutnv.cpp index 7ddf316..247c087 100644 --- a/src/gamefalloutnv.cpp +++ b/src/gamefalloutnv.cpp @@ -87,7 +87,8 @@ QString GameFalloutNV::identifyGamePath() const result = parseEpicGamesLocation({"5daeb974a22a435988892319b3a4f476"}); if (QFileInfo(result).isDir()) { QDir startPath = QDir(result); - auto subDirs = startPath.entryList(QDir::Dirs | QDir::NoDotAndDotDot); + auto subDirs = startPath.entryList({"Fallout New Vegas*"}, + QDir::Dirs | QDir::NoDotAndDotDot); if (!subDirs.isEmpty()) result = subDirs.first(); } @@ -297,7 +298,6 @@ QDir GameFalloutNV::gameDirectory() const return QDir(m_GamePath); } -// Not to delete all the spaces... MappingType GameFalloutNV::mappings() const { MappingType result;