-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: changine - change engine to official, proton, ge-proton, luxtorpeda, etc #993
Conversation
Looks interesting, you should be able to get the app id of the currently launched game with the env variable SteamAppId. Also, there could be some issues with the picking part, since the versions of ge and such change so often, along with the different versions of proton that are created. I wonder if there's some way to get the list of compat tools, like protonup does? If not, maybe having a text field that people could enter instead of coding it in? |
Nice, thanks.
I'm looking into it. Some of them should always be the same: luxtorpeda, official, steamlinuxruntime, proton_8 and proton_experimental. So it's mostly GE-Proton and latest Proton stable that are changing. |
ProtonUpQt seems to get the compat tools in these parts: |
@d10sfan I've looked into getting a list of compat tools, both internal and external, and it is possible. I've tried to write the code but I'm a bit stuck so if you want to help out with coding this part feel free 😄 Here's what I've learned so far from researching this: The way to do it, and how ProtonUp-QT does it, is to read the information from Steam's VDF files (Valve Data Format). They are written in a hierarchical key-value format, some of them text-based and some binary, format: https://developer.valvesoftware.com/wiki/KeyValues. ProtonUp-QT uses these Python libraries to parse them: steampython and vdf:
There's also other parsers and libraries for other languages (at least two for Rust): The files we need to look at:
ProtonUp-QT gets installed apps (games and compat tools) from config.vdf using They get the compat tool name and other info, for Proton and other internal tools, from appinfo.vdf using parse_appinfo from steam.utils.appcache (since that VDF file is in binary) with this code For user installed tools they use compatibilitytool.vdf which is human readable so they use vdf.load with this code. |
Interesting, this parsing could be added to the client (it's built in rust). There's already some parsing of the libraries to get the app ids, done through a library. I'm not sure if there's a library already able to parse the compat tools. It's currently using this library to find steam games and where they are located: https://docs.rs/steamlocate/latest/steamlocate/ One thing that's interesting there, is it looks like they are able to parse what the current compat tool is: https://github.com/WilliamVenner/steamlocate-rs/blob/49826554e81fab76994ecbb843b3480173f611b5/src/steamcompat.rs#L33 So that may be a point towards figuring out how to parse the rest of the data. That library uses a package called https://docs.rs/crate/steamy-vdf/0.2.0, which can parse vdf files, so that may be a good direction. So that may be a good place to put this is in the client, and then able to use it from there, either passing the details into this script, or having it entirely in the client, haven't figured out the best option there yet. |
Yeah might make more sense to have this functionality inside the client instead of as an engine.
This might also be useful, it's for Rust VDF parsing: https://github.com/CosmicHorrorDev/vdf-rs
We can easily pass it into the script with setting $engine_choice variable from the client.
|
https://docs.rs/keyvalues-serde/latest/keyvalues_serde/ Another vdf parser |
Im thinking this could be done for non-native (launch with proton), with an extra config parameter to enable the proton choice feature. This would make the choice menu show all the time for all games, and add metadata for all the compat tools that make sense there, then those could call a canned engine, which could be basically what you have in the packages repo. |
Closing in favor of the client ticket (luxtorpeda-dev/luxtorpeda#236), would of course welcome some PRs for this repo if needed once we get there. |
I'm looking into if it's possible to change the steam play compat tool from Luxtorpeda. Like mentioned in luxtorpeda-dev/luxtorpeda#236
If it's possible then the user could switch from Luxtorpedas engines to outside compat tools (like Proton, GE-Proton, Linux Runtime or even native) from inside the Luxtorpeda menu.
It would also be possible to set Luxtorpeda as the default for all of Steam.
There are several things that needs more work and reasearch.
New Engine Package Submissions
Common Code Submissions