You are viewing a potentially older version of this package. View all versions.
khalil-PlayerCountFixed-1.1.0 icon

PlayerCountFixed

Lightweight REPO lobby player counter that shows Photon current/max players with configurable UI position and font size.

By khalil
Date uploaded 3 days ago
Version 1.1.0
Download link khalil-PlayerCountFixed-1.1.0.zip
Downloads 791
Dependency string khalil-PlayerCountFixed-1.1.0

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100

README

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 want a simple, reliable player-count display for normal or expanded lobbies.

What it does

PlayerCountFixed displays the number of players currently in the room and the room's maximum player count on the lobby screen using the current Photon room state.

Example:

Players: 3/17

The counter appears in the lobby page using a compact yellow TextMeshPro label.

Expanded-lobby compatibility

Expanded-lobby mods are not required. PlayerCountFixed works with expanded-lobby mods that set the Photon room max player count correctly.

How it works

PlayerCountFixed follows a conservative runtime flow:

  1. When the lobby page opens, it attaches one TextMeshPro label to the lobby UI.
  2. The label refreshes every 0.25 seconds instead of every frame.
  3. Text is only written when the displayed value changes.
  4. The display uses Photon room state: Players: PhotonNetwork.CurrentRoom.PlayerCount/PhotonNetwork.CurrentRoom.MaxPlayers.
  5. 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.

UI configuration

PlayerCountFixed creates these BepInEx config entries:

  • UI / Position X (1080p) — default 240.
  • UI / Position Y (1080p) — default 30.
  • UI / Font Size — default 22.
  • UI / Color Mode — default new; values new or old. new colors current/slash/max and turns current red when full; old uses plain all-yellow Players: current/max.

Position values are direct RectTransform anchored-position UI units relative to the top-left anchor and are clamped to safe non-negative ranges. The game/Unity UI hierarchy handles final screen scaling. Font size is clamped to a safe positive range. Runtime config changes or explicit config reloads update while the lobby counter exists; plain external .cfg file edits require a config reload or game restart.

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.
  • Works with expanded-lobby mods that correctly set Photon room max players.

问题反馈

CHANGELOG

Changelog

1.0.0

  • Initial Thunderstore release.
  • Added lobby player counter: Players: current/max.
  • Uses Photon room max players for universal expanded-lobby compatibility instead of mod-specific config reflection.
  • Added configurable UI position and font size.
  • Added lightweight UI update loop without global polling or per-frame text assignment.