About Pop Control
PopControl
PopControl.cs is an Oxide/uMod Covalence plugin for Rust that dynamically adjusts server population limits and provides chat/console population tools.
Features
- Elastic max player scaling based on current online population.
- Configurable minimum/maximum bounds and optional never-drop-below-online behavior.
- Debounced updates when players connect/disconnect.
- Private /pop command for instant population stats.
- Public !pop command with global cooldown.
- Optional private cooldown feedback for !pop spam attempts.
- Optional periodic broadcast of population stats.
- Chat icon/avatar support via configurable SteamID64 and mode selection.
- Admin console helpers for status, apply, bot icon, and test messages.
Configuration
The repository includes config/PopControl.json with these defaults (also matching what the plugin generates on first load):
{ "MaxPlayersOffset": 1, "CooldownPeriodSeconds": 10.0, "MaximumPopulation": 200, "MinimumPopulation": 100, "ConsoleMessagesEnabled": true, "NeverBelowOnline": true, "EnableChatCommands": true, "EnablePeriodicBroadcasts": false, "BroadcastIntervalSeconds": 300.0, "PopCommandCooldownSeconds": 10.0, "ShowPopCooldownFeedback": true, "ColorLabel": "#ff2E36", "ColorNumber": "#FFFFFF", "BotName": "Population Bot", "BotSteamId": 76561199680521298, "UseMode2ForIcon": true }
Key Settings
- MaxPlayersOffset: Target max players = online + offset (before bounds).
- MinimumPopulation / MaximumPopulation: Clamp dynamic max player result.
- NeverBelowOnline: Ensures max player count never falls below active online count.
- CooldownPeriodSeconds: Debounce time after join/leave before recalculating.
- EnablePeriodicBroadcasts: Enables timed global population messages.
- BroadcastIntervalSeconds: Seconds between periodic broadcast messages.
- PopCommandCooldownSeconds: Global cooldown for !pop command.
- ShowPopCooldownFeedback: When enabled, tells the triggering player how many seconds remain if !pop is still on cooldown.
- BotSteamId: Steam profile used for chat icon/avatar (0 disables forced icon).
Commands
Chat Commands
-
/pop
- Sends population stats privately to the requester.
-
!pop
- Broadcasts population stats to all online players.
- Subject to global cooldown (PopCommandCooldownSeconds).
- If ShowPopCooldownFeedback is enabled, the triggering player receives a short private cooldown-remaining message when blocked.
Console Commands (Server / Owner)
-
ep.apply
- Immediately recalculates and applies max player target.
-
ep.status
- Prints current population and configuration status.
-
ep.botid <steamid64|off>
- Sets avatar SteamID64 or disables forced icon.
-
ep.iconmode <2|name>
- Chooses chat icon mode/signature.
-
ep.testmsg
- Sends a test population message using current icon settings.
How Scaling Works
- Read current online player count.
- Compute target = online + MaxPlayersOffset.
- Clamp to MinimumPopulation and MaximumPopulation.
- If NeverBelowOnline is enabled, force target >= online.
- Apply ConVar.Server.maxplayers = target if changed.
Installation
- Copy plugins/PopControl.cs to your Rust server plugins folder:
- oxide/plugins/PopControl.cs
- Copy config/PopControl.json to your server config folder:
- oxide/config/PopControl.json
- Reload plugin:
- oxide.reload PopControl
Notes
- The plugin uses Rust/Oxide runtime objects (BasePlayer, ConVar.Server, ServerMgr, ConsoleSystem).
- If BotSteamId is invalid, it is reset to a default valid-looking SteamID64 during config load.
- Color output in chat uses RichText color tags.