PaulCombal / SamRewritten

Steam Achievement Manager For Linux. Rewritten in C++.
GNU General Public License v3.0
341 stars 32 forks source link

Game detection doesn't work #6

Closed Xinayder closed 4 years ago

Xinayder commented 5 years ago

I have a Steam library with 111 games and this rewrite of SAM doesn't detect them all. Not even ones that have stats or achievements, such as Half-Life 2, HL2: EP1 (it only detected EP2), Half:Life 2 Deathmatch and PID.

PaulCombal commented 5 years ago

I'm aware of this issue.. Unfortunately I did not find a way to retrieve all the owned games for the currently logged in user.

For now, it's using cached data, so make sure to open Steam, and click on the game you want to edit before launching SAM. Or just play a bit with steam beforehand so it generates a lot of cache.

I know this is an issue and it has to be fixed, but for now, I have no idea how to get the complete game list without having the user to authenticate. If anyone has an idea please let me know.

I'll let this issue open as it still requires attention.

Thank you for the feedback!

zkiroel commented 5 years ago

hey folks! arch user here just emulated activity for 'spring cleaning event' so, I was SAM Endless Space II which was not in the SAMs gamelist, fixed that crap with visiting Library > game > Support page > 'I want to permanently remove this game from my account' > then just going back to Library and launch SAM with ./launch.sh now SAM have the game in gamelist

to author: thank you, good man <3

wgpierce commented 5 years ago

The original SAM downloads a list of all games (from SAM's author's website), and then queries steam whether the user owns the game for each and every game via IsSubscribedApp. It didn't seem to require login, so we should do something like that.

thymikon, are you saying an app you unsubscribed from is still showing up in SamRewritten when it shouldn't? I think that behavior may be preferable since it still counts towards achievement percentage. Check "Rule # 4: The Uninstall & Deactivation Rule" on How Average Game Completion Rate is Calculated

zkiroel commented 5 years ago

not sure that understand correct about unsubscribed app. my case is Endless space 2 game which I have in my account and this game is for platforms windows and mac os x. right now I use linux, so I wrote about how I emul activity from archlinux with linuxSAM for steam spring cleanup event.

oh I got it. no the app that I was unsubscribe is not availible from SAM. just few day ago I was remove left 2 dead from account and now it not availible in SAM, I saw it but cant 'SAM' it

best regards

wgpierce commented 5 years ago

@thymikon oh ok so it's the inverse problem. Does the game show up on Windows SAM? If it does, then it's probably the same caching issue as RockyTV described. If it doesn't show up on Windows SAM, then that would be strange.

PaulCombal commented 5 years ago

@wgpierce Afaik, when a user clicks on a game on his library list, it creates a cache file with an appid. This appid is what is used by sam. If a user removes an app from his library, maybe the cache file is still there so it will be picked up by sam, even though it should not. When I will have time I'll try to see how gibbed's SAM retrieves the owned apps.

@thymikon For the steam event, I added the -a argument to idle a game in command line. It worked for me. More info on the readme

wgpierce commented 5 years ago

@PaulCombal the original SAM downloads a list of all games (from SAM's author's website), and then queries whether each game is owned via the Steam API isSubscribedApp: link It didn't seem to require login, so we should do something like that.

I just wonder if that API picks up on free games or unsubscribed games which still count towards your achievement percentage like this API does: https://partner.steamgames.com/doc/webapi/IPlayerService#GetOwnedGames This app uses that GetOwnedGames API and seems to pick up on the free and unsubscribed games: https://github.com/seiyria/steam-avg-pct-cli . I think it requires an API key now, but it didn't seem to need to a while ago when I used it.

I think the intended behavior should ultimately be that it picks up on all games that contribute/can contribute to achievement percentage, do you agree Paul?

PaulCombal commented 5 years ago

I think going gibbed's way would not be a bad option, but digging a little bit further I found a few function signatures in OpenSteamworks that can be interesting to look at : Here

Some guy managed to do so 10 years ago on this thread (the Voided guy in the middle of the page), do you believe investigating on this is something worth doing?

wgpierce commented 5 years ago

There are two issues here. The first is RockyTV's issue with the caching, which is a known problem and is not too hard to fix. The second is thymikon's issue of actually picking up on unsubscribed apps or not. I'm filing a separate issue for the latter for us to investigate.

wgpierce commented 4 years ago

@RockyTV @thymikon issue should be fixed with latest master, please reopen if this is not the case. We now query the steam client to know whether an app is owned or not, for each and every app. We also implemented logic so that doing so doesn't slow down the GUI while loading. Currently, the "app is owned" algorithm also picks up apps that are not games, which is unfortunate but better than having this bug.