Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
PlayerCountFixed
Lightweight REPO lobby player counter that safely shows current/max players for RoboUnion, MorePlayers, and MorePlayersSimple rooms.
By khalil
| Last updated | a day ago |
| Total downloads | 650 |
| Total rating | 1 |
| Categories | Misc Client-side Server-side AI Generated Quality Of Life |
| Dependency string | khalil-PlayerCountFixed-1.0.0 |
| Dependants | 2 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.2100README
PlayerCountFixed
PlayerCountFixed is a lightweight BepInEx plugin for R.E.P.O. that adds a clean lobby player counter showing:
Players: current/max
It is designed for players who use expanded-lobby mods and want a simple, reliable player-count display without stutter, repeated console errors, or expensive UI scanning.
Important clarification
PlayerCountFixed is not a patched, forked, or repackaged version of any existing player-count mod.
This is a completely new plugin built from scratch. It only uses the same general idea of displaying the lobby player count. The implementation avoids the known problems reported in similar mods, including per-frame text writes, repeated global UI scans, and noisy error logging.
What it does
PlayerCountFixed displays the number of players currently in the room and the room's maximum player count on the lobby screen.
Example:
Players: 3/17
The counter appears in the lobby page using a compact yellow TextMeshPro label.
Supported expanded-lobby mods
PlayerCountFixed can read the host-side configured max player value from these commonly used expanded-lobby mods when you are hosting:
- RoboUnion
- MorePlayers
- MorePlayersSimple
These mods are not required. If none of them are loaded, PlayerCountFixed falls back to the room max value reported by Photon.
How it works
PlayerCountFixed follows a conservative runtime flow:
- During startup, it checks which supported expanded-lobby plugin is actually loaded through BepInEx's Chainloader.
- It does not decide based on leftover config files or whether a DLL merely exists on disk.
- When the lobby page opens, it attaches one TextMeshPro label to the lobby UI.
- The label refreshes at a small interval instead of every frame.
- Text is only written when the displayed value changes.
- Errors are guarded and logged at most once to avoid console spam.
This means the plugin does not perform repeated global Resources.FindObjectsOfTypeAll scans and does not continuously rewrite UI text every frame.
Hosting a room
If you are the room host / Photon master client, PlayerCountFixed reads the configured maximum player count from the loaded expanded-lobby mod when possible:
- RoboUnion: reads
General / MaxPlayers;0is treated as the default 6 players. - MorePlayers: reads
General / Max Players. - MorePlayersSimple: reads
General / MaxPlayersPublicorGeneral / MaxPlayersPrivatedepending on whether the current room is public or private.
If config reading fails for any reason, the display safely falls back to PhotonNetwork.CurrentRoom.MaxPlayers.
Joining someone else's room
When you join another player's room, PlayerCountFixed does not use your local expanded-lobby config. Your local config may not match the host's settings.
Instead, joined-room clients display the actual max player value reported by Photon for that room.
This prevents wrong displays such as showing your local 20 player config when the host actually created a 10 player room.
Installation
Install with Thunderstore Mod Manager / r2modman, or manually copy:
BepInEx/plugins/PlayerCountFixed.dll
into your game's BepInEx plugins folder.
Compatibility notes
- Requires BepInEx 5.
- Works without any expanded-lobby mod installed.
- Supports RoboUnion, MorePlayers, and MorePlayersSimple for host-side configured max player detection.
- If multiple supported expanded-lobby mods are loaded, PlayerCountFixed uses this priority:
MorePlayersSimple > MorePlayers > RoboUnion.
Why use PlayerCountFixed?
PlayerCountFixed was created to provide the same useful lobby information that players want, while avoiding the reliability and performance issues seen in similar player-count display mods.
It is intentionally small, focused, and defensive:
- no global UI polling loop;
- no every-frame TextMeshPro assignment;
- no reliance on stale config files;
- no hard dependency on expanded-lobby mods;
- safe fallback when joining other players;
- one-time guarded logging instead of console spam.