Run your gamemode in the game world
Set Surface = GamemodeSurface.World. Side Hustle then boots a scratch world before it calls your launch callback.
You need: a registered gamemode. See Add a gamemode.
The scratch world is a fresh copy of the default save on every launch. Side Hustle never touches a real save slot.
-
Set the surface:
Surface = GamemodeSurface.World, -
Turn on the world rules you need with a preset. Each preset only switches flags on.
WorldHygiene.CleanWorld(descriptor, "My Guide Quest"); // quests blocked except the named ones, no intro, no savingWorldHygiene.Arena(descriptor); // CleanWorld, plus no NPC reaction to gunfire and no player deathOr set the flags yourself:
Flag Effect for the session BlockVanillaQuestsNo vanilla quest starts. AllowedQuestTitleslists the exceptions. Matters on the host.SkipIntroNo intro cutscene and no character creator. BlockSaveDuringSessionEvery vanilla save does nothing. The Save button stays visible. SuppressNpcCombatReactionsNPCs ignore gunfire: no panic, no police call, no wanted level. DisableVanillaPlayerDeathPlayers cannot die from weapon damage. Damage to NPCs is unchanged. -
Optional: limit which other mods stay loaded with a
ModPolicy.Policy = new ModPolicy{RequiredMods = new[] { "S1API" },AllowedMods = new[] { "Hotline" },},DefaultRequiredModsOnly = true,- With a policy, Side Hustle restarts the game into a temporary profile that loads only the kept mods. Leaving the gamemode restarts into the full mod set.
- The player confirms the change first. Installed mod files are never moved or deleted.
- Names match the MelonLoader name or the DLL file name, case-insensitive.
- Always kept: MelonLoader, S1API, Side Hustle, your own mod, the multiplayer libraries, and every dependency of a kept mod.
- A required mod that is not installed blocks the launch with a message to install it.
DefaultRequiredModsOnlypreselects “Required mods only” on the Host form. The host can change it.
Check it works
Section titled “Check it works”- Start your gamemode. The loading screen shows, then your launch callback runs in the world.
- With
BlockSaveDuringSession, press Save. Nothing is written. - End the session with
ctx.ReturnToHub(). The menu and the hub come back.