Files
factorio-expcluster/exp_server_ups
bbassieandClaude Opus 5.5 fa26bc380e Drop the empty web entrypoints
clusterio#1140 no longer reports plugins without a web entrypoint as
failing to load, so the empty web modules from 99d47cf1 can go. The
browser tsconfig of these plugins now checks index.ts instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 23:58:51 +00:00
..
2026-10-13 21:01:48 +01:00
2026-10-28 23:58:51 +00:00
2025-09-12 20:47:32 +01:00

ExpGaming - Server UPS

Shows the UPS the server is running at in the top right of the screen, below the game's own UPS and clock. The label reads like 59.8 (99.7%), the second number being the UPS as a percentage of 60.

The label starts hidden. Players toggle it with /server-ups, also available as /sups and /ups. With exp_scenario loaded the command needs the exp_scenario.command.server_ups permission, which is granted by default.

The instance asks the game for the current tick over RCON once every update interval and divides the ticks passed by the time passed, averaged over the last average_interval updates. Each request also sends the last result, which updates the label for every online player. If auto_pause is enabled in factorio.settings, updates start when a player joins and stop when the last player leaves, otherwise they run from when the instance starts.

Config

All fields are on the instance.

Field Default Description
exp_server_ups.update_interval 1000 Time between updates in milliseconds.
exp_server_ups.average_interval 60 Number of updates the UPS is averaged over.

Lua

local ServerUps = require("modules/exp_server_ups")

ServerUps.refresh_online(ups) -- Set the label of every online player
ServerUps.get_main_label(player) -- The label of a player, created hidden if missing
ServerUps.set_visible(player, visible)

The instance calls /_rcon return exp_server_ups.refresh(ups), which updates the labels and returns game.tick.