FairShare
Automatically shares any skin you win from the Reel of Fortune with everyone else in your lobby.
By LicenseX
| Last updated | 3 weeks ago |
| Total downloads | 1527 |
| Total rating | 1 |
| Categories | Mods Misc |
| Dependency string | LicenseX-FairShare-1.0.1 |
| Dependants | 0 other packages depend on this package |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2305README
FairShare
Whenever you win a new skin from the Reel of Fortune ("drip machine"), this mod automatically unlocks that same skin for every other player in your lobby too.
How it works
- The game's own
SlotMachine.OnRollFinished()already decides locally whether you were the one who rolled (_playerWhoRolled.Owner.IsLocalClient), and if so callsSaveManager.UnlockSkin(itemID, skinIndex)to save it to your local save file. This mod adds a Harmony postfix to that exact method, so it only fires at the same moment the base game itself unlocks the skin for you. - It then sends a small FishNet broadcast message (
SkinShareBroadcast) to the host, who relays it to every other connected client. - Each client that receives it calls the game's own
SaveManager.UnlockSkin(itemID, skinIndex)- the exact same public method the base game uses - so the skin is unlocked and saved to their save file too, the same way as if they'd rolled it themselves.
No save-file format was reverse engineered or hand-edited - the mod only calls methods the game already ships.
Requirements
- BepInEx 5.4.23 (Mono) - confirmed against your BepInExPack v5.4.2305 install.
- Works in any lobby where FishNet networking is active (i.e. actually playing co-op together, not local single player).
Installing
- Build (see below) or grab
FairShare.dllfrom the release. - Drop
FairShare.dllintoBepInEx/plugins/FairShare/. - Launch the game - every player in the lobby needs this mod installed for sharing to work both ways.
Building it yourself
Requires Mono's mcs compiler (or any C# compiler) and these reference DLLs,
which are NOT redistributed here - copy them from your own game install and
BepInEx pack into lib/:
Assembly-CSharp.dll,FishNet.Runtime.dll,UnityEngine.CoreModule.dll,UnityEngine.dll,GameKit.Dependencies.dll,netstandard.dll(fromHow to Fish_Data/Managed/)BepInEx.dll,0Harmony.dll(fromBepInEx/core/)
Then run build.sh (Linux/Mac/WSL) or the equivalent mcs command on Windows
with Mono installed.
Notes / things to decide
- Currently this is permanent - the shared skin gets written into each player's save file exactly like a real unlock, so it persists across sessions. If you'd rather it only apply for the current session (no save mutation), that's a small change - just say the word.
- If you want unlocks to only sync one-directionally (e.g. only the host's rolls get shared, not everyone's), that's also a quick tweak to the Harmony patch guard.