Similar to How do I find the ID for a game on Steam? but this is about non-steam games (shortcuts).
I'm trying to figure out what to name my custom artwork for non-steam games to get steam to recognize them.
- I know they go in this folder: steam/userdata/
<userid>
/config/grid - I know there are three:
<id>
_logo.png,<id>
_hero.jpg,<id>
p.jpg,
I know I can look in localconfig.vdf to find the <userid>
value, but I don't know how to find the <id>
value.
By adding custom art through the steam client, I see the correct value is 2853772086
. However, I want to do this programmatically. How do I compute this value?
That doesn't match the index 14
nor the appid -1441195210
(signed or unsigned) in the shortcuts.vdf:
'14': {'AllowDesktopConfig': 1,
'AllowOverlay': 1,
'Devkit': 0,
'DevkitGameID': '',
'IsHidden': 0,
'LastPlayTime': 0,
'LaunchOptions': '',
'ShortcutPath': '',
'StartDir': 'c:\\libraries\\itch\\baba',
'appid': -1441195210,
'appname': 'Baba Is You',
'exe': 'c:\\libraries\\itch\\baba\\Baba Is You\\Baba Is You.exe',
'icon': 'c:\\libraries\\itch\\baba\\Baba Is You\\Baba Is You.exe',
'openvr': 0,
'tags': {'0': 'steamsync'}},
The game's appid on steam 736260
so (unsurprisingly) it's not related to that either.
Best Answer
Steam uses two different ids used to load art for non-steam shortcuts.
You can ignore the Big Picture specific logic and set the icon as your desired Big Picture art but that icon will also be used in Steam desktop client.
Steam Desktop
steamgrid figured out how to get a normal shortcut id. They describe the solution as "
crc32(exe + appname) + "02000000"
, using IEEE standard polynomials" and usingexe
andappname
from shortcuts.vdf.For some reason, steamgrid refers it as the LegacyID, but this is the format for art for steam's redesigned client. This id seems to be unrelated to the desktop shortcut id (which is also used in screenshots.vdf) and unrelated to images in Big Picture mode (which uses the
icon
field in shortcuts.vdf).UWPHook as a C# implementation to find the id and separate code for the paths.
Big Picture
scottrice/Ice steamgrid figured out how to get a Big Picture shortcut id. They explain:
The implementation looks roughly like this (requires pycrc):
See the original for more details/comments.
You can see that this is very similar to the normal shortcut id except it has some extra lower bits.
Bringing it Together
We can put it all together to get the locations for all the art like so:
Here's a complete python implementation.