> For the complete documentation index, see [llms.txt](https://plugn-play.gitbook.io/ultimate-dice-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://plugn-play.gitbook.io/ultimate-dice-system/multiplayer.md).

# Multiplayer and Private Results

Understand authority, ownership and what private results conceal.

To try two-player local multiplayer on one Windows PC, download the [split-screen demo](https://plugn-play.gitbook.io/ultimate-dice-system/demo-build.md). The demo page includes the keyboard and PS5 controls.

## Authority and ownership

The server initializes `BP_DiceManager` and creates a `BP_DiceThrower` owned by each eligible PlayerController. That ownership is what allows the player's client to use the thrower's server RPCs.

The server spawns the dice and determines the final face. Clients receive replicated state and display the result according to the local visibility rules. Input, HUD and the roll camera initialize only for the owning local controller.

Both the listen-server player and remote clients use this structure. Do not create additional local throwers for those players.

## Configuration replication

`BP_DiceThrower` and `BP_Dice` replicate the selected preset's **Soft Object Path** using `DiceConfigurationPath`. Each client resolves that path to its own loaded `BP_DiceConfig` asset before applying the configuration. The local `DiceConfiguration` object reference is not replicated.

This avoids relying on a Blueprint Data Asset object being accepted as a network object reference. The same preset must be available in both the server and client builds. Select it on the manager before initialization; runtime controls continue to use the existing authoritative state flow.

## Public, unknown and private presentation

| Mode                        | Owning player                                                            | Other players                                                           |
| --------------------------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------------- |
| Public, unknown rolling off | Visible dice while rolling and after settlement.                         | Visible dice while rolling and after settlement.                        |
| Public, unknown rolling on  | Unknown while rolling, revealed after settlement.                        | Unknown while rolling, revealed after settlement.                       |
| Private                     | Eligible to see the result; unknown rolling still applies during motion. | Unknown throughout, including after settlement; no result-number popup. |

Private Results takes priority over ordinary reveal behavior for non-owners. A listen-server player viewing someone else's private roll is also a non-owner.

{% hint style="info" %}
Private Results is a presentation rule, not encryption or an anti-cheat boundary. The authoritative server knows the results, and result state is replicated for the system's presentation logic. Do not rely on it to keep values secret from a modified client or server operator.
{% endhint %}

## Shared history and leaderboard

The history records the player, dice count and results. Private batches appear as **Unknown (private roll)** and are **not scored** on the public leaderboard.

The leaderboard stores each player's **best valid public batch total**. It is not a running sum across throws. A batch containing invalid or unavailable dice does not qualify for the public best-score update.

**History Entries Shown** controls the visible rows. The manager's stored history array can still grow during a long session.

History and scores belong to the current manager instance. No save-game or cross-session persistence is provided.

## Replicated sound

A successful batch triggers the thrower's reliable **MulticastThrowSound** event once, using the first valid spawned die's initial location. Playback happens locally on listening clients and the listen server; dedicated servers skip audio.

It is not a sound per die, and it is not triggered by impact. A rejected throw or a batch with no valid spawned die does not play the throw sound.

## Replicated result VFX

A die's valid settled result advances its replicated result-effect sequence. Each permitted client spawns the configured Niagara system locally and sets `User.DiceResult` before activation. Sequence tracking prevents the same received sequence from spawning repeatedly.

This reproduces the result popup across clients; the Niagara simulation itself is local. The popup uses the same private-result visibility check as the die.

A newly relevant or joining client can observe a completed sequence and display that popup while the die still exists. The current effect state is not an expiring transient network event.

## Camera behavior

Each owner tracks their own latest batch. Camera blending, input locking and pawn hiding are local presentation changes. If you want to keep issuing throw commands during tracking, turn off **Lock Player Input** or disable the roll camera, and also disable **Wait for Roll to Finish** when overlapping batches are intended.
