Detect which games are using Proton Anticheat Runtimes
DavidoTek opened this issue · 3 comments
Is your feature request related to a problem? Please describe.
See #186
Proton Anticheat Runtimes (e.g. Proton EasyAntiCheat Runtime
) are detected as compatibility tools.
Still, the ctinfo dialog does not display which games are using it.
Describe the solution you'd like
- Detect which games are used by a Proton Anticheat Runtime
- Display the games in the ctinfo dialog for a runtime
Describe alternatives you've considered
None, don't show which games are using a runtime.
Additional context
Where is the information what runtime a game is using stored?
Steam downloads the anti-cheat runtimes I believe when a game is configured to require it. It isn't used as a compatibility tool per se but the runtime is downloaded once and shared for apps that require it, kind of like the Steam Linux Runtime.
I had a look to see how Steam knows which games to download it for, and perhaps Steam "infers" it based on some configuration. I haven't found anywhere where Steam stores this. If we figure out how St
The AppID for the EasyAntiCheat runtime is 1826330
, battlEye is 1161040
. Other anti-cheats are configured to support Wine/Proton but I think these are the only two that have dedicated runtimes available in Steam.
Maybe if we can find this referenced/mapped in some Steam config/app config files we could figure out which games use which tool - probably we can just assume if an installed game is set to require X runtime, and that runtime is installed, we'll assume that runtime is in use by that game. The issue is figuring out how Steam knows that a game needs the anti-cheat runtime.
Also, on the subject of anti-cheat runtimes. currently ProtonUp-Qt can't uninstall them. The uninstall button is disabled when selecting them. Steam also has issues removing these tools (it also has issues removing Steam Linux Runtimes). However it can be uninstalled by removing the install folder in /path/to/steamapps/common/<runtime_folder>
and its associated appmanifest, and then restarting Steam if it was opened.
Perhaps we can also implement support for uninstalling these runtimes, if/when we can map how many games are using that runtime so we can display a warning.
Noted this on #186, but the tl;dr is:
- Information about which games are set to use a specific Proton anti-cheat runtime is set in
appinfo.vdf
under that app's AppID entry. It is stored atsteam_app['data']['appinfo']['extended']['additional_dependencies']
. - The structure of that is a dictionary of dictionaries which looks like this:
{'0': {'src_os': 'windows', 'dest_os': 'linux', 'appid': 1826330, 'comment': 'EAC runtime'}}
- The entry with the anti-cheat runtime may not be
0
, and additionally an application may have multiple anti-cheat runtimes (at time of writing, onlyProton EasyAntiCheat Runtime
andProton battlEye Runtime
are available), so we would need to loop through all entries inadditional_dependencies
(if it exists / if it is not blank) and check if theadditional_dependency['appid']
matches either the EasyAntiCheat or battlEye runtime - We would probably want to store this information somewhere, such as on each SteamApp object, and then for the runtime games list dialog, we could just filter by which Steam apps either have this AppID in their
additional_dependencies
(we could store this as a class variable), or we could store two booleans on each Steam App to noteuses_eac
, oruses_battleye
. But storing the entireadditional_dependencies
may be more versatile... or we could store a condensed version, such asadditional_dependencies = { 'eac: True, 'battlEye': False }
.
We know now where to find information about which games are using which Proton anticheat runtimes, though it says nothing about compatibility. A game may want to target this runtime but may not have support properly implemented, or it may break after an update. But, we can be sure any app that has the AppID 1826330
is targeting the Proton EasyAntiCheat Runtime, meaning it wants to use this runtime and that Steam will download it with the game, and also that this is specifically a game wanting to use EAC on Linux, since this AppID and the runtime it represents are only for Linux. The same applies for the battlEye rurntime, which has a different AppID.