Over the weekend, I had some PC issues. Seems the cable to my major storage drive (Steam, TV Eps etc) was dying, or maybe it was the SATA port, either are likely culprits. This was causing write errors to the drive and also cause the drive to randomly just disappear from Windows being able to see it.
Due to this, Steam decided to completely bork itself in a way I have not yet seen before. I was forced to delete ALL files in the Steam directory except for \steamapps\ and steam.exe. On running Steam, it nicely downloaded itself again in a working form. Hurrah!
One critical thing was missing.
All the categories for Steam games that I had toiled with over time to create and organise. That wasn’t enjoyable. So do I now spend hours fixing this up, only for it to potentially happen again? Not on your life. I was willing to leave and forget.
But with a kick up the pants from reptilescorpio from Twitter, I start toiling away for hours attempting to find where Steam stores all this glorious information inside its configuration files. Now I thought Steam would have this data at least somewhat encrypted and/or obscured from users, so wasn’t at all hopeful of being able to access it, which I think is partly true, but I certainly found files deep in its innards that I was able to edit and then a category was magically changed inside Steam on a restart. Promise!
Next was to write some simple code to take these files and read them so that I can interpret them in a much easier to read fashion than the config files would allow (as most of them consist of one massive long string of text if viewed in say Notepad). This was done using C# and WPF (Framework 4 for those interested) and pretty soon I had the following little application up and running.
As you can see from the above screenshot, I have a fair bit of information already loaded and sorted. From left to right in the listboxes we have: Full list of Steam applications and their id numbers, partial list of my games/apps, all category names detected from list of my games/apps and lastly a log of errors. Mostly the errors are due to mismatching appid’s from my list of games that I need to sort out.
List 1 is fairly huge, I think it is close to 3000 entries. The data for this is stored in a ~3mb text file, which to process to read of takes quite some time. So to save myself some time, once I have processed it, I can save it the XML and reload that file as needed unless there is something else I need to recover from massive text file. Which I will need to do soon as I spy things like icon paths for each app, steam store URLs and the like in there. It also might help me weed out things like dedicated servers and other extraneous data from list 1 which really aren’t required for this application.
Anyway, that is where we are at, plus a few additions that I won’t go into yet. The main reason for writing this up is just so I can keep motivated to actually finish this sucker off. I have a terribly bad habit of doing the hard yards on a personal little project and then just putting it away never to see the light of day again.