# V2 GOG Galaxy SDK Integration

Phase 72 task 72.21.1.4 is implemented by the
[GOG Galaxy SDK integration contract](../../ue/Content/V2/Online/GogGalaxySdkIntegration_V2_Contract.json)
and the `V2OnlineServices` GOG Galaxy API surface. The `V2GogGalaxySdkBridge`
covers achievements friends cloud saves leaderboards and multiplayer operations
for the GOG Galaxy provider while keeping Galaxy SDK headers outside gameplay
modules.

## Feature Coverage

| Feature      | Galaxy interface            | Required calls                                                                                             |
| ------------ | --------------------------- | ---------------------------------------------------------------------------------------------------------- |
| Achievements | `galaxy::api::IStats`       | `RequestUserStatsAndAchievements`, `GetAchievement`, `SetAchievement`, `StoreStatsAndAchievements`         |
| Friends      | `galaxy::api::IFriends`     | `RequestFriendList`, `GetFriendCount`, `GetFriendByIndex`, `GetFriendPersonaName`, `GetFriendPersonaState` |
| Cloud saves  | `galaxy::api::IStorage`     | `FileWrite`, `FileRead`, `FileExists`, `GetFileSize`, `FileDelete`                                         |
| Leaderboards | `galaxy::api::IStats`       | `FindLeaderboard`, `UploadLeaderboardScore`, `DownloadLeaderboardEntries`, `GetDownloadedLeaderboardEntry` |
| Multiplayer  | `galaxy::api::IMatchmaking` | `CreateLobby`, `JoinLobby`, `LeaveLobby`, `RequestLobbyList`, `SendLobbyMessage`, `SetLobbyData`           |

## Guard Rails

The default config records sandbox client id and secret-reference placeholders
for local planning. Shipping credentials are supplied outside this contract. GOG
Galaxy operations require the Galaxy client, an authenticated GOG user, and
routing through the platform SDK abstraction.

Cloud saves use Galaxy storage, require cloud sync, and delegate conflict
resolution back to the V2 persistence layer. Leaderboard plans require
configured leaderboard definitions before score uploads or downloads.
Multiplayer plans validate lobby metadata before `galaxy::api::IMatchmaking`
bridge calls are considered ready.

## Verification

Run the focused gate with:

```bash
python3 V2/ue/Tools/check-v2-gog-galaxy-sdk-integration.py
```

The checker validates the contract, C++ source declarations, automation spec,
CI/Horde wiring, this document, and the Phase 72 TODO evidence.
