Bagr-DamageMeter icon

DamageMeter

Boss fight stats for co-op: live panel plus a table after each kill with damage, taken, blocks, parries and deaths per player, and an inventory log. Same DLL on server and clients.

By Bagr
Last updated 36 minutes ago
Total downloads 346
Total rating 0 
Categories Server-side Client-side Utility AI Generated
Dependency string Bagr-DamageMeter-3.4.0
Dependants 1 other package depends on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2350 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.2350

README

DamageMeter

Boss fight stats and an inventory log for a co-op Valheim server. Same DLL on the server and on every client.

What you get

  • After every boss kill a table is shown on screen (about 25 s) and in the chat: damage dealt (with % and DPS, max hit), damage taken, damage blocked, number of blocks, perfect parries, deaths, an "other / DoT" line and a few joke awards. Players without the mod show as "n/a". A death recap line says what killed whom.
  • Server log BepInEx/dmgmeter.log: BOSS lines with the full table, MOB lines for bigger fights, DEALT lines every 5 minutes, INV lines (see below). History and records are kept in BepInEx/dmgmeter-data/.
  • Chat / F5 console command /dmeter (not /dmg, that name is used by Server devcommands): last, top [damage|taken|blocked|parry|deaths|kills], me, records, peers, inv [name].
  • Inventory log (new in 1.3.0): every client reports a snapshot of its inventory and AdventureBackpacks backpack at login and whenever it changes. The server logs what changed since that player was last seen, so you can tell what was gained or lost between two logins. Players are told about this in the chat at login. Clients cannot switch it off; the server admin controls it with InventoryLog in the server config, and the server logs INV ... MISSING for a player who sends no report within two minutes after login.

Live panel (new in 1.4.0)

During a boss fight (and bigger fights) a compact panel in the style of the game's own UI shows, per player: damage, share with a colour bar, DPS, damage taken, perfect parries and deaths. Your own row is gold and framed. It fades in and out and hides itself in menus, inventory and map.

  • F8 shows or hides it, Shift + F8 resets the position. /dmeter live toggles it, /dmeter livetest shows a demo for 20 seconds.
  • Size, position, width, opacity and bars are in the config (section "Live panel"). By default it is small and sits on the right side of the screen, away from the Groups list.
  • The look follows the CombatMeter mod by Likhtenvald (MIT), see THIRD_PARTY_NOTICES.md.

Live panel settings (3.3.0)

Press F9 in the game to switch the mode, or open the config with F1 (section "Live panel"):

  • Mode: Near me (default) shows fights around you or that you take part in, Bosses only hides the panel for normal fights, Everything shows the latest fight anywhere, Off shows nothing.
  • Range / Boss range: how close a fight must be (meters). Boss range 0 shows boss fights from anywhere.
  • Minimum damage, Keep after fight, Only my fights.
  • F8 shows or hides the panel, Shift + F8 resets its position.

Expedition: one long meter for the whole party (new in 3.4.0)

For a long trip (an hour in the Mistlands, a mining run) any player can start an expedition. From then on the server adds up everything every player deals, takes, blocks, kills and dies to, bosses included, until somebody stops it.

  • Start / stop: press F10 (Expedition key) or type /dmeter exp start, /dmeter exp stop, /dmeter exp status. The starter (or an admin) stops it. The server option ExpeditionStart can limit starting to admins.
  • Live panel: while an expedition runs, its totals (damage, %, DPS over the time a player was really fighting, taken, kills, deaths) fill the panel whenever there is no fight to show. Set the mode (F9) to Expedition to show only the totals, or turn off Show expedition in the config.
  • At the end: a summary goes into the chat for everybody (kills, damage per player, what was killed, bosses) and into the server log (EXPEDITION line) and dmgmeter-data/expeditions.jsonl.
  • A running expedition survives a server restart.

How it works

  • Damage dealt is measured on the client that owns the creature (after armor and resistances), so it is the real HP removed. Taken, blocked, parries, deaths and inventory are measured by each player's own game.
  • Everything goes to the server over the game's own routed RPC; the server builds the table and sends it back to all players.
  • Older versions (1.0 and 1.1) keep working with a 3.0 server; they just report less.

Notes

  • Poison and fire ticks have no attacker in the game; they are credited to the last player who applied fire or poison to that creature (1.2+), otherwise counted as "other / DoT".
  • Items inside backpacks other than AdventureBackpacks are not included.

Changelog

  • 3.4.0 expedition: a long measurement for the whole party that you start and stop by hand (F10 or /dmeter exp), shown on the live panel, summed up in the chat and saved in expeditions.jsonl. New mode Expedition for F9. New icon.
  • 3.3.0 choose what the live panel shows. Mode in the config (F1) or the F9 key: Near me (default: fights around you or that you take part in), Bosses only, Everything (the latest fight anywhere), Off. Also Range, Boss range (0 = from anywhere), Minimum damage, Keep after fight, Only my fights, and ChatSummaries (the fight summary the server writes into the chat). The server now sends every running fight and each player's game picks one; players with an older DamageMeter get a server-side filter by distance (server options LivePanelRange and LivePanelBossRange).
  • 3.2.2 the column names of the live panel (Player, Damage, %, DPS, Taken, Parry, Kills, Died) are shown again (they were empty since 1.4.0); saved inventory snapshots from before 3.0 are read again, so the login comparison keeps working after the update.
  • 3.2.1 inventory reports can no longer be switched off by a client (the ReportInventory option is gone). The server admin has InventoryLog in the server config, and the server logs a MISSING line for a player who never sends a report.
  • 3.2.0 combat sessions and kills: every fight against normal enemies in one place is one session until there is a 25 s pause. The live panel shows the running session with a new Kills column (last hit gets the kill), the server log gets a SESSION line, big sessions (8+ kills, server option SessionChatMinKills) are summed up in the chat, /dmeter top kills shows all-time kills and /dmeter me includes yours. Bosses stay separate. Older clients still get the old panel format.
  • 3.1.0 live panel: bigger default (scale 1.2, bottom right corner), non-boss fights show it from 400 damage instead of 2000 (server option LivePanelMinDamage), the result stays on screen 8 s after the fight (LivePanelHoldSeconds). The new default size and position are applied once to existing configs.
  • 3.0.0 correctness and trust release. Twin bosses (two instances at once) are reported as ONE fight ("SeekerQueen x2"), a boss kill is confirmed from the world state if the kill event is lost, damage taken no longer opens phantom fights, late events of a dead boss are dropped, lifetime stats only count players who took part. Events carry their own time and position, and are sent while you are dead. The server uses the player name of the connection (no more spoofing other players), checks the sender of every message, limits parallel fights, cleans names and texts, and /dmeter inv <name> is for yourself or admins only. All methods are compiled at start, to avoid "Method has zero rva" when the DLL file is replaced under a running game or server. Designed to work with older clients and servers (untested until the first live fights).
  • 1.4.2 the live panel width follows the longest player name (config: Auto width).
  • 1.4.1 smaller default size of the live panel (scale 0.8, width 400).
  • 1.4.0 live panel with contribution bars, DPS, taken, parries and deaths; blocks, parries and damage taken are now also counted in bigger non-boss fights.
  • 1.3.0 inventory and backpack snapshots with a login diff on the server, /dmeter inv, notice in the chat.
  • 1.2.0 awards, death recap, history and records, /dmeter commands, DPS and max hit, DoT credited to the last applier.
  • 1.1.0 boss summary table (dealt, taken, blocked, blocks, parries, deaths, other/DoT), stars fix.
  • 1.0.0 first release (damage dealt only).