Obsidian Game Search 0.2.0: Steam Sync

I'm still using Obsidian and I'm still using that "Good Reads for Games" plugin I wrote about a bit ago.

Since then I've built a nice gaming PC for myself and lot of my gaming has been more split between more platforms (previously I was almost exclusively playing switch games with the occasional PS4 title). I of course also became a much heavier Steam user which has a fantastic Wishlist feature that most people use pretty frequently.

This presented a new redundancy problem for me – I was hearing about games and adding them to my Steam Wishlist....well then I'd have to remember to add them to my backlog in my Obsidian Vault. THEN when I got a notification that a game on my Wishlist was on sale I had to remember to move my vault file from my internal "wishlist" to "owned backlog" upon purchase. This was super annoying and no doubt games get lost in the shuffle.

So I set out to add Steam integration to my Game Search Plugin. And I did! Introducing 0.2.0 of Game Search, live now.

While the new feature does require you to get a Steam API key and do a few more set up steps, it has at the very least solved my problem of having two sets of "backlogs" to maintain. (One easy thing to miss is that your Wishlist on Steam must be set to Public to be queryable!)

After entering your Steam credentials in the plugin settings you can invoke Sync Steam as a command. It's important to note that this can take some time, especially for larger libraries, since the plugin has to iterate over each game in your Steam Library and Wishlist and try to match it with a game in your vault OR from the RAWG API, then either create a new file (requiring another RAWG Api call) or update the matched one with the proper metadata.

By default all the Steam Sync actually does is ensure that there is a file for all the games in your Library and Wishlist and that they have a steamId metadata property.

In the Settings for the Game Search Plugin there are two text fields, metadata for owned Steam games and metadata for wishlisted Steam games. Use these fields to inject metadata key/value pairs into wishlist and library games upon sync.

For example, my metadata for owned Steam games looks like this:

owned: true
owned_platform: steam

And my metadata for wishlisted Steam games looks like this:

owned: false
status: backlog

So now I can differentiate between wishlisted and owned games through the metadata of the game files!

Right now the injected metadata for Steam games does not support templating or any kind of variable injecting and instead relies on hard-coded values like the above examples but I could see adding on some kind of templating feature in the future if it's requested enough.

This was all I needed to solve my problem! Hopefully it helps others, though while it is working on my machine please feel free to open an issue on Github for any bugs or feature requests!

One more thing...

There is another thing that's been bothering me about my Game Search plugin.

There is a feature buried in the Settings page to Regenerate all of your game files based on your Template file. The idea behind this is that you might change how you want your files to be generated but you already have many many files built on an old template.

Until now, using this feature would completely regenerate your notes so you would lose any and all non-templated content to the process.

This bothered me as a fan of "keepsake" games – I actually do take notes in some of these game files to remember tasks or secrets, or of course to solve puzzles. Regenerating all the files to a template would lose all of my important, actual game notes.

So now the Regenerate button works differently – the only portion of your existing game files that is regenerated is the metadata, the rest is left alone. I have a hunch this fits better with how folks use the plugin but I'm eager to hear if I'm way off base.

One important piece to this is that while the previous metadata for a file gets blown away during Regeneration, steamId and any custom metadata provided via metadata for owned Steam games or metadata for wishlisted Steam games will be copied over to the newly regenerated metadata for preservation.