MultiplayerInfo
public sealed class MultiplayerInfoNamespace SideHustle.Multiplayer
Added in 1.1.0
The multiplayer payload carried on LaunchContext.Multiplayer. Populated by Side Hustle from the Steam lobby’s namespaced metadata (the sh_* keys). The host fills it from its host options; a joining client reads it back from the lobby. ConfigBlob is a free-form string the host writes (lobby key sh_config) so a gamemode can ship its own settings to clients with no extra netcode.
Properties
Section titled “Properties”MaxPlayers
Section titled “MaxPlayers”public int MaxPlayers { get; internal set; }Added in 1.1.0
Maximum players the host opened the lobby for.
Value The host form offers 2 up to the lobby cap. It starts at the host’s last choice, else at 4 or the cap, whichever is lower.
GamemodeName
Section titled “GamemodeName”public string GamemodeName { get; internal set; }Added in 1.1.0
Display name of the gamemode (lobby key sh_gamemode_name).
LobbyName
Section titled “LobbyName”public string LobbyName { get; internal set; }Added in 1.5.0
Host-chosen lobby name (lobby key sh_name); may be empty.
public string Mode { get; internal set; }Added in 1.5.0
The mode/preset label the host selected (lobby key sh_mode), e.g. “Infection” or “Custom - Infection”; may be null when the gamemode has no presets.
HostName
Section titled “HostName”public string HostName { get; internal set; }Added in 1.1.0
The host’s name as other players see it: the display name the host chose for this gamemode, or their Steam persona name when none is set (lobby key sh_host_name).
HasPassword
Section titled “HasPassword”public bool HasPassword { get; internal set; }Added in 1.1.0
True if the lobby is password-protected (lobby key sh_pw = “1”).
ConfigBlob
Section titled “ConfigBlob”public string ConfigBlob { get; internal set; }Added in 1.1.0
Free-form per-gamemode payload the host published (lobby key sh_config); may be null.
BuildId
Section titled “BuildId”public string BuildId { get; internal set; }Added in 1.5.0
The host’s gamemode build fingerprint (lobby key sh_build; the DLL’s ModuleVersionId). Side Hustle compares this to the joining client’s local build at join time and warns on mismatch. May be empty.
GamemodeId
Section titled “GamemodeId”public string GamemodeId { get; internal set; }Added in 2.0.0
The gamemode’s stable id (lobby key sh_gamemode); used to match a lobby against the installed gamemodes and to group “not installed” advertisements by gamemode. May be empty.
DownloadUrl
Section titled “DownloadUrl”public string DownloadUrl { get; internal set; }Added in 2.0.0
Where to get the gamemode mod (lobby key sh_url), advertised by the host so a player who does not have it installed can open its download page. May be empty.
Runtime
Section titled “Runtime”public string Runtime { get; internal set; }Added in 2.3.0
Which game branch the host plays on (lobby key sh_rt): “il2cpp”, “mono”, or empty when the host runs a Side Hustle that predates the key. The two branches cannot play together.
Methods
Section titled “Methods”GetSetting
Section titled “GetSetting”public string GetSetting(string key, string fallback = null)Added in 1.4.0
A host setting value by key (the gamemode’s SettingDescriptor.Key), or fallback.
| Parameter | |
|---|---|
key | A SettingDescriptor.Key, e.g. “len”. Compared exactly, case included. |
fallback | Returned when the blob has no entry for the key. A key stored with an empty value returns the empty string. |
Returns The stored form described on SettingDescriptor, e.g. “30”, “1” or “n”.
GetInt
Section titled “GetInt”public int GetInt(string key, int fallback = 0)Added in 1.4.0
A host setting parsed as an integer (invariant culture), or fallback.
| Parameter | |
|---|---|
key | A SettingDescriptor.Key, e.g. “len”. |
fallback | Returned when the key is missing or its value is not an integer, e.g. “0.25”. |
GetFloat
Section titled “GetFloat”public float GetFloat(string key, float fallback = 0f)Added in 1.4.0
A host setting parsed as a float (invariant culture), or fallback.
| Parameter | |
|---|---|
key | A SettingDescriptor.Key, e.g. “speed”. |
fallback | Returned when the key is missing or its value is not a number. |
GetBool
Section titled “GetBool”public bool GetBool(string key, bool fallback = false)Added in 1.4.0
A host setting parsed as a bool (“1”/“true” = true), or fallback.
| Parameter | |
|---|---|
key | A SettingDescriptor.Key, e.g. “ping”. |
fallback | Returned when the key is missing or its value is empty. Any other value than “1” or “true” (case ignored) is false. |