Retrieve a list of installed games from the Steam API

走远了吗. 提交于 2019-12-03 09:09:15

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!