Skip to content

SaltedByte/sandboxmode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sandbox Mode

A BepInEx 5 mod for Gamble With Your Friends (Unity Mono, Mirror multiplayer) that adds a per-save Sandbox Mode for goofing off without the run-economy pressure:

  • $1,000,000,000,000 in the bank from the first day.
  • All floors unlocked from the start — every elevator button works on day one.
  • 1-hour day timer instead of 5 minutes.
  • Quota pinned to a configurable value so casino-game bet ranges stay stable across days (and the lose-state never triggers).
  • Per-save toggle. When you click an empty save slot, a dialog asks Normal or Sandbox — your choice is recorded in a sidecar marker file next to the save JSON. Existing/normal saves are completely untouched.
  • SANDBOX MODE badge in the top-left of the screen while you're walking around the house or casino, so you don't accidentally tell yourself you earned it.

⚠️ Multiplayer note: sandbox mode is determined by the host's save. Gameplay effects (money, floors, day length, quota pin) replicate automatically via Mirror to every connected client, but the on-screen badge and the local "remaining time" UI text are host-side only. For best results, the host installs the mod — clients don't need it for the gameplay to work, but the visual indicators won't appear on their screens.


Installation (end users)

Step 1 — install BepInEx 5

  1. Download BepInEx 5.4.23.5 (win x64) from the official releases page (BepInEx_win_x64_5.4.23.5.zip or newer 5.x).
  2. Extract the zip directly into your game folder. Find it via Steam → right-click Gamble With Your FriendsManageBrowse local files. After extraction, the folder should contain a BepInEx/ directory and a winhttp.dll next to Gamble With Your Friends.exe.
  3. Launch the game once from Steam, wait until you reach the main menu, then quit. This generates the BepInEx/config/ folder and confirms BepInEx loaded successfully (you can verify by checking BepInEx/LogOutput.log for Chainloader started).

Step 2 — install Sandbox Mode

  1. Download the latest release zip (SandboxMode-x.y.z.zip) from the releases page.
  2. Extract it directly into your game folder. The contents are structured as BepInEx/plugins/SandboxMode/SandboxMode.dll, so extracting at the game root drops the DLL into the right place.
  3. Launch the game and check BepInEx/LogOutput.log for Harmony patches applied: 6/6.

Step 3 — create a sandbox save

  1. From the main menu, open the save-slot screen and click an empty slot.
  2. The dialog asks Normal / Sandbox. Pick Sandbox.
  3. Once you're in the casino, the gold SANDBOX MODE badge appears top-left, you start with a trillion dollars, and the day clock reads 1:00:00.

Existing saves are unaffected — they keep playing exactly like vanilla.


Configuration

After your first launch with the mod, edit <game>/BepInEx/config/com.saltedbyte.sandboxmode.cfg:

Section Setting Default Description
Sandbox BetQuota 5000 Effective currentQuota value used by the casino-game MinBet / MaxBet formulas while a sandbox save is loaded. Higher = bigger bet ranges. The save's quota is pinned to this across days, so bets stay stable. Tune to taste.

How it works

The mod hooks six game classes via Harmony:

Patch Target What it does
SaveSlotUI_SandboxDialog SaveSlotUI.OnSlotClicked (prefix) Intercepts empty-slot clicks and shows a Normal / Sandbox choice dialog using the game's existing ConfirmationDialogManager. Existing saves untouched.
LocalSaveManager_CreateNewSave LocalSaveManager.CreateNewSave (postfix) If the user picked Sandbox, writes a <saveName>.sandbox marker file and rewrites the freshly-created save JSON with $1T money, top floor, BetQuota, etc.
LocalSaveManager_DeleteSave LocalSaveManager.DeleteSave (postfix) Cleans up the sandbox marker file when a save is deleted.
GameManager_CaptureOriginalDayDuration GameManager.OnAwake (postfix) Captures the vanilla dayDuration once so the load-time override knows what to restore for non-sandbox saves.
SaveManager_RefreshSandboxState SaveManager.LoadGame (postfix) On save load, re-reads the marker file. Sets dayDuration = 3600s for sandbox saves, restores the original for vanilla.
GameSettings_SandboxQuota GameSettings.GetQuota (prefix) When sandbox is active, short-circuits the day-end quota recalculation to return the configured BetQuota value, freezing bet scaling.

The sidecar marker file (<saveName>.sandbox, sitting next to <saveName>.json in %appdata%\..\LocalLow\<company>\<game>\Saves\) is the source of truth for whether a save is sandbox. Vanilla doesn't read or care about it; deleting it cleanly downgrades a save back to normal.


Troubleshooting

Symptom Likely cause Fix
Log doesn't show Harmony patches applied: 6/6 BepInEx didn't load, or one of the target methods has been renamed by a game update Verify winhttp.dll is in your game folder. Check LogOutput.log for FAILED to patch lines.
New-save dialog shows but creates a normal save anyway ConfirmationDialogManager not found in the menu scene Should not happen — paste your LogOutput.log.
Sandbox badge doesn't appear You're not on the host, or you're on a loading screen / cutscene scene Badge only renders for the host on HomeScene / CasinoScene.
Day timer shows wrong remaining time on a non-host client Expected — clients' local dayDuration isn't synced. The day still ends at the right moment. A future release may broadcast dayDuration via Mirror so clients display correctly.
Made a sandbox save by mistake Delete it from the save-slot menu — the marker file is removed automatically.

For anything else, attach <game>/BepInEx/LogOutput.log.


Building from source

You need .NET 8 SDK on Windows.

# Clone, then from the repo root:
dotnet build src\SandboxMode.csproj -c Release

The build automatically copies the resulting DLL into <game>\BepInEx\plugins\SandboxMode\. The game's install path is hard-coded in src/SandboxMode.csproj — adjust the <GameDir> property if your install lives elsewhere.

Producing a distribution zip

.\scripts\Build-Release.ps1

This builds the project in Release mode and writes a versioned zip (e.g. dist/SandboxMode-0.3.0.zip) ready to upload. The zip's internal layout is BepInEx/plugins/SandboxMode/..., so users extract directly into their game folder.

Project layout

  • src/ — plugin source + csproj
  • src/Patches/ — Harmony patches, one file per game class hooked
  • src/SandboxState.cs — host-side flag tracking + marker-file IO
  • src/SandboxLabel.cs — the on-screen SANDBOX MODE IMGUI overlay
  • dist/ — release zips (gitignored)
  • scripts/ — build/release helpers

Distribution

Grab the latest SandboxMode-<version>.zip from the Releases page and extract it into your game folder.

To produce a fresh zip from source, run scripts/Build-Release.ps1; the output lands in dist/.


License

MIT © SaltedByte.


Credits

About

Sandbox Mode for Gamble With Your Friends — per-save toggle that grants $1T cash, all floors unlocked, 1-hour days, pinned bet quota. BepInEx 5 plugin.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors