You are viewing a potentially older version of this package.
View all versions.
FairShare
Automatically shares any skin you win from the Reel of Fortune with everyone else in your lobby.
By LicenseX
| Date uploaded | a month ago |
| Version | 1.0.0 |
| Download link | LicenseX-FairShare-1.0.0.zip |
| Downloads | 38 |
| Dependency string | LicenseX-FairShare-1.0.0 |
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.
CHANGELOG
Changelog
1.0.1
- Fixed Harmony patch crash on load: the field-injection parameter names
(
_playerWhoRolled,_itemIndex,_skinIndex) were missing the leading underscore that's actually part of SlotMachine's field names, so Harmony couldn't resolve them and the whole plugin failed to load. FairShare now loads and patches correctly.
1.0.0
- Initial release. Automatically shares Reel of Fortune ("drip machine") skin wins with everyone else in the lobby via a FishNet broadcast, using the game's own SaveManager.UnlockSkin() to apply it on each client.