Steam – way to add a game to a Category/Collection via the console

steam

So i've had 2 Portable 4TB HDDs (S: and T:) that i've been downloading all my games onto as a sort of backup, the idea is not fill them up so i have space for updates and new DLC, about ~500GB each. now these drives are nearing that level and while i can download 100% of my collection before then, if i get any new, more recently released games i might need a third hardrive.

now currently i know that if i remove one of my drives Steam will just indicate that the games are not installed so i was thinking of creating Categories/Collections for which drives they are installed, that way if i get more games and get a third drive (U:) and not have T: plugged in, i wont mistake a game that it already download and installed with one that isn't, but with a large collection of games i can't remember which is installed onto which.

i can script something outside of steam to look in the manifest files and see if they are installed on S: or T: but the tedious part is then putting them into the category/collection. then i remembered the console, i can auto-generate a console script i need to know what to generate and i've had no luck finding a definitive list of console commands ([i did find this but from 2016 and might not have the possible commands for Collections)

So is there a way to add a game to a Category/Collection via the console?

Best Answer

No, the Steam client console (and SteamCMD it's based on/built from) don't have that functionality.

Steam/steamapps/libraryfolders.vdf (inside the Steam installation folder) will have the Steam Library Folders listed and makes it possible to easily find your non-default steamapps folders programmatically no matter where they are without using hard-coded paths (so, a more friendly script is possible).

The appmanifest files, that you already know about, will be in the steamapps folder of the directories listed in libraryfolders.vdf. 0 is considered the default folder in Steam/steamapps and so extra folders in libraryfolders.vdf will start at "1".

.VDF files can be text-based, like sharedconfig and most other config files, or binary. The binary format isn't worth trying to explain without using code, but the text format is like a crappy version of JSON where everything is just in "object" notation, no [lists] and 2x tabs (\t\t) separate key and value:

"object_key"
{
  "property"\t\t"value"
  "a"\t\t"0"
  "B"\t\t"true"
  "8675309"\t\t"numbersCanBeKeysToo"
}

From there, I'm guessing you know what to do. While you're doing all this it wouldn't be a bad idea to create a backup system for your sharedconfig.vdf file as it can be destroyed seemingly "randomly".

If you need some code inspiration the original Depressurizer (in C#) is no longer maintained, but has the basis of everything needed, and there's similar code in Java, JS, Python, and etc other languages on GitHub.

I was working on (badly) documenting all the possible Steam client options and their values at Steam-Data, and a library based on using that and data scraped from the web to modify the Steam client settings. My PC died though and the project has not been maintained though I tried to get Steam to install on a CI to continue the work. The settings library is at node-steam-config with another attempt at SteamConfig if you're interested in that code at all, but note that it's likely very broken as it's been almost 2 years.