class

FLevelSeedReplication

FLevelSeedReplication — the host's seeds, sent once per level instead of the level. A module level becomes Level Instances whose actor ids derive from the seed and the room, so the clients that build from the same seed hold the same actors under the same ids, which is all replication needs to address them. A client that joins late asks, and the host answers with every seed it has handed out this session.

Module
LevelGen
Header
#include "LevelGen/LevelSeedReplication.h"
Namespace
Mowo

Properties

TypeNameDescription
static constexpr uint16_tkSeedEventIdDefault 0xFE30.
static constexpr uint16_tkSeedRequestEventIdDefault 0xFE31.

Public functions

ReturnsNameDescription
FLevelSeedReplication&Get
ELevelSeedRoleGetRole
voidSetRoleOverrideA dedicated driver that runs the session itself can say which side it is; Offline clears the override and the session decides again.
voidPublishHost: remember the seed and send it to every client.
boolTryGetClient: the seed the host decided for this generator, once it arrived.
voidRequestFromHostClient: ask the host for its seeds (once per session).
boolReceiveWhat the client handler does with an arrived seed; public so a driver that moves bytes itself can hand them in.
voidStore
voidEnsureHandlersRe-installs the session handlers after a session started (the session drops game handlers on leave).
voidClear
voidWrite
boolRead
uint32_tGetPublishCount
uint32_tGetReceiveCount

Function details

Get

C++
static FLevelSeedReplication& Get()

GetRole

C++
ELevelSeedRole GetRole() const

SetRoleOverride

C++
void SetRoleOverride(ELevelSeedRole role, bool enabled)

A dedicated driver that runs the session itself can say which side it is; Offline clears the override and the session decides again.

Publish

C++
void Publish(const FLevelSeedRecord& record)

Host: remember the seed and send it to every client.

TryGet

C++
bool TryGet(const std::string& generator, FLevelSeedRecord& outRecord) const

Client: the seed the host decided for this generator, once it arrived.

RequestFromHost

C++
void RequestFromHost()

Client: ask the host for its seeds (once per session).

Receive

C++
bool Receive(FNetEventReader& reader)

What the client handler does with an arrived seed; public so a driver that moves bytes itself can hand them in.

Store

C++
void Store(const FLevelSeedRecord& record)

EnsureHandlers

C++
void EnsureHandlers()

Re-installs the session handlers after a session started (the session drops game handlers on leave). Cheap when they are in place.

Clear

C++
void Clear()

Write

C++
static void Write(FNetEventWriter& writer, const FLevelSeedRecord& record)

Read

C++
static bool Read(FNetEventReader& reader, FLevelSeedRecord& outRecord)

GetPublishCount

C++
uint32_t GetPublishCount() const

GetReceiveCount

C++
uint32_t GetReceiveCount() const
Generated from LevelGen/LevelSeedReplication.h via levelgen.json · Oct 26, 2026Version 1.0.0