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.
StatsBoard
A sign that shows your group's totals: deaths, bosses killed, trees cut, and distance sailed. Kept by the server.
By FlyingHose
| Last updated | an hour ago |
| Total downloads | 8 |
| Total rating | 0 |
| Categories | Server-side Utility |
| Dependency string | FlyingHose-StatsBoard-1.0.0 |
| Dependants | 1 other package depends on this package |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.
Preferred version: 5.4.2360README
Stats Board
Part of FlyingHose's Modpack. Needs only BepInEx.
A sign that shows what your group has done together: deaths, bosses killed, trees cut, and distance sailed. The server keeps the numbers, so they are the same for everyone and they survive restarts.
Sign tags
Place a normal sign and type one of these as its whole text. Case does not matter.
| Text | What the sign shows |
|---|---|
[stats] |
The four main totals: deaths, bosses killed, trees cut, distance sailed |
[stats deaths] |
Total deaths |
[stats bosses] |
Total bosses killed |
[stats trees] |
Total trees cut |
[stats sailed] |
Total distance sailed |
[stats enemies] |
Total enemies killed |
[stats built] |
Total pieces built |
[stats walked] |
Total distance walked |
[stats top deaths] |
The top three players in that stat |
[stats top ...] works with any of the stats above, for example [stats top trees] or [stats top sailed].
A few other words work too: boss, tree, sail, enemy, kills, builds, pieces, and walk.
Distances show in metres below a kilometre and in kilometres after that, such as 850 m or 12.4 km.
A sign that has other text around the tag is an ordinary sign. A tag with a stat name that does not exist is also left as typed, so you can see the typo.
The sign's real text stays the tag
The sign never stores the numbers. The text saved in the world is still [stats] or whatever tag you typed. Each player's game swaps in the current totals for display. If you remove the mod, the sign is an ordinary sign that says [stats]. When you edit a stats sign, the box opens with the tag.
What is counted
The mod reads the counters the game already keeps for each player and adds them up for the group.
- Deaths: every time a player dies.
- Bosses killed and enemies killed: each player who hit the creature reports their share of the kill, so the group's total goes up by one. A player who left before the kill takes their share with them, so a kill can count a little under one. On a top list a share that rounds to nothing is left off.
- Trees cut: trees that are felled. Logs are not counted.
- Distance sailed: distance travelled on a ship, including as a passenger.
- Distance walked: distance on foot, walking or running.
- Pieces built: pieces placed.
Nothing counts while the game would refuse that player an achievement: after cheats in that session, in a world the game marks as cheated, or with cheated items in the inventory.
Totals start when the mod is installed. The mod cannot see what happened before, so existing character stats are not added in.
Where the server keeps the totals
The server keeps one file per world and saves it about 15 seconds after the numbers change and when the game closes:
BepInEx/config/YesuBuildKit.StatsBoard/<world name>.stats
On a game you host, your game is the server and the file is on your machine. It is plain text. If the file is damaged, the server moves it aside as <world name>.stats.bad-<date> and starts that world with empty totals. It never writes over a damaged file.
Each client sends its own increments to the server in a batch every few seconds and when the player logs out. The server adds them up and sends the totals back to everyone, at most about once every two seconds. A player who joins gets the current totals at once. A sign updates when new totals arrive.
Everyone needs the mod
Install on the server and on every client. The server refuses a client that does not have the mod or has a different version. A player without the mod would see a sign that says [stats] and would not be counted.
The server's config wins. Values marked "Synced" in the config file are taken from the server while you are connected.
Settings
| Setting | Default | Who decides | What it does |
|---|---|---|---|
General.Enabled |
true |
each machine | Master switch. Off means no patches and no network messages. Needs a restart. A server with the mod on refuses a client that has it off. |
General.DebugLogging |
false |
each machine | Detailed lines in the BepInEx log. |
Stats.Enabled |
true |
the server | Counting and the signs on or off for everyone. When off the server ignores reports, and within a couple of seconds signs show the text they were typed with. |
Stats.ShowPerPlayer |
true |
the server | Keep and show each player's numbers. When off, the server sends only group totals and [stats top deaths] shows the total instead. |
The two server settings can be set for one world only, and changed from inside the game with Althing.
Console command
On the host or a game where you are the server, open the game's console (F5, when the game was started with -console) and type:
statsboardshows the four main totals.statsboard reset confirmsets every total and every player's numbers back to zero for this world. It saves at once and cannot be undone. Without the wordconfirmit only explains what it would do.
Limits
- The server limits how much one player can add to each stat in one message and per minute, and ignores messages that are malformed or that arrive too fast. The limits are far above what normal play produces.
- Player names are kept to 32 characters, with angle brackets and control characters removed, so a name cannot break a sign. A top list shows the first 16.
- Each player's numbers are kept under their character name. Two characters with the same name share one row, and a renamed character starts a new one.
- The server keeps per-player numbers for at most 128 players per world. Players past that still count toward the group totals.
- The four-line summary and a top list of three are up to about 33 characters wide. They read best on a larger or wider sign.