Skip to content

SaltedByte/cleanercasinoux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cleaner Casino UX

A BepInEx 5 mod for Gamble With Your Friends (Unity Mono, Mirror multiplayer) that gets two specific kinds of clutter out of your way during a co-op run:

  • Friends' money popups go to the bottom-left. When a friend bets, wins, or loses, the colored +$X / -$X chip with their name no longer pops up across the upper-center of the screen — it stacks neatly in the bottom-left corner. Same logic, same animation, just out of your sightline while you're focused on your own game.
  • Roaming NPCs are removed. No more pedestrians wandering between you and a reaction-based cash-out button at the worst possible moment. Host-only patch — Mirror replicates the empty NPC list to every connected client, so friends without the mod also see no NPCs as long as the host has it.

A third toggle is available as a less-aggressive alternative: keep NPCs around for atmosphere but make them invisible to the player-interact raycast, so clicks pass through them even when one walks in front of you.

⚠️ Multiplayer note: the popup relocation is client-side — every player who wants their popups in bottom-left needs the mod. NPC removal is host-only — only the host needs the mod for everyone to see no NPCs.


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 Cleaner Casino UX

  1. Download the latest release zip (CleanerCasinoUX-x.y.z.zip) from the releases page.
  2. Extract it directly into your game folder. The contents are structured as BepInEx/plugins/CleanerCasinoUX/CleanerCasinoUX.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.

Configuration

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

Section Setting Default Description
MoneyPopup Relocate true Move the friends-earned/lost-money popup from the upper-center of the screen to the bottom-left. Same content and animation, different anchor.
MoneyPopup MarginX 32 Pixels of padding from the left edge of the screen to the popup anchor. Increase if the popup clips into the casino HUD on the left.
MoneyPopup MarginY 32 Pixels of padding from the bottom edge of the screen to the popup anchor. Increase to push the popup further up.
NPCs DisableRoaming true Skip the casino's NPC spawn entirely on the host. With no roaming NPCs, no one walks in front of the table you're trying to click. Host-only effect — Mirror replicates to all clients automatically. Only the host needs the mod for this to take effect.
NPCs IgnoreInteractRays false Alternative to DisableRoaming: keep NPCs but make them invisible to the player-interact raycast, so clicks pass through them. NPCs still physically collide with you and walk around for atmosphere. Has no effect when DisableRoaming is true.

How it works

The mod hooks six game classes via Harmony:

Patch Target What it does
MoneyDisplay_BuildContainer MoneyDisplayAndFeedbacks.Start (postfix) On scene load, creates a custom RectTransform under the same Canvas as the original popup parent, anchored bottom-left with a VerticalLayoutGroup. Logged as [MoneyPopup] created custom container under canvas....
MoneyDisplay_ReparentPopup MoneyDisplayAndFeedbacks.SpawnMoneyChangeText (postfix) After each new popup is instantiated under the original FeedbackHolder, moves it into the custom bottom-left container and resets its anchors/pivot to (0,0) so the layout group stacks them cleanly.
NPC_DestroyOnStartServer NPC.OnStartServer (postfix) Fires on the host for every NPC (pre-placed in scenes or runtime-spawned by NPCSpawner). Calls NetworkServer.Destroy; Mirror replicates the destroy to all clients. The single hook that catches all NPC sources.
NPCSpawner_SkipSpawnAll NPCSpawner.SpawnAllCoroutine (prefix) Optimization: short-circuits the all-floors spawn coroutine to an empty enumerator when DisableRoaming is on, so we don't pay nav-mesh sampling work for NPCs we'd destroy in OnStartServer anyway.
NPCSpawner_SkipSpawnFloor NPCSpawner.SpawnNPCsForFloor (prefix) Same optimization for the elevator-floor spawn path triggered by ElevatorManager.
PlayerInteract_FilterNPCRaycasts PlayerInteract.RaycastInteractable (prefix) When IgnoreInteractRays is on, replaces the method body with a near-identical reimplementation that skips any hit whose collider has an NPC component on it or its parents. Disabled by default.

The popup relocation works by bypassing the original parent transform entirely: rather than fight whatever wrapper component centers the popups in the vanilla layout, the mod creates its own container and reparents each spawned popup as it appears. The original FeedbackHolder is left alone.


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.
NPCs still roaming on a non-host client The host doesn't have the mod NPC removal is host-only; install on the host's machine.
Popups still appear at upper-center Mod loaded but [MoneyPopup] created custom container log line is missing Paste your LogOutput.log — most likely the canvas can't be found and there'll be a LogWarning line explaining why.
Cash-out button still gets blocked by NPCs IgnoreInteractRays is false and you have DisableRoaming off Either flip DisableRoaming to true (recommended) or IgnoreInteractRays to true — both fix the click-blocking.

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\CleanerCasinoUX.csproj -c Release

The build automatically copies the resulting DLL into <game>\BepInEx\plugins\CleanerCasinoUX\. The game's install path is hard-coded in src/CleanerCasinoUX.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/CleanerCasinoUX-0.3.0.zip) ready to upload. The zip's internal layout is BepInEx/plugins/CleanerCasinoUX/..., so users extract directly into their game folder.

Project layout

  • src/ — plugin source + csproj
  • src/Patches/ — Harmony patches, one file per patch class
  • src/PopupContainer.cs — owns the custom bottom-left RectTransform created at scene load
  • dist/ — release zips (gitignored)
  • scripts/ — build/release helpers

Distribution

Grab the latest CleanerCasinoUX-<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

BepInEx 5 mod for Gamble With Your Friends: friends' money popups relocated to bottom-left, roaming NPCs removed for cleaner casino UX.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors