Skip to content

SeinARTS Lobby Library

Class · USeinLobbyBPFL : UBlueprintFunctionLibrary

#include "Lib/SeinLobbyBPFL.h"

Nodes for building lobby screens: host, join and leave a session, claim a slot, set ready, team, slot state and map, start the match, and list the available factions and maps. Requests made by a client are sent to the host; most nodes return false when the request could not be sent or was refused.

Gets the lobby view model for this world, creating it on first use. Every widget shares one instance. Call it in the lobby widget’s Construct event and use it as the data source for the slot panel.

static USeinLobbyViewModel* SeinGetOrCreateLobbyViewModel(const UObject* WorldContextObject);

Asks to move the local player into a slot with the chosen faction. The host validates the request and the result replicates to everyone. Returns true if the request was sent; false means the player’s connection is not ready yet, so try again.

static bool SeinRequestSlotClaim(const UObject* WorldContextObject, int32 SlotIndex, FSeinFactionID FactionID);

Host only. Starts the match from the current lobby. If a gameplay map is configured, everyone travels to it; otherwise the match starts in place. Returns false for a client, or when no usable lobby is available.

static bool SeinRequestStartMatch(const UObject* WorldContextObject);

Leaves the session. A host closes the session for everyone; a client simply leaves and frees its slot. Afterwards the player travels to the Main Menu Map from the Net settings if one is set.

static void SeinRequestLeaveLobby(const UObject* WorldContextObject);

Turns the current world into a listen server without changing maps, so the lobby UI already on screen keeps running. Use it for the Host button. Returns true if the server is now running, including if it already was, and false if it could not start.

static bool SeinRequestHostSession(const UObject* WorldContextObject);

Connects the local player to a host at the given address, travelling to the host’s current map. Use it for the Join button. Returns true if the travel started; whether the connection succeeds is reported later by Unreal’s network failure events. Refuses while hosting.

static bool SeinRequestJoinSession(const UObject* WorldContextObject, const FString& ServerAddress);

Sets the local player’s ready flag. The framework does not require everyone to be ready before the host can start; your host UI can enforce that using each slot’s ready flag.

static bool SeinRequestSetReady(const UObject* WorldContextObject, bool bReady);

Host only. Puts a slot on a team. The framework treats the team number as opaque; your game decides what teams mean.

static bool SeinRequestSetTeam(const UObject* WorldContextObject, int32 SlotIndex, uint8 TeamID);

Host only. Sets a slot to Open, AI or Closed. A player claims a Human slot with Request Slot Claim instead. AI Profile applies only to AI slots.

static bool SeinRequestSetSlotState(const UObject* WorldContextObject, int32 SlotIndex, ESeinSlotState NewState, FGameplayTag AIProfile);

Host only. Removes whoever holds a slot and reopens it. A kicked player is returned to the main menu. On an AI or closed slot it just reopens the slot. It cannot kick the host.

static bool SeinRequestKickPlayer(const UObject* WorldContextObject, int32 SlotIndex);

Every faction the game knows about, from discovered assets and any registered at runtime. Use it to fill a faction picker.

static TArray<TSoftObjectPtr<USeinFaction>> SeinGetAvailableFactions(const UObject* WorldContextObject);

Host only. Changes the lobby’s selected map and resizes the lobby slots to the map’s slot count. Rejected if a claimed slot would be lost. Pass a map from Get Available Maps.

static bool SeinRequestSelectMap(const UObject* WorldContextObject, TSoftObjectPtr<UWorld> Map);

The playable maps listed in the Net settings. Use it to fill the lobby’s map picker.

static TArray<FSeinLobbyMapEntry> SeinGetAvailableMaps();