This concerns the SteamAppList projects, but I thought it was more appropriate to file the issue here
For the longest time, I thought my games not appearing in the list when opening the application was because the database had to be updated (via your SteamAppList and SteamAppListDumps projects). Because updating the database of games often takes a couple of hours, I usually just used SamReloaded by typing in a game's appid whenever a game was missing on the list (great feature btw).
However, I think the problem is that the script to build the database actually just doesn't work properly.
Feel free to correct me (as my JavaScript-fu is pretty terrible), but from what I understand, the process for updating the game database is as follows:
- The existing list is checked out from git.
- Via the Steam API, a complete list of all known apps on Steam is fetched.
- That list is diffed versus the existing list. In other words, we don't want to query apps that are already in the existing list, only ones that aren't yet.
- Details for the remaining games are then fetched.
If this is correct, it doesn't work very well. There are two problematic cases:
- Sometimes, games receive achievements later in their lifecycle. Early Access games often don't have achievements yet, and 1.0 games sometimes get achievements in major updates as well. As a completely random example of the latter: Paradise Killer (appid 1160220) received achievements only several months after the initial release.
- Games often pop up in the list of apps from the Steam API that don't have achievements yet, most likely because the simply haven't been released yet. Completely random examples for this: Atomic Heart (appid 668580) for a game that had achievements on day 1 but does not appear in the list of games in SamReloaded, and Black Myth: Wukong (2358720) as an example of a game that isn't out yet.
What happens these cases is that the game gets added to the master list with the achievements field filled out as null.
Here's what the example games look like in the database dump I generated a few hours ago:
/// Paradise Killer
{"appid":1160220,"name":"Paradise Killer","type":"game","achievements":null}
/// Atomic Heart
{"appid":668580,"name":"Atomic Heart","type":"game","achievements":null}
/// Black Myth: Wukong
{"appid":2358720,"name":"Black Myth: Wukong","type":"game","achievements":null}
Obviously, if you query Steam right now, you get a much different answer:
Paradise Killer: https://store.steampowered.com/api/appdetails/?filters=basic,achievements&appids=1160220:
{
"1160220":{
"success":true,
"data":{
"type":"game",
"name":"Paradise Killer",
"steam_appid":1160220,
// Etc, etc...
"achievements":{
"total":39,
"highlighted":[
{
"name":"Scholar of the Pantheon",
"path":"https:\/\/cdn.akamai.steamstatic.com\/steamcommunity\/public\/images\/apps\/1160220\/23086a11a2e2b415fca83cd7b2b975fd706ac863.jpg"
},
// Etc, etc...
]
}
}
}
}
Atomic Heart: https://store.steampowered.com/api/appdetails/?filters=basic,achievements&appids=668580:
{
"668580":{
"success":true,
"data":{
"type":"game",
"name":"Atomic Heart",
"steam_appid":668580,
// Etc, etc,....
"achievements":{
"total":51,
"highlighted":[
{
"name":"The Motherland Does Not Forget its Heroes",
"path":"https:\/\/cdn.akamai.steamstatic.com\/steamcommunity\/public\/images\/apps\/668580\/fbf6ef189b6beb1e0828e3a4909e6a460543e64b.jpg"
},
// Etc, etc...
]
}
}
}
}
However, because these games were originally written into the app_list.json with "achievements: null", and because games are never queried again once they are written down into app_list.json, they will not appear in the list of games in SamRewritten, because they are never updated and shown as having achievements.
Black Myth: Wukong is a little different of course, since it currently doesn't list any achievements:
https://store.steampowered.com/api/appdetails/?filters=basic,achievements&appids=2358720:
{
"2358720":{
"success":true,
"data":{
"type":"game",
"name":"Black Myth: Wukong",
"steam_appid":2358720,
// No achievements to be found...
}
}
}
In this case, the absence of achievements is indeed correct. But that's just because the game hasn't been released yet. Odds are extremely high it will have achievements upon release. But again, this game will never be queried again, because it's already on the list.
If what I'm saying is correct, then the real question becomes, of course, what can be done about that? The easy solution would be NOT to write games with "achievements: null" into app_list.json so that they get queried again anew every time a Steam app dump is taken. Or you could change to logic to query games even if they have "achievements: null".
However, I think this is also pretty problematic. Let's do a quick search to see how many games Steam lists:
$ cat app_list.json | jq '[.applist.apps[] | select(.type=="game")] | length'
111222
Now how many of those do NOT have achievements?
$ cat app_list.json | jq '[.applist.apps[] | select(.type=="game") | select(.achievements==null)] | length'
63234
This means that you'd need to query over half of the entire list of Steam apps if you were to take a dump for the first time with the modification proposed above.
Now, of course, I'd imagine there would at least be several thousand games that would get filled up with the correct achievement count (examples Paradise Killer and Atomic Heart being among them), so next time you take the dump, the amount of games that would need to be queried would be less. But you'd still looking at several ten thousand games that don't have achievements and never will have any (and thus that will always be marked with "achievements: null") that you'd be querying each and every time you take an app list dump. In other words, this would dramatically increase the time it takes to perform a new dump.
So, the simple solution proposed above wouldn't be very practical I think, it may end up doubling or tripling the amount of time it takes to dump the entire database.
Any ideas? Did I get something wrong here?
This concerns the SteamAppList projects, but I thought it was more appropriate to file the issue here
For the longest time, I thought my games not appearing in the list when opening the application was because the database had to be updated (via your SteamAppList and SteamAppListDumps projects). Because updating the database of games often takes a couple of hours, I usually just used SamReloaded by typing in a game's appid whenever a game was missing on the list (great feature btw).
However, I think the problem is that the script to build the database actually just doesn't work properly.
Feel free to correct me (as my JavaScript-fu is pretty terrible), but from what I understand, the process for updating the game database is as follows:
If this is correct, it doesn't work very well. There are two problematic cases:
What happens these cases is that the game gets added to the master list with the
achievementsfield filled out asnull.Here's what the example games look like in the database dump I generated a few hours ago:
Obviously, if you query Steam right now, you get a much different answer:
Paradise Killer:
https://store.steampowered.com/api/appdetails/?filters=basic,achievements&appids=1160220:Atomic Heart:
https://store.steampowered.com/api/appdetails/?filters=basic,achievements&appids=668580:However, because these games were originally written into the
app_list.jsonwith"achievements: null", and because games are never queried again once they are written down intoapp_list.json, they will not appear in the list of games in SamRewritten, because they are never updated and shown as having achievements.Black Myth: Wukong is a little different of course, since it currently doesn't list any achievements:
https://store.steampowered.com/api/appdetails/?filters=basic,achievements&appids=2358720:In this case, the absence of achievements is indeed correct. But that's just because the game hasn't been released yet. Odds are extremely high it will have achievements upon release. But again, this game will never be queried again, because it's already on the list.
If what I'm saying is correct, then the real question becomes, of course, what can be done about that? The easy solution would be NOT to write games with
"achievements: null"intoapp_list.jsonso that they get queried again anew every time a Steam app dump is taken. Or you could change to logic to query games even if they have"achievements: null".However, I think this is also pretty problematic. Let's do a quick search to see how many games Steam lists:
Now how many of those do NOT have achievements?
This means that you'd need to query over half of the entire list of Steam apps if you were to take a dump for the first time with the modification proposed above.
Now, of course, I'd imagine there would at least be several thousand games that would get filled up with the correct achievement count (examples Paradise Killer and Atomic Heart being among them), so next time you take the dump, the amount of games that would need to be queried would be less. But you'd still looking at several ten thousand games that don't have achievements and never will have any (and thus that will always be marked with
"achievements: null") that you'd be querying each and every time you take an app list dump. In other words, this would dramatically increase the time it takes to perform a new dump.So, the simple solution proposed above wouldn't be very practical I think, it may end up doubling or tripling the amount of time it takes to dump the entire database.
Any ideas? Did I get something wrong here?