sonic2kk / steamtinkerlaunch

Linux wrapper tool for use with the Steam client for custom launch options and 3rd party programs
GNU General Public License v3.0
2.16k stars 73 forks source link

autoconfiguring Vortex game paths #475

Closed frostworx closed 2 years ago

frostworx commented 2 years ago

As reported on reddit the function setupGameVortex is not even used at all. Need to find out why :)

frostworx commented 2 years ago

The required Vortex configuration settings are done in the function setGameVortexStaging:

setVortSet "settings.mods.installPath.$NEXUSGAMEID=true"
setVortSet "settings.mods.installPath.$NEXUSGAMEID=\\\"$GAMESTAGINGWINFOLDER\\\""
setVortSet "settings.mods.activator.$NEXUSGAMEID=\\\"hardlink_activator\\\""

which is the reason, why setupGameVortex is no longer used. I guess I left the function in the code, in case the commented vortex configs are required one day.

dermalikmann commented 2 years ago

I think that my post on reddit was a bit confusig and I am sorry for that.

The problem with settings.mods.installPath.$NEXUSGAMEID=\\\"$GAMESTAGINGWINFOLDER\\\ ist, that it is not actually the directory of the game installation, but the directory where Vortex places the mods. So the mods get """installed""" there. After that, Vortex """enables""" these mods through one of two ways, which can defined by settings.mods.activator.$NEXUSGAMEID=\\\"hardlink_activator\\\"

The actual GAME installtion path (so where the game binaries are) is set thourgh settings.gameMode.discovered.<GAME>.path

I hope i could clarify things

frostworx commented 2 years ago

In fact it is still confusing for me. I know that settings.mods.installPath is the Vortex mod path aka "staging path" and setGameVortexStaging exactly configures it as such. As mentioned in reddit, I think the other vortex configurations are not required and therefore were commented out in the no longer used function setupGameVortex. The game paths are determined in setModGameSyms, which seems to still work fine (might not find all installed games, iirc most tests were done by me and I do not really mod much).

Please elaborate on what exactly is missing and/or of course you're invited to play around with re-adding settings.gameMode.discovered.<GAME>.path and contribute any improvements :)

frostworx commented 2 years ago

I just re-tested from scratch (renamed my complete "productive" ~/.config/steamtinkerlaunch/ and removed /dev/shm/steamtinkerlaunch) and think I understand what you mean: only the installed Bethesda games and a few others (The Witcher, Torchlight II) were marked as found in Vortex (=colored picture) although several more installed Vortex compatible games were found by steamtinkerlaunch (check ~/.config/steamtinkerlaunch/vortex/compatdata/seenvortexgames.txt)

Probably should be easy to fix but it still might take some time, because I do not work on steamtinkerlaunch very much in the upcoming months (nature is calling :)) Of course PRs are still welcome :D

dermalikmann commented 2 years ago

Ah, ok. I only tried it with Subnautica, therefor I couldn't tel that it is working for other games. I will try again with Witcher and Skyrim and maybe I can bodge a PR together :D Don't stress yourself, as there is a very simple Workaround: Just select the path yourself in Z: 😂

frostworx commented 2 years ago

fyi: I already started to debug this. Seems like Vortex upstream changed multiple things under the hood again. f.e. there is a settings.gameMode.discovered.$NEXUSGAMEID.environment.SteamAPPId configuration entry now which might come in handy. unfortunately there is something wrong or weird in programmatically filling some paths. no idea yet when or if this will get an update.

edit: the Vortex internal format handling of settings.gameMode.discovered.$NEXUSGAMEID.path is different to all other paths - f.e. to settings.mods.installPath.$NEXUSGAMEID so it might be impossible atm to write the discovered paths programmatically atm(?). could be an upstream bug.

frostworx commented 2 years ago

Faster than expected. This commit works fine for me :)

frostworx commented 2 years ago

ping

dermalikmann commented 2 years ago

Whoah boy. Didn't expected it to be that fast, so I did not check here :D I will check this tonight and will let you know if it works for me :)

frostworx commented 2 years ago

Thanks for the reply! No hurry, I'm afk for ~ the next two weeks \o/

frostworx commented 2 years ago

ping