PiersAS Posted September 11, 2020 Share Posted September 11, 2020 I am trying to get vortex to support Fallen Enchantress legendary heroes. Mods just involve copying files into the "C:\Users\<MyName>\Documents\My Games\legendaryheroes\Mods" directory. So I am following the instructions in Creating a game extension for Vortex I copied some of the code for nevewinter nights 2 The mod appears in the extensions list with no errors, but not in the Games/Unmanaged list so clearly I have messed up somewhere. Anyone spot my mistake? A lot of the documentation I found about the games page seems to be out of date. const Promise = require('bluebird'); const { app, remote } = require('electron'); const path = require('path'); const winapi = require('winapi-bindings'); const { fs, util } = require('vortex-api'); const appUni = app || remote.app; // Nexus Mods domain for the game. e.g. nexusmods.com/bloodstainedritualofthenight const GAME_ID = 'fallenenchantresslegendaryheroes'; //Steam Application ID, you can get this from https://steamdb.info/apps/ const STEAMAPP_ID = '228260'; //GOG Application ID, you can get this from https://www.gogdb.org/ const GOGAPP_ID = '1445591825'; function findGame() { try { const instPath = winapi.RegGetValue( 'HKEY_LOCAL_MACHINE', 'SOFTWARE\\WOW6432Node\\GOG.com\\Games\\' + GOGAPP_ID, 'PATH'); if (!instPath) { throw new Error('empty registry key'); } return Promise.resolve(instPath.value); } catch (err) { return util.GameStoreHelper.findByAppId([STEAMAPP_ID, GOGAPP_ID]) .then(game => game.gamePath); } } function modPath() { return path.join(appUni.getPath('documents'), 'My Games','legendaryheroes','Mods'); } function install(files) { return Promise.resolve({ instructions }); } function prepareForModding(discovery) { return fs.ensureDirWritableAsync(modPath(), () => Promise.resolve()); } function main(context) { context.registerGame({ id: GAME_ID, name: 'Fallen Enchantress: Legendary Heroes', mergeMods: true, queryPath: findGame, queryModPath: modPath, logo: 'gameart.jpg', executable: () => 'LegendaryHeroes.exe', requiredFiles: [ 'LegendaryHeroes.exe', ], setup: prepareForModding, environment: { SteamAPPId: STEAMAPP_ID, }, details: { steamAppId: STEAMAPP_ID, gogAppId: GOGAPP_ID, }, }); return true; } module.exports = { default: main }; { "name": "Game: Fallen Enchantress Legendary Heroes", "author": "Pickysaurus", "version": "0.0.1", "description": "Support for Elemental fallen enchantress legendary heroes" } Link to comment Share on other sites More sharing options...
Tannin42 Posted September 11, 2020 Share Posted September 11, 2020 The files you posted are ok, if I put them into the correct directory I get an additional entry in Games. No idea why you'd find it in extensions (which proves you have placed it correctly) but not in games Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.