GamemodeDescriptor
public sealed class GamemodeDescriptorNamespace SideHustle
Everything a gamemode mod tells Side Hustle about itself. Pass one of these to API.Register (usually from your mod’s OnInitializeMelon). Only Id, DisplayName and the launch callback for your Support mode are required; every multiplayer field is optional so a singleplayer-only mod registers minimally.
Example
A multiplayer World gamemode with one host setting:
var d = new GamemodeDescriptor{ Id = "you.yourmode", DisplayName = "Your Mode", Support = GamemodeSupport.Multiplayer, Surface = GamemodeSurface.World, DownloadUrl = "https://github.com/you/yourmode", OnHostMultiplayer = Start, OnJoinMultiplayer = Start, OnExitToHub = Stop, HostSettings = new[] { new SettingDescriptor { Key = "len", Label = "Round length", Type = SettingType.Slider, Min = 10, Max = 120, Step = 10, WholeNumbers = true, Default = "30", Unit = "s" } }};API.Register(WorldHygiene.CleanWorld(d));Fields
Section titled “Fields”public string IdStable, unique key (e.g. “doodesch.inkubator”). Used for de-duplication and, later, lobby filtering.
Value 3-48 characters of a-z, 0-9, ’.’, ’_’ or ’-’, e.g. “doodesch.prophunt”. Another form logs a warning and still registers. Compared exactly, case included. Required: null or empty makes API.Register throw.
DisplayName
Section titled “DisplayName”public string DisplayNameName shown in the gamemode list.
Value E.g. “PropHunt”. Null or empty shows Id instead.
Description
Section titled “Description”public string DescriptionShort one-line description shown under the name.
Author
Section titled “Author”public string AuthorAuthor shown in the list (optional).
public Sprite IconIcon sprite for the list row. If null, Side Hustle builds one from IconTex.
IconTex
Section titled “IconTex”public Texture2D IconTexIcon texture; Side Hustle wraps it in a Sprite when Icon is null.
IconResource
Section titled “IconResource”public string IconResourceAdded in 3.0.0
Name of a PNG embedded in your mod’s assembly (the manifest resource name, e.g. “YourMod.icon.png”). Used only when Icon and IconTex are both null: the hub loads it into IconTex the first time it draws the row, so you need no Unity image code. A name that does not resolve is logged together with the resource names the assembly does have. Since 3.0.0.
Embed the PNG as <AssemblyName>.hub-icon.png (csproj: <EmbeddedResource Include="icon.png" LogicalName="YourMod.hub-icon.png" />) and the hub finds it without this field, and also while the boot gate holds your mod back, when none of your code has run yet.
Support
Section titled “Support”public GamemodeSupport Support = GamemodeSupport.SingleplayerType: GamemodeSupport
Which play modes this gamemode supports.
Surface
Section titled “Surface”public GamemodeSurface Surface = GamemodeSurface.MenuSpaceType: GamemodeSurface
Whether the gamemode runs as a menu overlay or needs the game world.
DownloadUrl
Section titled “DownloadUrl”public string DownloadUrlAdded in 2.0.0
Where to get this mod (its Thunderstore/Nexus/GitHub page). When set, Side Hustle advertises this gamemode’s live public lobbies to players who do NOT have it installed, with a “Download Mod” button that opens this page. Null = still advertised by name (see Advertise) but with no download link. Only links on known mod hosts (Thunderstore, Nexus, GitHub) are opened.
Value An absolute https link on thunderstore.io, nexusmods.com, github.com or doodesch.de, or a subdomain of one, e.g. “https://github.com/you/yourmode”. Any other link is shown but never opened.
Advertise
Section titled “Advertise”public bool Advertise = trueAdded in 2.0.0
When true (default), this gamemode’s PUBLIC lobbies are advertised in the Side Hustle menu of players who do not have it installed, so they can discover it. Set false to stay invisible to non-installers - e.g. a work-in-progress gamemode you do not want discovered during development. This only affects that discovery listing; the gamemode is always fully hostable and joinable by people who have it.
BlockVanillaQuests
Section titled “BlockVanillaQuests”public bool BlockVanillaQuests = falseAdded in 1.5.0
When true, Side Hustle blocks every vanilla quest from starting for the duration of the session (a Harmony prefix on Quest.Begin). Keeps a clean slate - no tutorial/dealer quest chains, phone prompts, or NPC waypoints fighting the gamemode. Quests are host-authoritative so this matters on the host. Default false.
AllowedQuestTitles
Section titled “AllowedQuestTitles”public string[] AllowedQuestTitlesAdded in 1.5.0
Quest titles EXEMPT from BlockVanillaQuests - e.g. a gamemode’s own guide quest. Their Quest.Begin is allowed through even while vanilla quests are blocked. Default none.
Value Each entry is compared exactly, case included, with the quest’s title, e.g. “PropHunt” for PropHunt’s guide quest. Null or empty entries are skipped.
SkipIntro
Section titled “SkipIntro”public bool SkipIntro = falseAdded in 1.5.0
When true, Side Hustle skips the new-game intro cutscene + character-creator (sets the player’s HasCompletedIntro before the intro gate runs), so players drop straight into the world. Default false.
ForceNewGame
Section titled “ForceNewGame”public bool ForceNewGame = falseAdded in 1.5.0
Has no effect. Side Hustle boots a clean scratch world (clears the scratch folder and copies DefaultSave) on every World launch anyway, and never touches a real save slot. Kept so mods that set it still load. Default false.
BlockSaveDuringSession
Section titled “BlockSaveDuringSession”public bool BlockSaveDuringSession = falseAdded in 1.5.0
When true, Side Hustle blocks every vanilla save (both SaveManager.Save overloads) for the duration of the session. A gamemode runs on a throwaway scratch world and mutates transient state (teleports, locked doors, swapped appearances); persisting that to disk would corrupt the save. The Save button still appears but does nothing. Saving works normally again once the session ends. Default false.
SuppressNpcCombatReactions
Section titled “SuppressNpcCombatReactions”public bool SuppressNpcCombatReactions = falseAdded in 1.5.0
When true, Side Hustle stops NPCs from reacting to hunter/player GUNFIRE for the session (no panic/flee/cover, no civilian police-call, no WANTED pursuit, no bystander weapon-impact) - so a gamemode can fire weapons without derailing the NPC schedule. Purely subtractive (prefixes on NPCAwareness NoiseEvent/VisionEvent for the gunshot/discharge cases, NPC.SendImpact, and the ranged-weapon aim scan); every other NPC awareness (footsteps, deals, vandalism) is untouched. Default false.
DisableVanillaPlayerDeath
Section titled “DisableVanillaPlayerDeath”public bool DisableVanillaPlayerDeath = falseAdded in 1.5.0
When true, Side Hustle cancels all vanilla PLAYER death for the session (prefix on PlayerHealth.TakeDamage + SendDie) - players cannot die to real weapon damage while the session runs. Use this when elimination is the gamemode’s own concern (e.g. a host-validated catch) and vanilla death + medical-centre respawn would eject a player from the play area. Damage to NPCs/props is untouched. Default false.
OnLaunchSingleplayer
Section titled “OnLaunchSingleplayer”public Action<LaunchContext> OnLaunchSingleplayerType: LaunchContext
Invoked to start singleplayer. Required for Singleplayer/Hybrid gamemodes.
OnHostMultiplayer
Section titled “OnHostMultiplayer”public Action<LaunchContext> OnHostMultiplayerType: LaunchContext
Invoked to start hosting a multiplayer session. Optional.
OnJoinMultiplayer
Section titled “OnJoinMultiplayer”public Action<LaunchContext> OnJoinMultiplayerType: LaunchContext
Invoked to join a multiplayer session. Optional.
OnExitToHub
Section titled “OnExitToHub”public Action<LaunchContext> OnExitToHubType: LaunchContext
Invoked when Side Hustle tears the gamemode down (e.g. the player backs out). Optional.
Policy
Section titled “Policy”public ModPolicy PolicyType: ModPolicy
Added in 1.2.0
Optional policy controlling which other mods may stay loaded while this gamemode runs. Null = no restriction (default). See ModPolicy.
DefaultRequiredModsOnly
Section titled “DefaultRequiredModsOnly”public bool DefaultRequiredModsOnly = falseAdded in 1.5.3
When true, the Host form defaults the mod-set choice to “Required mods only” (an isolated profile with just this gamemode’s mods) instead of “Current installed mods” - e.g. a multiplayer gamemode that wants everyone on an identical, clean set. The host can still switch it before starting. Only takes effect when Policy is declared and would actually change the set (and is not blocked). Default false.
HostSettings
Section titled “HostSettings”public SettingDescriptor[] HostSettingsType: SettingDescriptor
Added in 1.4.0
Optional host-configurable settings. Side Hustle renders these as a form on the Host screen and ships the chosen values to your launch callbacks via LaunchContext.Multiplayer’s config blob. Null = none. See SettingDescriptor.
Value Shown in array order. Each SettingDescriptor.Key must be unique; a repeated key logs a warning and both controls write the same value.
Presets
Section titled “Presets”public SettingPreset[] PresetsType: SettingPreset
Added in 1.5.0
Optional one-click presets for HostSettings. Side Hustle shows a picker above the form; selecting a preset cascades its values into the matching controls (the host can still tweak after). Null/empty = no picker. See SettingPreset.
Value The form opens on the preset marked SettingPreset.DefaultSelected, else on the best fit for the lobby size, else on the first entry.
Properties
Section titled “Properties”AllowsSingleplayer
Section titled “AllowsSingleplayer”public bool AllowsSingleplayer { get; }True when this descriptor can be launched in singleplayer.
AllowsMultiplayer
Section titled “AllowsMultiplayer”public bool AllowsMultiplayer { get; }True when this descriptor exposes multiplayer (host/join).