Sein Game Mode
Class · ASeinGameMode : AGameModeBase
#include "GameMode/SeinGameMode.h"
can be subclassed in Blueprint
The default RTS Game Mode, on the server. It seats each player controller in a Human slot of the match roster (the lobby’s, or one made from the level’s Sein Player Starts), gives it a relay, admits connections through an optional admission authority, decides dropped players’ seats (Get Vacant Seat Policy), and spawns the AI Controller Class for AI slots and for seats handed to AI. It never writes simulation state: USeinMatchStartupSubsystem builds the match on every process.
Functions
Section titled “Functions”GameMode
Get Effective Max Players
Section titled “Get Effective Max Players”The slot count of this world’s match settings, or the project maximum when it has none.
int32 GetEffectiveMaxPlayers() const;Spawn AI Controller For Slot
Section titled “Spawn AI Controller For Slot”Spawn the AI Controller Class to play a slot (server only). Null without an AI Controller Class.
ASeinAIController* SpawnAIControllerForSlot(FSeinPlayerID Slot);Find Player Start For Slot
Section titled “Find Player Start For Slot”Find the one Sein Player Start authored for a slot (1 or higher).
ASeinPlayerStart* FindPlayerStartForSlot(int32 SlotIndex) const;Match
Return To Lobby
Section titled “Return To Lobby”Send everyone back to the lobby map the match started from. A standalone game without one opens the Main Menu Map. False when there is nowhere to return to.
bool ReturnToLobby();Events and overrides
Section titled “Events and overrides”GameMode
Get Vacant Seat Policy
Section titled “Get Vacant Seat Policy”Overridable in Blueprint, with a native default
Runs on the host when a player drops mid-match: return what happens to their seat (AI takeover, opening it to new players, whether they may come back, and the delays). Override it to decide per match, per mode or per seat, for example from a lobby option. By default it returns the project’s Vacant Seat Policy (Project Settings > SeinARTS > Network).
FSeinVacantSeatPolicy GetVacantSeatPolicy(FSeinPlayerID Slot) const;Match
On Match Ended
Section titled “On Match Ended”Overridable in Blueprint, with a native default
The match ended and every machine’s world stopped at the same tick. Winners and Reason are the Game State’s. By default this waits Post Match Seconds, then calls Return To Lobby; override it for a score screen or a different flow.
void OnMatchEnded(const TArray<FSeinPlayerID>& Winners, FGameplayTag Reason);On Match Result Verified
Section titled “On Match Result Verified”Overridable in Blueprint, with a native default
After On Match Ended: whether every player’s final state matched the host’s. A network match reports once each player has; a standalone match reports Verified at once. Submit an online match result here.
void OnMatchResultVerified(bool bVerified);On Match Aborted
Section titled “On Match Aborted”Overridable in Blueprint, with a native default
The match stopped without a result: a desync under the Abort Match policy, a network match that could not start, or a simulation that fail-stopped. By default this waits Post Match Seconds, then calls Return To Lobby.
void OnMatchAborted(const FString& Reason);Properties
Section titled “Properties”Classes
Section titled “Classes”AI Controller Class
Section titled “AI Controller Class”TSubclassOf<ASeinAIController> AIControllerClass · default ASeinAIController::StaticClass()
Editable in defaults and on instances · Blueprint read-only
The AI controller the Game Mode spawns for each AI slot and for a dropped player’s seat its vacant seat policy hands to AI. None leaves those slots idle.
Post Match Seconds
Section titled “Post Match Seconds”float PostMatchSeconds · default 10.0f · min 0
Editable in defaults and on instances · Blueprint read and write
Seconds the default On Match Ended and On Match Aborted wait before Return To Lobby. The host waits up to five seconds for every player’s final checksum, so a shorter wait can leave before On Match Result Verified.
General
Section titled “General”Resolved Match Settings
Section titled “Resolved Match Settings”FSeinMatchSettings ResolvedMatchSettings
Blueprint read-only
The match settings that route controllers to slots. A match started without a lobby replaces the authored defaults with its final roster before launch.
Match Settings Resolved
Section titled “Match Settings Resolved”bool bMatchSettingsResolved · default false
Blueprint read-only
True once the Game Mode has settled the match roster it routes controllers by (Resolved Match Settings). False if no roster exists yet, for example on a map with no Sein Player Starts and no lobby.