RandomHero13 Posted October 4, 2023 Share Posted October 4, 2023 Hi how do i get this to be for example "C:\Users\<username>\AppData\Roaming\<gamename>\system\mods"? i can enter the path manually but then it will only work for me. i tried queryModPath: () => '%AppData%\\gamename\\system\\mods' but that didnt work either Link to comment Share on other sites More sharing options...
Solution Pickysaurus Posted October 4, 2023 Solution Share Posted October 4, 2023 You can use a Vortex utility function to get that path dynamically. import { util } from 'vortex-api' // TypeScript version const { util } = requires('vortex-api') // JavaScript version const docPath = path.join(util.getVortexPath('localAppData'), 'Starfield'); // Results in "C:\Users\<username>\AppData\Roaming\Starfield" Example from Starfield: https://github.com/Nexus-Mods/game-starfield/blob/master/src/util.ts#L64 Link to comment Share on other sites More sharing options...
RandomHero13 Posted October 4, 2023 Author Share Posted October 4, 2023 thank you, your answer pointed me in the right direction. localAppData returns appdata/localappData (that lowercase "a" really cost me time there) returns appdata/roaming and it took me also awhile to spot the s at the end of requires ;) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now