> ## Documentation Index
> Fetch the complete documentation index at: https://docs.summerengine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Summer.authority.player_data

> Authority-written, per-player private game data.

**Class:** `SummerAuthorityPlayerData` · **Inherits:** RefCounted · **Access:** `Summer.authority.player_data`

Authority-written, per-player private game data.

Remembers things about a player between play sessions: progress, unlocks, settings. Each player has two separately written slots for this Game: `public`, which the player's own client can read through [`Summer.client.player_data`](/api-reference/gdscript/client#player_data), and `secret`, which only the authority reads. Nothing here is visible to other players.
Each slot holds one JSON object of at most 64 KiB. Supported values are \[bool], \[int] (within ±(2^53 - 1)), finite \[float], `String`, `Array` and `Dictionary` with `String` keys, nested at most 16 containers deep; anything else fails with `player_data_unsupported_type` before a request is sent. Loaded numbers come back as \[int] when integral.
Only the player's newest Session for this Game can commit. A commit made through an older Session fails with `player_data_superseded`. Commits remain available after gameplay quiesces for shutdown, until the World's stop deadline.

```gdscript theme={null}
var player_data := Summer.authority.player_data
var loaded := player_data.load(session)
await loaded.get_result_or_completed_signal()
var progress: Dictionary = loaded.public_record.data
var saved := player_data.commit_public(session, "rift-%d" % run, {"keystone": 7})
var result: SummerResult = await saved.get_result_or_completed_signal()
```

## Methods

### commit\_public

```gdscript theme={null}
func commit_public(session: SummerSession, save_id: String, data: Dictionary) -> SummerPlayerDataCommitOperation
```

Replaces the player's public slot with `data`. `save_id` names this save: resending the same `save_id` with the same content returns the original revision with [`SummerPlayerDataCommitOperation.replayed`](/api-reference/gdscript/types/player-data-commit-operation#replayed) set, while different content fails with `player_data_save_id_conflict`. One commit per Session and slot may be pending; another fails with `operation_in_progress`. The Engine never retries; on a retryable failure, commit again with the same `save_id`.

| Parameter | Type | Default |
| - | - | - |
| `session` | [`SummerSession`](/api-reference/gdscript/types/session) | required |
| `save_id` | String | required |
| `data` | Dictionary | required |

**Returns:** [`SummerPlayerDataCommitOperation`](/api-reference/gdscript/types/player-data-commit-operation)

Returns at once. Wait for the result with `var result: SummerResult = await op.get_result_or_completed_signal()`; see [SummerOperation](/api-reference/gdscript/types/operation).

### commit\_secret

```gdscript theme={null}
func commit_secret(session: SummerSession, save_id: String, data: Dictionary) -> SummerPlayerDataCommitOperation
```

Replaces the player's secret slot with `data`. It follows the same rules as [`commit_public()`](/api-reference/gdscript/authority/player-data#commit_public), and the player's client can never read it.

| Parameter | Type | Default |
| - | - | - |
| `session` | [`SummerSession`](/api-reference/gdscript/types/session) | required |
| `save_id` | String | required |
| `data` | Dictionary | required |

**Returns:** [`SummerPlayerDataCommitOperation`](/api-reference/gdscript/types/player-data-commit-operation)

Returns at once. Wait for the result with `var result: SummerResult = await op.get_result_or_completed_signal()`; see [SummerOperation](/api-reference/gdscript/types/operation).

### load

```gdscript theme={null}
func load(session: SummerSession) -> SummerPlayerDataLoadOperation
```

Reads both slots for the player of `session`. A slot that was never written has [`SummerPlayerDataRecord.exists`](/api-reference/gdscript/types/player-data-record#exists) set to `false` and an empty [`SummerPlayerDataRecord.data`](/api-reference/gdscript/types/player-data-record#data).

| Parameter | Type | Default |
| - | - | - |
| `session` | [`SummerSession`](/api-reference/gdscript/types/session) | required |

**Returns:** [`SummerPlayerDataLoadOperation`](/api-reference/gdscript/types/player-data-load-operation)

Returns at once. Wait for the result with `var result: SummerResult = await op.get_result_or_completed_signal()`; see [SummerOperation](/api-reference/gdscript/types/operation).

***

What is live on the platform today: [platform capability status](/knowledge-base/source-status). Check availability at runtime before you offer a feature.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.