Skip to content
forked from imLinguin/comet

Open Source implementation of GOG Galaxy Communication Service for SDK bundled with GOG games.

License

Notifications You must be signed in to change notification settings

purplebar0/comet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comet

Open Source implementation of GOG Galaxy's Communication Service

This project aims to implement calls made by game through SDK.
Note: that means it can't and won't replace Communication Service in official client

This will provide minimal and platform agnostic SDK. For use in game launchers like Heroic or Lutris

Project is continuation of Yepoleb's work https://gitlab.com/Yepoleb/comet/ but in Python

Supported Requests

Excluding Overlay, and Cloud Sync related.

  • AUTH_INFO_REQUEST
  • GET_USER_STATS_REQUEST
  • SUBSCRIBE_TOPIC_REQUEST
  • UPDATE_USER_STAT_REQUEST
  • DELETE_USER_STATS_REQUEST
  • GET_GLOBAL_STATS_REQUEST
  • GET_USER_ACHIEVEMENTS_REQUEST
  • UNLOCK_USER_ACHIEVEMENT_REQUEST
  • CLEAR_USER_ACHIEVEMENT_REQUEST
  • DELETE_USER_ACHIEVEMENTS_REQUEST
  • GET_LEADERBOARDS_REQUEST
  • GET_LEADERBOARD_ENTRIES_GLOBAL_REQUEST
  • GET_LEADERBOARD_ENTRIES_AROUND_USER_REQUEST
  • GET_LEADERBOARD_ENTRIES_FOR_USERS_REQUEST
  • SET_LEADERBOARD_SCORE_REQUEST
  • AUTH_STATE_CHANGE_NOTIFICATION
  • GET_LEADERBOARDS_BY_KEY_REQUEST
  • CREATE_LEADERBOARD_REQUEST
  • GET_USER_TIME_PLAYED_REQUEST
  • SHARE_FILE_REQUEST
  • START_GAME_SESSION_REQUEST
  • OVERLAY_STATE_CHANGE_NOTIFICATION
  • CONFIGURE_ENVIRONMENT_REQUEST

Experimental support

Following requests are supported experimentally (they haven't been tested well)

  • UPDATE_USER_STAT_REQUEST - no testing
  • UNLOCK_USER_ACHIEVEMENT_REQUEST - able to avoid unlocking the achievement again (unsure about response status code)

How to use

Currently service supports small amount of calls, but these are enough to play Gwent for example.

Dependencies

Currently the only dependency is python protocolbuffers and aiohttp

pip install -r requirements.txt

Alternatively you can install it using your Linux distro's package manager

Authentication

First, you need to obtain data about account access_token, refresh_token and user_id

(for Heroic these can be found in $HOME/.config/heroic/gog_store/auth.json)

Log in to GOG within the launcher. Make sure to launch it before running Comet to ensure the credentials are refreshed.

Via gogdl (CLI)

If GOG authentication has never been performed in Heroic on the current user, create the expected directory:

mkdir -p $HOME/.config/heroic/gog_store/auth.json

Then, run the command:

./bin/gogdl --auth-config-path $HOME/.config/heroic/gog_store/auth.json auth --code <code>

Obtain the code by logging in using this URL, then copying the code value from the resulting URL:

https://login.gog.com/auth?client_id=46899977096215655&layout=galaxy&redirect_uri=https%3A%2F%2Fembed.gog.com%2Fon_login_success%3Forigin%3Dclient&response_type=code

Running

./bin/comet --token "<access_token>" --refresh_token "<refresh_token>" --user-id <user_id>

Or if you are using Heroic/gogdl

./bin/comet --from-heroic

Contributing

Join Heroic Discord and reach out to us on special thread

Here you can find a blog post about setting up environment for tracing the Communication Service calls (involving Proxifier and custom mitmproxy)

Reverse engineered protobuf definitions are available here: https://github.com/Yepoleb/gog_protocols

About

Open Source implementation of GOG Galaxy Communication Service for SDK bundled with GOG games.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Shell 0.2%