Retrieve a list of installed games from the Steam API

前端 未结 2 1833
隐瞒了意图╮
隐瞒了意图╮ 2020-12-30 15:30

I\'m working on a Steam Roulette program, and I\'m trying to create filters. One of the filters I\'d like to implement is (if the user data was loaded with SteamWorks), is t

相关标签:
2条回答
  • 2020-12-30 16:05

    I was looking into doing this myself. Unfortunately the steam api does not return a value that could reliably tell you if it's installed on your pc. However looking through the folder where your games are installed (mine is "C:\Program Files (x86)\Steam\steamapps\common") I found that each game folder contains a text file with it's steam app id. So you could recursively look in each folder and build a list of IDs first. Then, use the app ID list with the JSON getOwnedGames for the full name and other info.

    0 讨论(0)
  • 2020-12-30 16:06

    This file C:\Program Files (x86)\Steam\steamapps\libraryfolders.vdf

    Contains the paths to all local steam libraries. (excluding the one in the default library)

    Then get just get the value in the steam_appid.txt that's located in each game's folder ({library}\steamapps\common\{game}\steam_appid.txt) and you will have a list of all installed games' steam app id.

    0 讨论(0)
提交回复
热议问题