r/gog•
Asholt

Steam Plugin Achievement % Fix for Galaxy

Galaxy 2.0

Since the Steam plugin has not been updated for quite a while and Galaxy has not been tracking Steam achievements for me since a month ago, I decided to look into the dev's github page. Apparently, people have already found fixes, but these are yet to be implemented.

If you're having the same issue as me, and do not want to wait until the update, here's the fix. All I've done is implemented the code in the pull requests. This should fix the achievements in addition to the plugin's timeout issue. It worked for me, my friends, and a couple of other internet users.

I don't take credit for any of the fixes. Credit goes to the respective github users.

The Timeout fix could interfere with other parts of the plugin. Please read here to understand what the issue is about. If you don't want risking it, refrain from modifying plugin.py.

Obviously, use it at own risk.

  • Download
  • Make sure you already have the latest Steam plugin (0.53, September 2020 release).
  • Press Windows+R, write 'appdata', press Enter.
  • Navigate to Local\GOG.com
  • Replace files from the downloaded fix in the folder
    • plugin.py to GOG.com\Galaxy\plugins\installed\steam_XXXXXXXXXXX
    • websocket_client.py GOG.com\Galaxy\plugins\installed\steam_XXXXXXXXXXX\protocol
    • Note: The steam_XXXXXXXXXXX folder may differ in name for you.
  • Restart Galaxy, sync integrations, wait a bit for the data to come in.
  • Note that games with an enormous number of achievements might still not work (1000+?).

If you don't trust downloading random files from the internet (which is fair), you can implement the changes yourself with a code editor based on the pull requests or read lower.

Achievement fix

Open websocket_client.py

Search for line 25

RECONNECT_INTERVAL_SECONDS = 20 

Create a new line 26 and add

MAX_INCOMING_MESSAGE_SIZE = 2**24

Search for line 181/182

self._websocket = await asyncio.wait_for(websockets.connect(server, ssl=self._ssl_context), 5)

Change it to

self._websocket = await asyncio.wait_for(websockets.connect(server, ssl=self._ssl_context, max_size=MAX_INCOMING_MESSAGE_SIZE), 5)

Timeout fix

Open plugin.py

Search for line 261

connection_timeout = 30

Change to

connection_timeout = 120

Edit: Thanks to u/xenonisbad for pointing out potential issues with the Timeout Fix. Further information and disclaimer added.

Posted Jan 4, 2021, 3:55 PM UTC · edited

8619
xenonisbad•

Somehow I am not affected by those problems, but I am happy people found some workarounds.

Btw. here there can be found explanation why timeout fix wasn't merged yet. I think everybody should be aware that this change can interfere with other issue.

5
AsholtOP•

Thanks for pointing it out. I actually forgot to include it in the post.

The fix has worked for my purposes, made my connection more stable (maybe differs on internet stability), but you're absolutely right, that it could interfere with other things. I'll edit the post immediately.

3
pyrrhotechnologies•

Why does galaxy not have an official, bug-free steam integration? This is absurd that they have one for epic but not one for the original and by far most popular pc launcher

3
Pab10Suarez•

sadly, because steam don't need it

3
AsholtOP•

The truth is that we don't know.

There probably needs to be an agreement between both parties, so having community integrations fills the gap until one can the achieved. Is there trouble with the API, does GOG desire deeper integration? Who knows.

At the moment maybe Valve isn't interested, maybe there aren't enough resources dedicated to implementing a non-community integration, or maybe they are working on one as we speak.

Epic Games seems like a more flexible partner (at least at a distance), so I guess they were keen to gain some good PR, more or less for free. Since Valve is the market leader in digital distribution, they may not see any need in assisting their competitors.

1
Jon_Irenicus90•

I personally think we will never see an official implementation and support from Valve for Steam. They are always completely hands off and why would they support their competitor. Steam plugins will have to work based on the efforts of the community forever. Steam won't do it.

1
Mano_East•

Thanks for the information and the fix!

2
-eschguy-•

Worked like a charm!

2
IchioArt•

Thanks for the fix :)

2
Kantrh•

Will it sync all previous achievements or just new ones earned after?

1
AsholtOP•

Since the data is stored through the Steam API, it will sync everything.

1
Kantrh•

Excellent. Thanks for making sharing the fix

3
AsholtOP•

No credit to me. Just informing about the fix until the future update.

3
[deleted]•

[deleted]

1
echosa:galaxy: GOG Galaxy Fan•

I made the two changes to websocket_client.py to fix the achievements, but I'm still seeing 0% achievements for The Binding of Isaac: Rebirth. I have 100% in Steam. I'm not sure if I did something wrong or if something else is not working properly.

1
AsholtOP•

Could you please confirm if the fix worked for your other games?

If yes, I can see that The Binding of Isaac: Rebirth has over 400 achievements, and the message size might still be undersized for that.

You could try changing line 26 to

MAX_INCOMING_MESSAGE_SIZE = 2**25

to double message size, or

MAX_INCOMING_MESSAGE_SIZE = 2**26

to quadruple it.

It seems though that some games still don't get fixed even with a huge message size (think someone tried 2**64), so keep that in mind.

1
echosa:galaxy: GOG Galaxy Fan•

Other Steam games do seem to show achievement percentages (though they don't always match what Steam shows). I've changed to 26 to quadruple the message size. After syncing integrations, I still get 0%. Not sure if I just haven't given it enough time or if it still isn't working. Either way, it's not a huge deal. Just saw your post about a fix and got excited that maybe I could get my Isaac achievements in GOG. I have to use Steam for the Workshop to get mods, anyway, so like I said, not a big deal. Thanks, though!

1
sqaull234•

Tried this fix and it worked until I checked my progress for the game; went back to 0%.

Will wait till GOG has an official fix.

1
Taur0n:galaxy: GOG Galaxy Fan•

For me the fix never worked :(

1
silphatos:Joystick: Game Collector•
1