diff --git a/game-conanexiles/index.js b/game-conanexiles/index.js index d38a3712..abbf1dfe 100644 --- a/game-conanexiles/index.js +++ b/game-conanexiles/index.js @@ -4,6 +4,7 @@ const { fs, selectors, util } = require('vortex-api'); const GAME_ID = 'conanexiles'; const STEAMAPP_ID = 440900; +const EPICAPP_ID = ''; const STOP_PATTERNS = ['[^/]*\\.pak$']; function toWordExp(input) { @@ -11,7 +12,7 @@ function toWordExp(input) { } function queryPath() { - return util.GameStoreHelper.findByAppId([STEAMAPP_ID.toString()]) + return util.GameStoreHelper.findByAppId([STEAMAPP_ID.toString(), EPICAPP_ID]) .then(game => game.gamePath); } @@ -50,6 +51,20 @@ async function writeLoadOrder(api, order) { } } +async function requiresLauncher(gamePath, store) { + + const epicSettings = { + launcher: 'epic', + addInfo: { + appId: EPIC_ID, + } + }; + + //if (store === 'epic') return epicSettings; + //else return undefined; + return undefined; +} + function main(context) { context.registerGame({ id: GAME_ID, @@ -58,17 +73,31 @@ function main(context) { mergeMods: true, queryPath, queryModPath, - executable: () => path.join('ConanSandbox', 'Binaries', 'Win64', 'ConanSandbox.exe'), - requiredFiles: ['ConanSandbox.exe'], + requiresLauncher, + //executable: () => 'ConanSandbox.exe', + executable: (discoveredPath) => { + try { + const epicPath = path.join('ConanSandboxEgs.exe'); + fs.statSync(path.join(discoveredPath, epicPath)); + return epicPath; + } + catch (err) { + return path.join('ConanSandbox.exe'); + } + }, + requiredFiles: ['ConanSandbox'], setup, environment: { SteamAPPId: STEAMAPP_ID.toString(), + EpicAPPId: EPICAPP_ID }, details: { steamAppId: STEAMAPP_ID, + epicAppId: EPICAPP_ID, stopPattern: STOP_PATTERNS.map(toWordExp), hashFiles: [ 'ConanSandbox.exe', + //'ConanSandboxEgs.exe', 'Manifest_UFSFiles_Win64.txt', 'ConanSandbox/AssetRegistry.bin' ] @@ -93,4 +122,3 @@ function main(context) { module.exports = { default: main }; - diff --git a/game-conanexiles/info.json b/game-conanexiles/info.json index 28fcb39c..cc4c4b3c 100644 --- a/game-conanexiles/info.json +++ b/game-conanexiles/info.json @@ -1,6 +1,6 @@ { "name": "Game: Conan Exiles", "author": "Black Tree Gaming Ltd.", - "version": "1.0.0", + "version": "1.1.0", "description": "Support for Conan Exiles" -} \ No newline at end of file +} diff --git a/game-fallout4/index.js b/game-fallout4/index.js index 1fc69046..ba8fdf7b 100644 --- a/game-fallout4/index.js +++ b/game-fallout4/index.js @@ -13,6 +13,7 @@ const IGNORED_FILES = [ path.join('**', 'PersistantSubgraphInfoAndOffsetData.txt const MS_ID = 'BethesdaSoftworks.Fallout4-PC'; const GOG_ID = '1998527297'; const EPIC_ID = '61d52ce4d09d41e48800c22784d13ae8'; +const STEAM_ID = '377160'; let tools = [ { @@ -58,18 +59,40 @@ let tools = [ } ]; -function requiresLauncher(gamePath) { - return util.GameStoreHelper.findByAppId([MS_ID], 'xbox') - .then(() => Promise.resolve({ - launcher: 'xbox', - addInfo: { - appId: MS_ID, - parameters: [ - { appExecName: 'Game' }, - ], - } - })) - .catch(err => Promise.resolve(undefined)); +async function requiresLauncher(gamePath, store) { + const xboxSettings = { + launcher: 'xbox', + addInfo: { + appId: MS_ID, + parameters: [ + { appExecName: 'Game' }, + ], + } + }; + + const epicSettings = { + launcher: 'epic', + addInfo: { + appId: EPIC_ID, + } + }; + + if (store !== undefined) { + if (store === 'xbox') return xboxSettings; + if (store === 'epic') return epicSettings; + else return undefined; + } + + // Store type isn't detected. Try and match the Xbox path. + try { + const game = await util.GameStoreHelper.findByAppId([MS_ID], 'xbox'); + const normalizeFunc = await util.getNormalizeFunc(gamePath); + if (normalizeFunc(game.gamePath) === normalizeFunc(gamePath)) return xboxSettings; + else return undefined; + } + catch(err) { + return undefined; + } } function main(context) { @@ -93,11 +116,16 @@ function main(context) { ], requiresLauncher, environment: { - SteamAPPId: '377160', + SteamAPPId: STEAM_ID, + GogAPPId: GOG_ID, + XboxAPPId: MS_ID, + EpicAPPId: EPIC_ID, }, details: { - steamAppId: 377160, + steamAppId: STEAM_ID, gogAppId: GOG_ID, + xboxAppId: MS_ID, + epicAppId: EPIC_ID, ignoreConflicts: IGNORED_FILES, compatibleDownloads: ['fallout4london'], hashFiles: [ diff --git a/game-fallout4/info.json b/game-fallout4/info.json index 84e2029f..f1744637 100644 --- a/game-fallout4/info.json +++ b/game-fallout4/info.json @@ -1,6 +1,6 @@ { "name": "Game: Fallout 4", "author": "Black Tree Gaming Ltd.", - "version": "1.0.6", + "version": "1.0.7", "description": "Support for Fallout 4" } diff --git a/game-skyrimse/index.js b/game-skyrimse/index.js index cf6e7bf3..4bdeb1f7 100644 --- a/game-skyrimse/index.js +++ b/game-skyrimse/index.js @@ -6,6 +6,7 @@ const GAME_ID = 'skyrimse'; const GOG_ID = '1711230643'; const MS_ID = 'BethesdaSoftworks.SkyrimSE-PC'; const EPIC_ID = 'ac82db5035584c7f8a2c548d98c86b2c'; +const STEAM_ID = '489830'; const tools = [ { @@ -83,11 +84,22 @@ function requiresLauncher(gamePath, store) { } }; + const epicSettings = { + launcher: 'epic', + addInfo: { + appId: EPIC_ID, + } + }; + if (store !== undefined) { // early out if the app gave us the storeid if (store === 'xbox') { return Promise.resolve(xboxSettings); - } else { + } + if (store === 'epic') { + return Promise.resolve(epicSettings); + } + else { return Promise.resolve(undefined); } } @@ -159,10 +171,16 @@ function main(context) { requiresLauncher, getGameVersion: (gamePath, exePath) => getGameVersion(context.api, gamePath, exePath), environment: { - SteamAPPId: '489830', + SteamAPPId: STEAM_ID, + GogAPPId: GOG_ID, + XboxAPPId: MS_ID, + EpicAPPId: EPIC_ID, }, details: { - steamAppId: 489830, + steamAppId: STEAM_ID, + gogAppId: GOG_ID, + xboxAppId: MS_ID, + epicAppId: EPIC_ID, nexusPageId: 'skyrimspecialedition', hashFiles: [ 'appxmanifest.xml', diff --git a/game-skyrimse/info.json b/game-skyrimse/info.json index 5433557c..c31fe4a5 100644 --- a/game-skyrimse/info.json +++ b/game-skyrimse/info.json @@ -1,6 +1,6 @@ { "name": "Game: Skyrim: Special Edition", "author": "Black Tree Gaming Ltd.", - "version": "1.0.5", + "version": "1.0.6", "description": "Support for The Elder Scrolls V: Skyrim Special Edition" -} \ No newline at end of file +}