You are viewing a potentially older version of this package. View all versions.
FlyingHose-StatsBoard-1.0.0 icon

StatsBoard

A sign that shows your group's totals: deaths, bosses killed, trees cut, and distance sailed. Kept by the server.

Date uploaded 2 hours ago
Version 1.0.0
Download link FlyingHose-StatsBoard-1.0.0.zip
Downloads 12
Dependency string FlyingHose-StatsBoard-1.0.0

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2360 icon
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.2360

README

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:

  • statsboard shows the four main totals.
  • statsboard reset confirm sets every total and every player's numbers back to zero for this world. It saves at once and cannot be undone. Without the word confirm it 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.

CHANGELOG

1.0.0

  • 1.0 with the rest of the suite.
  • A top list no longer shows a player whose share of boss kills rounds to 0 (a boss three players killed gives each a third).
  • The server forgets a player's rate allowance when they leave.
  • The README lists every setting with its default, the other tag words, how kills are shared, when nothing counts, how often the file is saved, and that numbers are kept under the character name.

0.1.1

  • Settings can now be set per world, and the host or a server admin can change them in the game with the Althing mod.

0.1.0

  • First release.
  • A sign whose text is [stats] shows the group's deaths, bosses killed, trees cut, and distance sailed. [stats deaths] and the other single-stat tags show one total, and [stats top deaths] shows the top three players.
  • Also counted: enemies killed, pieces built, and distance walked.
  • The server keeps the totals for each world in a file. Totals start when the mod is installed.
  • The sign's real text stays the tag you typed. Only what each player sees changes.
  • Server-synced config and a version check on join.