Skip to content

Latest commit

 

History

History
195 lines (136 loc) · 6.06 KB

README.md

File metadata and controls

195 lines (136 loc) · 6.06 KB

Comet

Build nightly Version Static Badge

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 now in Rust

Supported Requests

Game

  • LIBRARY_INFO_REQUEST
  • AUTH_INFO_REQUEST
  • GET_USER_STATS_REQUEST
  • SUBSCRIBE_TOPIC_REQUEST
  • UPDATE_USER_STAT_REQUEST
  • DELETE_USER_STATS_REQUEST
  • GET_USER_ACHIEVEMENTS_REQUEST
  • UNLOCK_USER_ACHIEVEMENT_REQUEST
  • CLEAR_USER_ACHIEVEMENT_REQUEST
  • DELETE_USER_ACHIEVEMENTS_REQUEST
  • GET_LEADERBOARDS_REQUEST
  • GET_LEADERBOARDS_BY_KEY_REQUEST
  • GET_LEADERBOARD_ENTRIES_GLOBAL_REQUEST
  • GET_LEADERBOARD_ENTRIES_AROUND_USER_REQUEST
  • GET_LEADERBOARD_ENTRIES_FOR_USERS_REQUEST
  • SET_LEADERBOARD_SCORE_REQUEST
  • CREATE_LEADERBOARD_REQUEST
  • GET_GLOBAL_STATS_REQUEST

Overlay

This includes calls made to be forwarded to game process

  • START_GAME_SESSION_REQUEST
  • OVERLAY_FRONTEND_INIT_DATA_REQUEST
  • OVERLAY_STATE_CHANGE_NOTIFICATION
  • ACCESS_TOKEN_REQUEST
  • OVERLAY_INITIALIZATION_NOTIFICATION
  • NOTIFY_ACHIEVEMENT_UNLOCKED
  • SHOW_WEB_PAGE
  • VISIBILITY_CHANGE_NOTIFICATION
  • SHOW_INVITATION_DIALOG
  • GAME_JOIN_REQUEST_NOTIFICATION
  • GAME_INVITE_SENT_NOTIFICATION

How to use

Comet integration in game launchers

  • Heroic - ✅ an experimental feature enabled by default (as of 2.15.0)
  • Lutris - ❓ planned, no ETA
  • Minigalaxy - ❓ open for Pull Requests

For manual instructions see running

Some client SDK versions require Windows service to be registered, refer to dummy service

Authentication

You need to obtain access_token, refresh_token and user_id either manually, or by importing them:

Log in to GOG within the launcher.
Use --from-heroic for automatic import.

Via Lutris

Log in to Lutris's GOG source.
Use --from-lutris for automatic import.

Via wyvern (CLI)

Log in to GOG in wyvern
Use --from-wyvern for automatic import.

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

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

comet --token "<access_token>" --refresh_token "<refresh_token>" --user-id <user_id> --username <USERNAME>

Or if you are using Heroic/gogdl

comet --from-heroic --username <USERNAME>

Or Lutris

comet --from-lutris --username <USERNAME>

Or wyvern

comet --from-wyvern --username <USERNAME>

Or use the shortcut script provided for non-Steam shortcuts. See the Steam Deck Usage Guide.

Configuration

You can adjust basic overlay settings with comet configuration file.
File locations:

  • Windows - %APPDATA%/comet/config.toml
  • Mac - ~/Library/Application Support/comet/config.toml
  • Linux - $XDG_CONFIG_HOME/comet/config.toml

Default configuration file is as follows

[overlay]
notification_volume = 50  # value from 0 to 100
position = "bottom_right" # position where notifications are shown: top_left top_right bottom_left bottom_right

# Controls chat message notifications
[overlay.notifications.chat]
enabled = true
sound= true

# Controls notifications when friend becomes online
[overlay.notifications.friend_online]
enabled = true
sound= true

# Controls notifications when someone sends you a friend invititation
[overlay.notifications.friend_invite]
enabled = true
sound= true

# Controls notifications when friend starts playing a game
[overlay.notifications.friend_game_start]
enabled = true
sound= true

# Controls notifications when someone sends you a game invite
[overlay.notifications.game_invite]
enabled = true
sound= true

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

Debugging SDK Client

In order to dump logging from SDK client (the game) download GalaxyPeer.ini, when placed next to game .exe it will write GalaxyPeer.log when the game is running.

Warning

Proceed with caution, the log may contain sensitive information, make sure to remove such data before sharing the file with others.

Sponsoring

If you want to contribute financially you can do so via my Ko-Fi.
You can also use any of the options to support Heroic