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.
ValheimDiscordRelay
Relay Valheim chat and shouts to Discord via webhooks, with client screenshots, hotkey video clips, automatic player death and boss death videos plus server lifecycle and intercepted player arrival-leaving notifications.
By KydlDev
| Date uploaded | a day ago |
| Version | 2.1.2 |
| Download link | KydlDev-ValheimDiscordRelay-2.1.2.zip |
| Downloads | 11 |
| Dependency string | KydlDev-ValheimDiscordRelay-2.1.2 |
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.2360KydlDev-KydlCore
Shared runtime for all KydlDev mods: one UI root and theme, the KY hub window (F6; the one menu of every KydlDev mod) and the KY-Items category and registry.
Preferred version: 1.2.1README
Valheim Discord Relay
One BepInEx plugin for Valheim that connects your world to Discord through webhooks. It relays chat, announces deaths, boss kills, players joining and leaving and server restarts, posts a weekly statistics report, and lets players send screenshots and short video clips with one key press.
The plugin is a single DLL. It contains a server part and a client part; each side activates only where it is needed.
Contents
- What it can do
- Requirements
- Installation and updating
- Quick start
- Configuration
- Features in detail
- Files the mod creates
- Security and privacy
- Logs and troubleshooting
- Credits and licence
What it can do
| Feature | In one line |
|---|---|
| Chat relay | Normal chat and shouts go to Discord, each with its own webhook, shown under the player's name. |
| Death messages | A randomly chosen, cause-specific message (317 in total) is shouted in game and posted to Discord when a player dies, with or without a video. |
| Death videos | A short animated WebP of the player's death (seconds before and after) is posted with the message, ending on a cinematic death camera. |
| Boss announcements | An embed with the boss's portrait and the top damage dealer, plus an optional short video of the boss dying, and a line in the in-game chat. |
| Clips | Press a key and the last 4 and next 4 seconds are posted as a short video. |
| Screenshots | Press a key and the current game screen is posted, with automatic black-screen protection. |
| Server notifications | Server is up / restarted / going down. |
| Player notifications | "Has joined the world" / "had to leave us", with the current population. |
| Weekly report | Once a week, one Discord message per tab: players, bosses, mobs killed, killer mobs, death causes and highest hits, with a top 5 for the server and for every player. |
| In-game report window | Press a key to see the same numbers as they stand right now, in a resizable, sortable, CSS-styleable window. |
| Version check | The server can refuse players whose copy of the mod is missing or is not exactly the server's version. |
| Admin controls | Webhooks and settings are set once on the server and synced to players; settings can be locked to admins. Every feature has its own switch. |
Requirements
- Valheim 1.0.30
- BepInEx 5.4.2360 (BepInEx 5.4.23.6)
- KydlCore 1.2.0 (the KydlDev shared runtime: the KY hub window, the Settings tab and the shared log). It is installed with the mod by a mod manager, and is needed on the dedicated server as well.
- Install the mod on the dedicated server and on every player's game, all with exactly the same version. The server refuses players who have no mod, an older version or a newer version (see Version check).
- Worlds hosted from Valheim's own menu (no dedicated server) work too: install the mod on the host and set the webhook URLs in the host's config. The same version check applies to the players who join the host.
- Death videos, boss videos and clips are encoded with a bundled Windows program (libwebp's
img2webp.exe). A game that cannot run it still sends the death and boss messages, without the video; a clip then fails with a notice in game.
Installation and updating
Install the Thunderstore/Hexium package, or place ValheimDiscordRelay.dll in BepInEx/plugins/ValheimDiscordRelay/. Do this on the server and on every client.
Updating from 1.x: version 2.0.0 is one plugin with a new id (com.kydldev.ValheimDiscordRelay) and one new config file, BepInEx/config/com.kydldev.ValheimDiscordRelay.cfg. The old ValheimDiscordRelay.cfg is no longer read: remove it, start the game once so the new file is written, then fill in your webhooks again (or paste them into the KY hub, see below). Each section's Enable switch is now simply Enable, and the [Admin] section is now [General]. Remove the old 1.x plugin file so only one copy loads.
Quick start
- In Discord, create a webhook for each feature you want (Channel settings → Integrations → Webhooks). You may use one channel for everything, but see Security and privacy for the webhooks that players' games can read.
- Start the dedicated server once with the mod installed so
BepInEx/config/com.kydldev.ValheimDiscordRelay.cfgis created. - Stop the server, open the file and paste each webhook URL into its
Server - Webhook URLsetting (see Configuration). A feature whose webhook is empty sends nothing. - Start the server. Players who join with the same mod version receive the shared webhooks and settings automatically; they do not enter webhooks themselves.
- Optional: set
[General] Server - Log Successful Sends = truefor a while to see every delivery in the log.
Everything is enabled by default; with no webhook set, a feature simply logs a warning and does nothing.
Configuration
Everything is in one file: BepInEx/config/com.kydldev.ValheimDiscordRelay.cfg. Every entry is also on the Settings tab of this mod in the KY hub (F6) and in Configuration Manager (F1). Admins can change the server's values there while connected, and the change is saved on the server. BepInEx writes a description above every setting.
Setting names tell you who they belong to:
Server - ...— set by the server admin. Either synced to every player, or server only (used by the server and never sent anywhere).Client - ...— each player's own setting, never synced.
Every category has an Enable <Category> switch in [General] (admin, affects everyone) and most have a Client - Enabled switch (the player opting out). A feature that has both runs only when both are on. [General] Enable Mod (on by default) is the master switch: while it is off the whole mod is inert on that machine, and the same is true of a category whose Enable is off.
What is synced
The mod uses ServerSync for the shared settings and a small admin-only channel for the server-only ones. Players do not enter webhooks; the admin sets them in the server's config, in the file or live in the KY hub (F6).
- Webhooks the players' games upload to (screenshots, clips, death videos and messages, boss videos) are synced to every client. This is needed because each game posts its own file straight to Discord. It means these URLs are not secret; see Security and privacy.
- Webhooks only the server uses (chat, server notifications, player notifications, weekly report) stay on the server and are never sent to ordinary players. An admin's game fetches them over a separate admin-only channel (the server checks
adminlist.txton every request), so the admin can read and change them in the KY hub; nobody else receives them. - Settings marked synced below are sent to players and can only be changed by admins while
[General] Server - Lock Configurationis on; other players see them locked in the KY hub.
[General]
| Setting | Default | |
|---|---|---|
Enable Mod |
true |
Master switch of this mod on this machine. Off = nothing is relayed, captured or measured. |
Server - Lock Configuration |
true |
Synced. Only players in the server's adminlist.txt can change synced settings from their game. If false, any connected player can change them, webhook URLs included. Leave it on for a public server. |
Enable Chat |
true |
Synced. Enable the chat relay. |
Enable Screenshots |
true |
Synced. Turn off to disable screenshots for every player. |
Enable Clips |
true |
Synced. Turn off to disable clips for every player. |
Enable Player Deaths |
true |
Synced. Turn off to disable death messages, shouts and videos for every player. |
Enable Boss Death |
true |
Synced. Announce boss deaths. |
Enable Server Notifications |
true |
Admin only. Enable the feature. |
Enable Player Notifications |
true |
Synced. On: the mod posts its own join / leave messages and Valheim's "I have arrived!" shout is not relayed. Off: nothing is posted here, and the arrival shout is relayed as a normal shout. |
Enable Weekly Report |
true |
Synced. Collect the statistics and post the report. Turning it off also stops games from collecting. |
Server - Require Same Version |
true |
Server only. The server refuses players who do not have exactly the server's version of this mod, including players without it. See Version check. |
Server - Log Successful Sends |
false |
Synced. Log every successful Discord delivery (the server logs its own, each player's game logs its own uploads). |
[Chat]
| Setting | Default | |
|---|---|---|
Server - Webhook URL |
empty | Server only. Fallback, used when the Normal / Shout webhook is empty. |
Server - Normal Webhook URL, Server - Shout Webhook URL |
empty | Server only. Webhooks for normal chat and for shouts. |
Server - Max Message Length |
1800 |
Synced. Longest text sent to Discord (100–1900). |
Server - Name Display |
NameOnly |
Synced. NameOnly (Bjorn), NameWithNumber (Bjorn [1], for players with the same name) or NameWithIdSuffix (Bjorn [5678], last 4 characters of the platform ID). |
Server - Shout Prefix, Server - Normal Prefix |
dim red / dim cyan | Synced. ANSI colour codes placed before a shout / normal chat. Leave them alone unless you want other colours. |
Server - Queue Limit |
100 |
Synced. Most queued messages; the oldest are dropped when full (10–1000). The weekly report's messages are not counted and are never dropped by this limit. |
Server - Minimum Send Interval Ms |
250 |
Synced. Pause between webhook requests (50–5000), to stay under Discord's rate limits. |
Client - Enabled |
true |
Send the chat typed in this game to the server. Turn off to keep your chat out of Discord. |
Client - Max Message Length |
1000 |
Most characters sent from this game (1–1000). The server applies its own limit too. |
[Screenshots]
| Setting | Default | |
|---|---|---|
Server - Webhook URL |
empty | Synced. The GLOBAL screenshot webhook: normal screenshots go here, and so do the other two kinds when their own webhook is empty. |
Server - HUD Hidden Webhook URL |
empty | Synced. Webhook of the screenshots without HUD. Empty = the global webhook. |
Server - HUD And Player Hidden Webhook URL |
empty | Synced. Webhook of the screenshots without HUD and without the player. Empty = the global webhook. |
Client - Enabled |
true |
Allow screenshots in this game: off = none of the three kinds works. |
Client - Normal Enabled |
true |
Allow the normal screenshot. Off = its key does nothing and its F6 button is hidden. |
Client - HUD Hidden Enabled |
true |
Allow the screenshot without HUD (same). |
Client - HUD And Player Hidden Enabled |
true |
Allow the screenshot without HUD and player (same). |
Client - Key |
PageUp |
Normal screenshot (HUD on). None disables it. Works while other keys (walking, Shift) are held. |
Client - HUD Hidden Key |
P |
Screenshot without HUD (like Ctrl+F3). None disables it. Not while typing. |
Client - HUD And Player Hidden Key |
Alt + P |
Screenshot without HUD and without your own character. None disables it. Not while typing. |
Client - Pad |
LT + LB + D-pad up |
Gamepad combo for the normal screenshot. None disables it. |
Client - HUD Hidden Pad |
LT + LB + D-pad right |
Gamepad combo for the screenshot without HUD. None disables it. |
Client - HUD And Player Hidden Pad |
LT + LB + D-pad left |
Gamepad combo for the screenshot without HUD and player. None disables it. |
Client - Include Player Name |
true |
Use your character name as the Discord sender (otherwise Valheim Player). |
[Clips]
| Setting | Default | |
|---|---|---|
Server - Webhook URL |
empty | Synced. The clips webhook. |
Client - Enabled |
true |
Allow the clip key in this game. |
Client - Key |
PageDown |
None disables it. For two keys together write both, e.g. F9 + LeftControl: hold both, in any order; other keys held at the same time are ignored. |
Client - Pad |
LT + LB + D-pad down |
Gamepad combo for the clip. None disables it. |
Client - Include Player Name |
true |
Add the line <name> saved a clip. to the message that carries the clip. The Discord sender is always ValheimRelay Clips. |
Client - Pre Duration, Client - Post Duration |
4, 4 |
Seconds before / after the key press (2–4 each). |
Clips use the frame rate and resolution of [Player Deaths] Client - Video FPS and Client - Video Resolution.
[Player Deaths]
| Setting | Default | |
|---|---|---|
Server - Webhook URL |
empty | Synced. Webhook for death messages and videos. |
Client - Enabled |
true |
Announce this player's deaths (in-game shout and Discord message). |
Client - Video Enabled |
true |
Record a death video. Turn it off to send only the death message, with no video (for players who cannot or do not want to record). It also keeps the frame buffer that boss videos and clips reuse. |
Client - Video FPS |
30 |
20 or 30. Use 20 if your game runs slower than 30 FPS. |
Client - Video Resolution |
960x540 |
480x270, 640x360 or 960x540. |
Client - Video Pre Duration, Client - Video Post Duration |
4, 4 |
Seconds before / after the death (2–4 each). |
Client - Death Camera |
true |
After you die, raise the camera and look down at your body. It also moves your own view for those seconds. |
Client - Death Camera Height |
6 |
Metres the camera rises (1–15). |
Client - Death Camera Look At Killer |
true |
Turn the view towards whatever killed you, without losing your body from view. |
[Boss Death]
| Setting | Default | |
|---|---|---|
Server - Webhook URL |
empty | Synced. Used for both the embed and the video. |
Server - Webhook Username |
Boss Death Announcement! |
Synced. Sender name of the embed and the video. |
Server - Video Source |
Boss Owner |
Synced. Whose game records the boss video: Boss Owner or Last Attacker. |
Client - Enabled |
true |
Take part in boss announcements from this game (damage measuring and video). |
Client - Game Chat Message |
true |
Say the boss death in the in-game chat, even with no webhook set (only the game that owns the boss sends it). |
Client - Video Enabled |
true |
Upload the boss video from this game. Turn it off to post only the "has fallen" message, with no video (for PCs that cannot or should not record). |
Client - Video FPS, Client - Video Resolution |
30, 960x540 |
Only used when [Player Deaths] Client - Video Enabled is off; otherwise the boss video reuses the death video's frames. |
Client - Video Pre Duration, Client - Video Post Duration |
4, 4 |
Seconds before / after the boss dies (2–4 each). |
[Server Notifications]
| Setting | Default | |
|---|---|---|
Server - Webhook URL |
empty | Server only. |
Server - Use Discord Webhook Name |
false |
Synced. Off: messages are sent as Server notifications. On: Discord shows the name set on the webhook itself. |
Server - Up Notification, Server - Down Notification, Server - Restart Notification |
true |
Server only. Turn each message on or off. |
Server - Restart Window Seconds |
120 |
Server only. A startup within this many seconds of a clean shutdown counts as a restart (10–3600). |
[Player Notifications]
| Setting | Default | |
|---|---|---|
Server - Webhook URL |
empty | Server only. |
Server - Arrival Avatar URL, Server - Leave Avatar URL |
empty | Synced. Optional http(s) image URLs used as the webhook icon for join / leave messages. Anything else is ignored with one warning. |
[Weekly Report]
| Setting | Default | |
|---|---|---|
Server - Webhook URL |
empty | Server only. |
Server - Report Day |
Sunday |
Synced. Day the report is posted. |
Server - Report Time |
20:00 |
Synced. HH:mm, in the server's time zone. An invalid value falls back to 20:00 with a warning. |
Server - Send Test Report |
false |
Synced. Set to true to post a "(test)" report right now. It resets itself to false and does not clear the statistics. It also fires once at server start if it was left true. |
Server - Window Enabled |
true |
Synced. Let players open the in-game report window. Does not affect the Discord report or what is collected. |
Client - Enabled |
true |
Include this player in the report (this game measures your kills and damage and reports your deaths). |
Client - Window Key |
Home |
Opens and closes the window; None disables it. Two keys together are allowed, e.g. F8 + LeftControl. |
Client - Window Pad |
LT + LB + Select / Back |
Gamepad combo that opens and closes the window. None disables it. |
Client - Window Style |
Classic |
Look of the window: Classic (the original flat look) or Modern (rounded cards, pill tabs, gold primary button, key hints, Valheim's rune font for the title). Only the look changes. Applies the next time the window opens. |
Client - Window Scale |
0 |
0 follows your screen height (normal size at 1080p, larger on taller screens), or 0.7–2.0 to set it yourself. |
Client - Window Width, Client - Window Height |
0, 0 |
The size you gave the window by dragging its bottom-right corner. Saved automatically, so there is normally no need to edit them. 0 = the default size. |
Features in detail
Chat relay
Normal chat and shouts are relayed under the player's character name; whispers never are. The server works out who sent a message, so no Discord account linking is needed.
- Each player can send a burst of 10 lines and then about 1 per second; extra lines are not relayed.
- Text longer than
Server - Max Message Lengthis cut, and nothing the mod posts can ping anyone. - Valheim's own "I have arrived!" shout is dropped while
[Player Notifications]is on, and the mod's death shouts are never relayed to the chat webhook.
Manual screenshots
PageUp: a screenshot of the screen as you see it.P: the same without the HUD.Alt+P: without the HUD and without your own character.- The Screenshots tab of the F6 hub has one button per kind.
Each kind can have its own webhook, otherwise the global [Screenshots] Server - Webhook URL is used. A black screenshot is retried automatically with other capture methods; the one that works on your PC is remembered.
Clips
Press the clip key (PageDown by default) to save the 4 seconds before and the 4 seconds after the key press (2–4 s each). The clip is uploaded straight from your game as ValheimRelay Clips with the line <your name> saved a clip., and a short notice at the top left says when it was sent.
- Clips are cut from the same in-memory frame buffer as death videos, so they work even with death videos off, and Pre Duration cannot be more than 4 seconds.
- One clip at a time; a key press while a clip is still being made is ignored. Quitting the game cancels it.
Death messages
When the local player dies, the game works out what killed them from Valheim's hit data, picks a message for that kind of death and:
- shouts it in game chat 5 seconds after the death (so it never ends up in the video), and
- sends it to Discord through
[Player Deaths] Server - Webhook URL, in a code block, together with the death video. WithClient - Video Enabledoff, only the message is sent (for players who cannot or do not want to record).
Both need [General] Enable Player Deaths and Client - Enabled on. Without a webhook the shout still happens and the log says why nothing went to Discord. Logging out or quitting is never counted as a death.
Which message. Every kind of death has its own list, and one line is picked at random. A line is never used again within the last 7 deaths of the same kind (for a list shorter than 8 lines, as late as possible).
| Kind of death | Lines |
|---|---|
| Killed by an animal, no star | 25 |
| Killed by an animal, one star | 25 |
| Killed by an animal, two or more stars | 25 |
| Killed by another enemy | 26 |
| Killed by a boss or special enemy (names with a colour tag, such as Geirrhafa; the name is shown in red in Discord) | 16 |
| Environmental death (burning, freezing, poison, smoke, lava, falling, the edge of the world and so on; the line names the cause) | 26 |
| Crushed: falling tree, cart, boat, collapsing structure, stalagmite, drawbridge, turret, catapult, impact | 16 each (9 lists) |
| Drowned while swimming | 15 |
| Boiled in the Ashlands sea | 15 |
Unknown causes use Valheim's own death text, or got killed by Unknown.
Good to know.
- The killer is named correctly even if it dies before you do. Burning and poison deaths are credited to the creature that hit you shortly before, and a death caused by another player names that player.
- Creature stars are shown as emoji in Discord and as
(2 stars)in game chat. - Dying again within 30 seconds sends the message without a new video, and quitting while a video is still being made sends the message at once.
Death videos and the death camera
When the local player dies, the game records the configured time before and after the death and uploads it as an animated WebP straight from the client, together with the death message.
- Frames are kept in memory (the last ~4 seconds); disk is only used briefly while a video is encoded.
- The quality is lowered automatically until the file fits Discord's size limit. If no video can be made, only the message is sent.
- Encoding runs in the background at low priority and uses at most a quarter of your CPU cores. Failed uploads are retried with the same file.
- Death camera: with
Client - Death Cameraon, the camera rises and looks down at your body, and withLook At Killeralso turns towards whatever killed you. It moves your own view as well as the video.
Boss death announcements
When a boss dies, the server posts an embed to the boss webhook, and a player's game uploads a short video of the moment as a separate message. With [Boss Death] Client - Video Enabled off on the recording game, the embed is posted on its own, without a video.
The embed has the boss's portrait, the title {Boss} has fallen!, and a random quote naming the top damage dealer and their damage: 26 lines for a party kill and 26 for a solo kill, never repeated within the last 7 kills. With no recorded damage it says {Boss} has been defeated.
In-game chat. With [Boss Death] Client - Game Chat Message on (default), the game that owns the boss also shouts a short line in the game chat (5 lines, for example Eikthyr has fallen!). This needs no webhook.
The video is recorded by one game, chosen by Server - Video Source: Boss Owner (default, the game that owns the boss) or Last Attacker (the player who landed the last hit, using that player's own video settings; if that game cannot record, the boss owner's video is used). When a video is expected, the embed waits for it, at most 75 seconds.
- Damage is measured by the game that owns the boss, so that player needs the mod.
- Bosses recognised: Eikthyr, The Elder, Bonemass, Moder, Yagluth, The Queen, Fader and Kall Fimbulbringer (announced once, on the final phase). Any other boss is announced with its in-game name and no images.
- Announced once: a boss death reported again, for example after a restart, is not announced twice.
- The portraits are hosted on third-party image sites that Discord fetches; if one is down, the embed is posted without that picture.
Server notifications
[Server Notifications] posts Server **My World** is up., ... restarted. or ... is going down. A start within Server - Restart Window Seconds of a clean shutdown counts as a restart.
Player notifications
[Player Notifications] posts when someone joins or leaves, with the current population:
{Player.name} has joined the world. Population: {players.count}. Good luck!
{Player.name} had to leave us. Hope they had fun. Population: {players.count}.
There is exactly one join per connection and one leave per disconnect; nothing is posted on a respawn.
Weekly report (Discord)
[Weekly Report] posts the report once a week through its own webhook, one Discord message per tab:
| Tab | What it shows |
|---|---|
| Players | Players joined, bosses defeated, highest damage, and per player: mobs killed, bosses killed, deaths, total damage. |
| Bosses | One block per boss kill: killing blow, highest hit received, players it killed, and when. |
| Mobs killed | Top 5 mobs killed on the server, then per player. |
| Killer mobs | Top 5 mobs that killed players, then per player. |
| Death causes | The most common death causes, then per player. |
| Highest hits | Each player's biggest single hit: damage, weapon and enemy. |
- It is posted the first time the clock passes
Server - Report Day/Report Time(server time zone), or when the server next runs if it was off. - The week's numbers reset only after Discord accepted the whole report; a failed report is retried, without posting anything twice.
- Kills and damage are measured by the game that owns the creature, so that player needs the mod. Deaths are reported by the dying player's own game. All names are shown in English.
- Totals are saved in
BepInEx/cache/ValheimDiscordRelay.WeeklyReport.txt, so a restart does not lose the week. Delete the file to start over.
In-game weekly report window
Press Home (default) to open a window with the same numbers as the Discord report, as they stand right now. It is read-only.
- Summary tiles, the same tabs as the Discord report (the Players tab is sortable), and a countdown to the next report in your own time zone.
- The numbers refresh every 30 seconds while the window is open, or when you click Refresh.
- Drag the bottom-right corner to resize it; the size is remembered.
- It needs the mod on the server. Admins can turn it off for everyone with
[Weekly Report] Server - Window Enabled.
Styling the window (CSS)
Choose the look with [Weekly Report] Client - Window Style: Classic or Modern. The first time the window opens, its style sheet is written to BepInEx/config/ (ValheimDiscordRelay.report.uss or ValheimDiscordRelay.report.modern.uss). Edit it and reopen the window to see the change; delete it to get the original back.
:root { --vdr-gold: #7FD1FF; } /* change a colour everywhere it is used */
.vdr-tile-value { font-size: 26px; } /* bigger numbers in the tiles */
It is Unity's USS, a subset of CSS: classes, colours, variables, fonts and sizes work; @import, url() and animations do not. Anything not understood is skipped and listed in the log with its line number. The generated file lists every class.
Version check
The server lets a player in only when they run exactly the same version of this mod; other players see Valheim's "Incompatible version" message and the server log says why. Update the server and players together, or turn the check off with [General] Server - Require Same Version = false.
Files the mod creates
| File | Purpose |
|---|---|
BepInEx/config/com.kydldev.ValheimDiscordRelay.cfg |
All settings. |
BepInEx/config/ValheimDiscordRelay.report.uss |
Style sheet of the in-game report window, Classic style (created on first use). |
BepInEx/config/ValheimDiscordRelay.report.modern.uss |
The same for the Modern style (created the first time that style is used). |
BepInEx/cache/ValheimDiscordRelay.WeeklyReport.txt |
Weekly statistics and the counted boss kills (server). |
BepInEx/cache/ValheimDiscordRelay.BossAnnounced.txt |
Boss deaths already announced (server). |
BepInEx/cache/ValheimDiscordRelay.clean-shutdown |
Marks a clean shutdown so the next start can be told apart as a restart (server). |
BepInEx/cache/ValheimDiscordRelay.ScreenshotStrategy.txt |
The screenshot capture strategy that works on this PC (client). |
BepInEx/cache/ValheimDiscordRelay/WebPTool/ |
The video encoder, unpacked from the DLL (client). |
<system temp>/ValheimDiscordRelay/ |
Frames staged for a video while it is encoded; removed afterwards. |
Security and privacy
- Players can read the shared webhooks (screenshots, clips, death and boss videos), because each game uploads its own files. Use a dedicated webhook and channel for each, and delete a webhook in Discord if it leaks.
- Webhooks only the server uses (chat, server and player notifications, weekly report) are never sent to ordinary players.
- Keep
[General] Server - Lock Configurationon (default), otherwise any player can change synced settings, webhooks included. - Nothing can ping anyone: every message the mod sends has mentions disabled.
- What leaves a player's PC: only what the features send to your webhooks. The mod makes no other network requests.
- Opt-out: every
Client - Enabledswitch lets a player keep their chat, deaths, kills, screenshots and clips out of Discord and the report.
Logs and troubleshooting
Everything is written to the BepInEx log, BepInEx/LogOutput.log, under the source name ValheimDiscordRelay (the mod keeps no log file of its own). If nothing arrives in Discord:
- The webhook is empty. Screenshots, clips and videos need their webhook set in the server's config.
- A switch is off: the category's
Enable, orClient - Enabledon that player's game. - "Incompatible version" when joining: the player's copy of the mod is missing or not the server's version (see Version check).
- Message but no video: video is turned off, or the encoder could not run (it is a Windows program); the log has the reason.
- Kills missing from the weekly report: the player who owned the creature does not have the mod.
Set [General] Server - Log Successful Sends = true to log every delivery too.
Credits and licence
I made this mod because I wanted something I could not find in the other available mods. It might not be perfect, but it has worked in my tests and I hope it works for you too. Please report any issues.
The mod bundles a copy of ServerSync (Copyright 2021 Tykea; permission notice in src/Integrations/Harmony/ServerSync/LICENSE.txt), with local changes for the strict version check described in that file's header, and the official libwebp img2webp encoder from Google's WebP project.

Get help and stay in touch
Questions, bug reports, ideas or mod requests? Come say hi in the KydlDev Discord: https://discord.gg/tX2CcTNC4W Everyone is welcome, and it is the quickest way to reach me. Source code and issues: https://github.com/kydlDev
CHANGELOG
Changelog
2.1.2
New
- Gamepad support
- Hold LT + LB and press D-pad up for the normal screenshot, D-pad right (no HUD), D-pad left (no HUD and no player), D-pad down for the clip, Select / Back for the report window.
- Settings:
Client - Pad,Client - HUD Hidden Pad,Client - HUD And Player Hidden Padin[Screenshots],Client - Padin[Clips],Client - Window Padin[Weekly Report]; changeable,None= off. - Controller support is offered, but it has not been tested with a real controller yet (only with simulated button presses in the test lab).
Changed
- The BepInExPack dependency is now 5.4.2360 (the latest on Hexium), the same as KydlCore.
- Needs KydlCore 1.2.0 or newer; Jotunn is no longer needed (the version check on joining a server comes from KydlCore, as before: only when both sides have the mod the versions must match).
- Debug log (
[DebugLog] Enable): much more detailed. Every step says what it did and with which values, every early stop says why, and frequent lines are throttled so the log stays readable.
Docs
- The FAQ has 12 questions (new: gamepad); the README lists the gamepad settings.
Testing
- Unit tests: 327 passed.
- Integration tests: 85 passed.
- Property-based tests (FsCheck, included in the unit tests above): 3 property checks with generated inputs.
- Coverage of the testable code: 98.3%. Mutation testing (Stryker): 97.4% of the mutants are caught by the tests.
- Performance benchmarks (BenchmarkDotNet): 4.
- Static analysis (SonarQube): no Medium or High issues.
- TestLab tests (in game with DrakesTestLab): the full suite of 16 tests per run, run 3 times in a row on the release build, all green (the release requirement).
- Visual tests: 0 (the mod has no icons or 3D views of its own to check).
2.1.1
- Changed: the menus of this mod take their text sizes, text colours and font from KydlCore. Needs KydlCore 1.1.1 or newer. Client AND server must update together (the mod's version check requires the same version on both).
Changed
- Changed: all the Enable switches are now together in
[General]and have new names:Enable Mod(wasEnableAll) andEnable Chat,Enable Screenshots,Enable Clips,Enable Player Deaths,Enable Boss Death,Enable Server Notifications,Enable Player Notifications,Enable Weekly Report(each wasEnablein its own section; they are still synced from the server). The values you had set are taken over; the old entries are removed from your config file. - Changed:
Enable Modis now the first setting of[General], in the F1 menu and in the F6 hub (your value is taken over). - Changed: the F6 hub has only ONE Screenshots tab: the Take a screenshot now buttons are at the top and the screenshot settings are below them (there were two Screenshots tabs before).
Fixed
- Test suite:
death-quotesno longer depends on what ran before it in the same game session. The check now sets the player's own last hit aside while it builds each quote (an old Fall hit from an earlier test made every Tree quote fail). The death messages players see are unchanged. - Test suite: when the player does not respawn after a test death, the log now names what the game's respawn is waiting for (the objects near the spawn point without an instance).
- Test suite: four minimum checks in
startup-cleanandscreenshot-modes(config entries, mod enabled, player visible) were silently ignored by DrakesTestLab; they are real checks now.
Testing
- Unit tests: 327 passed. Integration tests: 77 passed.
- Property-based tests (FsCheck, included in the unit tests above): 4 property checks with generated inputs.
- Coverage of the testable code: 98.6%. Mutation testing (Stryker): 98.7% of the mutants are caught by the tests.
- Performance benchmarks (BenchmarkDotNet): 4.
- Static analysis (SonarQube): no Medium or High issues.
- In game with DrakesTestLab: the full suite of 15 tests per run, run 3 times in a row on the release build, all green (the release requirement).
2.1.0
Client AND server must update together (the mod's version check requires the same version on both).
New
- Message-only mode (no video). Players who cannot or do not want to record can turn off
[Player Deaths] Client - Video Enabledand[Boss Death] Client - Video Enabled: the death message and the boss "has fallen" message are still posted to Discord, just without a video. Checked in game. - Many more death and boss quotes. 15 new lines for every kind of creature death (animals, non-animals, environmental), for every boss kill message, for the message when a boss kills a player, and for the boss-death announcement (solo and party).
- Nine crush deaths now have their own lines (16 each): falling tree, cart, boat, collapsing structure, stalagmite, drawbridge, turret, catapult and impact.
- Two new water categories (15 lines each): dying while swimming, and dying in the boiling Ashlands sea.
- Boss deaths are now also said in the in-game chat, with no Discord webhook needed (new
[Boss Death] Client - Game Chat Message, on by default). Player deaths already did this. - No repeated quote: a death or boss-kill line is not used again within the last 7 of the same kind.
Changed
- The boss name in a boss-killed-you message is coloured on Discord like before.
Tests
- New in-game TestLab tests: every mob kills the player (no star, 1 star, 2 stars), 22 environment causes (including fall damage), boss attackers, and the player killing all 7 bosses. Each checks that the mod reported the death or kill and sent the message.
2.0.1
Client AND server must update together (the mod's version check requires the same version on both).
Fixed
- Death, boss and clip videos played too fast. The frames were captured at fewer frames per second than the configured
Video FPS(it depends on the PC and on what the game is doing), but the video showed every frame for 1/FPS seconds, so an 8 s video could play in about 4 s. Every frame now keeps the time it was really captured at, so a video plays as long as the footage it holds. A short stall of the game inside a video is not replayed in full (a frame is never shown longer than half a second). - The capture now reaches the configured frame rate more often. The next frame is scheduled from the previous slot instead of from "now", and up to three frames can wait for the graphics card at once, so a capture no longer waits for the previous one to finish.
Changed
- The log says how fast a video was really captured, for example
Captured 238 frames over 7.93 s = 29.9 fps (target 30 fps). When the real rate is more than 25 % below the setting, or the footage is more than 1 s shorter or longer than the settings ask for, aCHECK OFFwarning is written (also with the debug log off), and the length of the finished WebP is checked against the plan. On a slow PC this tells you why a video looks choppy: lowerVideo ResolutionorVideo FPS. - Needs KydlCore 1.1.0 or newer (was 1.0.0; the mod manager installs it, also on a dedicated server). A server that runs KydlCore 1.1.0 needs every player who has KydlCore to have the same version.
2.0.0
- Tested in game with the full TestLab suite (7 tests): 3 green runs in a row on 2026-11-05, plus the ecosystem run with all 12 KydlDev mods loaded together.
- Ported to the KydlDev layout (KydlCore feature switches, new source layout, TestLab suites). No gameplay or config change. Checked in game on 2026-11-04 (clean start and quit with all mods loaded, no errors from this mod).
- Network check is now declared with
VersionCheckOnly(Patch level); the mod's own exact-version check for players stays. - Every feature (chat, screenshots, clips, player deaths, boss death, server notifications, player notifications, weekly report) now starts and stops with its own
Enableswitch and with[General] EnableAll, live.
Breaking: client AND server must update together, and the config file is new.
New
- Two more kinds of screenshot. Besides the normal screenshot (
PageUp, HUD on, unchanged):P: screenshot without HUD. Every HUD element is hidden the way Ctrl+F3 hides it, the screenshot is taken, then the HUD comes back (it stays hidden if you had hidden it yourself with Ctrl+F3).Alt+P: screenshot without HUD and without your own character. The same, and your character (with armour, weapons and shadow) is hidden for the moment of the capture.- The uploaded file names end in
-nohudand-nohud-noplayer.PandAlt+Pare not bound by Valheim itself. Both can be changed or switched off in[Screenshots](Client - HUD Hidden Key,Client - HUD And Player Hidden Key). - The two new keys do nothing while you type in the chat, the console or a text box. The normal screenshot key works at any time, also while the chat is open.
- The death-video frame fallback is never used for the two new kinds, because those frames still show the HUD.
- Three webhooks.
[Screenshots] Server - Webhook URLis the global one (normal screenshots).Server - HUD Hidden Webhook URLandServer - HUD And Player Hidden Webhook URLare optional: when one is empty, that kind goes to the global webhook. All three are synced like the global one (players' games upload to them, so they are not secret). - The player can switch each kind off.
[Screenshots] Client - Enabledstill switches all screenshots;Client - Normal Enabled,Client - HUD Hidden EnabledandClient - HUD And Player Hidden Enabledswitch one kind each. A kind that is off (or has no webhook) does nothing when its key is pressed and has no button in the F6 hub.
- A "Screenshots" tab in the KY hub (F6) with one button per kind. A button closes the window and takes that screenshot, the same as pressing its key. A kind that is switched off, or has no webhook, has no button. The Settings tab stays as it was.
Changed
- One plugin, one new GUID. The two plugins (
com.valheimdiscordrelay.clientand.server) are now ONE plugin,com.kydldev.ValheimDiscordRelay. What runs is decided at run time: the server parts act only when the game is a server (dedicated or hosted), the capture parts only in a game with a screen. A hosted world runs both, as before. - One config file:
BepInEx/config/com.kydldev.ValheimDiscordRelay.cfg. Copy your values from the oldValheimDiscordRelay.cfginto the new file (sections and key names are the same, except the ones listed below), then delete the old file. The report window's style sheets (ValheimDiscordRelay.report.uss,...report.modern.uss) and the saved statistics keep their names and keep working. - Needs KydlCore and Jotunn (also on a dedicated server): the KY hub (F6) and the shared log come from KydlCore.
- Every setting is in the KY hub (F6), Settings tab. Synced
Server - ...settings can be changed there by an admin and show as locked ("Set by the server") for everybody else;Client - ...settings are each player's own. Settings only the server uses (the private webhook URLs, the server notification switches) are handed to admins only, never to ordinary players, so an admin can edit them from the game too. - Config layout follows the KydlDev rule:
[General] EnableAll(master switch, on by default; off = the mod does nothing),[DebugLog] Enable(off by default) and anEnableentry in every feature section.- Renamed:
Server - Enabledof[Chat],[Screenshots],[Player Deaths],[Clips],[Boss Death],[Server Notifications],[Player Notifications]and[Weekly Report]is nowEnable. - Moved: the
[Admin]settings (Server - Lock Configuration,Server - Require Same Version,Server - Log Successful Sends) are now in[General].
- Renamed:
- Logging: the mod no longer keeps its own
ValheimDiscordRelay.log; everything goes to the BepInEx log through the shared logger. DEBUG lines are written only while[DebugLog] Enableis on, and a line repeated within 2.5 seconds is written once.
Fixed
- A chat line is no longer lost when Discord refuses the player's name. Discord answers HTTP 400 for a sender name that contains "discord" or "clyde". The line is now sent once more under the name "Valheim Player", with the real name in bold at the start of the text.
- A very long player name that ends in an emoji is cut without breaking the emoji in half (a broken emoji made Discord refuse the message).
- A restart of the webhook sender in the same game process (a new server session) sends messages again; before, it could stay in "shutting down" mode.
- Clips are posted as "ValheimRelay Clips" (was "ValheimDiscordRelay Clips"): Discord refuses sender names that contain "discord", so every game start first wasted an upload on the refused name. If Discord should refuse the new name too, the second try uses "Valheim Clips".
- A failure while the boss death video frames are prepared is logged and no longer ends the game process.
1.3.5
New
- Modern look for the in-game report window. New setting
[Weekly Report] Client - Window Style(Classic= the existing look, the default;Modern). Modern has rounded corners, rounded summary cards, pill-shaped tabs with a gold selected tab, a gold Refresh button, a round chart icon and a diamond on the line under the title, key hints in the footer (Drag,Esc, and your window key) and Valheim's Norse font for the title and the footer buttons. Same numbers, tabs, keys, layout and window size as Classic; the choice applies the next time the window opens (the window is built again when the style changed). Each style has its own style sheet file in the config folder:ValheimDiscordRelay.report.uss(Classic, as before) andValheimDiscordRelay.report.modern.uss(Modern). In the Modern footer the standing note "Mob kills and damage are counted ..." is replaced by the key hints; the "You opted out" note still shows when it applies.- Valheim's fonts in style sheets:
-unity-font-definition: heading | heading-bold | body | body-bold(Norse, Norsebold, Averia Serif Regular / Bold; names as in Jotunn). Only dynamic fonts are used; a font the game does not have is skipped with one log line. NewReport/ReportFonts.cs,Report/ReportModernStyle.cs.
- Valheim's fonts in style sheets:
- Version check on connect. The server now refuses every player who does not run exactly the server's version of this mod: players without the mod, with an older version and with a newer version (they see Valheim's "Incompatible version"; the server log names the player and the version it found). New setting
[Admin] Server - Require Same Version(defaulttrue, server only, not synced) turns it off. Applies to dedicated servers and worlds hosted from the menu. It only restricts who joins your server: a player who has the mod can still join servers without it. Builds from before this check are refused too, because they do not announce their version.- Done in the bundled ServerSync copy (
Common/ServerSync/ConfigSync.cs, change 4 in its header): clients now always announce the mod's version, and a server withRequireExactVersionon refuses a client that announced nothing or another version.Server/VersionEnforcement.csswitches it on when the game is a server and the setting is on.
- Done in the bundled ServerSync copy (
- Redesigned Discord weekly report: one message per tab. The report now has the same six tabs as the in-game window, each as its own Discord message with its own colour: Players, Bosses, Mobs killed, Killer mobs, Death causes and Highest hits (columns as in the window; every ranking shows a top 5 for the server and for each player, everything is still tracked in full).
- Tables wrap long names onto a second line instead of cutting them with "...", and a column is as wide as its longest text needs.
- The Bosses tab has one block per boss kill (Killing blow, Highest hit received, Kills, When; the time is shown in each reader's own time zone).
- A tab that does not fit in one message continues in the next ("Page 2/3"); nothing is dropped except past 24 messages, 40 per-player tables per tab and 150 players in the Players table.
- The report counts as delivered when Discord accepted every message; a retry after a partial failure sends only the missing messages. The test report (
Send Test Report) sends all messages too.
- Clips. New
[Clips]section: press a hotkey (defaultPageDown, or two keys together such asF9 + LeftControl) and the 4 seconds before and the 4 seconds after the press are sent to Discord as an animated WebP, asValheimDiscordRelay Clips, uploaded straight from the client like the death video. Settings:Server - Enabled,Server - Webhook URL(synced),Client - Enabled,Client - Key,Client - Include Player Name,Client - Pre Duration,Client - Post Duration. Frame rate and resolution come from[Player Deaths].- Clips are cut from the death video's in-memory frame buffer, so nothing extra is captured; the buffer also runs when only clips are ready, so clips work with death videos switched off.
- A notice at the top left says when a clip was sent or failed (shown after the clip is finished, so it is not in the video). Quitting the game cancels a clip in progress. If Discord refuses the sender name (HTTP 400) the clip is retried once as
ValheimRelay Clips. - The clip key ignores keys that are not part of the shortcut and does nothing while you are typing in the chat, the console or a sign / map-pin text box.
- Highest single hit in the weekly report. Each player's highest single hit (damage, weapon, enemy) is tracked, saved across restarts and shown in the Discord report, the report window and the report snapshots.
- The weapon is always an English name, whatever language the game uses, and is read from what the attacking player holds, also when another player's game owns the creature. The hit is credited to the player who landed it.
- Games send a new best hit only when it beats the one they sent before, at most every five seconds, and forget it when the server starts a new period (new routed RPC
ValheimDiscordRelay.ReportPeriodReset.v1). A game that has no connection to the server keeps its damage / kills batch and sends it at the next flush.
- Per-mob rankings in the weekly report. Most killed mobs, mobs and causes that killed players, and the enemy of a highest hit use English names: the game's own English text when available, otherwise a built-in table of the vanilla creatures, otherwise words built from the key or prefab (
Greydwarf_Eliteshows as "Greydwarf Brute"). The per-mob kill counts are saved across restarts. A death caused by another player is recorded as the cause "Killed by a player", not as a mob. - In-game weekly report window. Press
Home(default) to see this week's report so far in a window in the game: summary tiles, a sortable Players tab (online players green, you gold), Bosses, Mob rankings, Death causes and Highest hits tabs, and the time of the next report in your own time zone. Refreshes every 30 seconds and with Refresh. Read-only.- The window opens compact (640 x 536), is never smaller than its content, and the size you drag it to is remembered (
Client - Window Width/Height). Long lists scroll. - While it is open the character does not move or attack, the mouse cursor is free and
Escapecloses it. These patches are applied one by one, so one failing after a game update cannot stop the rest of the mod from loading. - New
[Weekly Report]settings:Server - Window Enabled(synced, default on),Client - Window Key(Nonedisables it),Client - Window Scale(0= automatic). - The server answers with routed RPCs
ValheimDiscordRelay.ReportSnapshotRequest.v1/...ReportSnapshotReply.v1(one request per player per second at most). The reply is capped to the top 100 players, the last 50 boss kills and the top 5 of each ranking per player; the totals are always complete. Players' games accept replies and period resets only from the server.
- The window opens compact (640 x 536), is never smaller than its content, and the size you drag it to is remembered (
- Safer weekly report delivery. The Discord embed is trimmed to Discord's limits (1,024 characters per field, 25 fields, 6,000 in all): the highest-hits list is capped with "...and N more" and the least important sections go first when the embed is too big.
- Restart-safe counting. The counted boss kills are saved with the statistics (new
bosskeylines inValheimDiscordRelay.WeeklyReport.txt, newest 128, entries older than 24 hours are not loaded) and announced bosses are saved inBepInEx/cache/ValheimDiscordRelay.BossAnnounced.txt(last 64). NewCommon/RememberedKeys.cs. - Build tag in the log is now
mobs-killed(later builds of 1.3.5 change it).
Changed
-
Modern report window, footer buttons: the Refresh and Close labels are larger (font size 15 -> 19) so the thin Norse font is easier to read; the buttons are 16 px wider (96 -> 112) to fit. Players with an existing
ValheimDiscordRelay.report.modern.usskeep their old file: change.vdr-btn-footer { font-size }there or delete the file to get the new default. -
In-game report, Players tab: the columns are now Player, Mobs Killed, Bosses killed (new: boss kills where the player landed the killing blow, counted from the snapshot's boss kill list, so no server change), Deaths and Total Damage, all sortable. A player's name wraps onto more lines instead of being cut with "...", the row grows with it. The default window is 80 px wider so the name column has room (a size you saved yourself is kept).
-
The in-game weekly report window now uses Unity's UI Toolkit instead of IMGUI. Same window, tabs, numbers and settings. It is built from code when the window first opens (no asset bundle, no UXML), is only updated when something changes instead of being redrawn every frame, and uses UI Toolkit pointer events for dragging, resizing, clicking and scrolling (own scrollbar, mouse wheel moves three rows). The per-player blocks on the Mob rankings tab are now tall enough for five rows (the fifth row used to run into the next heading). The window can be styled with CSS: its look comes from a USS-style sheet (a subset of Unity's USS: class, name and type selectors,
:hover/:active/:disabled,:rootvariables withvar(), colours, lengths and most style properties). Unity cannot read USS text at runtime without an asset bundle, so the mod reads it itself (ReportStyleSheet). The default rules are written toBepInEx/config/ValheimDiscordRelay.report.usson first use and are read again each time the window opens. Build references:UnityEngine.UIElementsModule(and the two TextCore modules) added,UnityEngine.IMGUIModuleno longer needed. -
The synced upload webhooks are now clearly marked as not secret. The config descriptions of the screenshot, death video, boss video and clip webhooks and the README say that every player can read them, and the server logs one line at start-up naming which of them are set. The design is unchanged: players' games post their own videos to Discord.
-
The BepInExPack dependency is now 5.4.2351 (the latest on Hexium; BepInEx 5.4.23.5).
-
Weekly report tracking for the Players and Bosses tabs.
- Bosses killed per player is now counted by the server over the whole week (killing blows) instead of being worked out from the newest 50 boss kills in the window. The Players tab lists every player who did anything this week (joined, killed, died, dealt damage or killed a boss), not only those who joined, killed a mob or died.
- Per boss: each recorded boss kill now also carries how many players that boss killed (the same player several times counts every time, only for the same boss object) and the highest single hit it received, with the player and the weapon. They are saved in the weekly data file (extended
bosslines and newbossfightlines; older files still load, older builds ignore the extra fields). Deaths and hits of a boss that is fought but not yet killed are kept (also across the weekly cut-off, at most 14 days) and handed to the kill. Kall Fimbulbringer's three phases count as one boss. - Network: a death caused by a boss now also sends the boss's object key (the previously empty last field of the death event), and a new event kind
5carries the best hit a boss received. An older server ignores both; an older game does not send them. The snapshot reply has an extension block appended after the original layout, so older games still read it and a new game copes with a reply from an older server. - In-game Bosses tab: new columns Boss, Killing blow, Highest hit received (damage, who landed it, weapon), Kills (players that boss killed) and When; one row per boss kill, so the same boss killed twice in a week is two rows. Every text cell wraps instead of being cut with "...". With a server of an older build the two new columns show "-".
-
Weekly report tracking for the Mobs killed tab.
- Highest hit per kind of mob: every hit a player lands on a mob (never a boss) is measured by the game that owns the mob, like the highest hit and the boss hits. Only the best hit per player and kind of mob is kept and sent, and only when it beats the one that game already sent, so a long fight costs at most one small message every five seconds. The server keeps the best hit of every player on every kind of mob all week (saved in the weekly data file as new
mobhitlines; older files still load, older builds ignore the lines) and works out the best of everybody, and who landed it, when a snapshot is built. The mob name is worked out exactly like the one of a mob kill, so a mob's kills and its best hit always meet under the same English name. The damage is the health the hit removed, so the killing blow counts for what was left of the mob. - Network: new event kind
6(EventMobHit, same layout as the highest hit: mob prefab, mob name, player, damage). The snapshot reply has a second extension block after the first one (version2: per player and combined, the best hit of the mobs in the top five). A game of an older build stops reading before it; a new game copes with a reply from an older server (the hit columns then show "-"). A server of an older build logs the new event as an unknown kind and ignores it. - In-game Mobs killed tab (replaces the Mob rankings tab): Top 5 most mobs killed on the server (columns Name of mob, Amount, Highest hit received, By who) and one Top 5 most mobs killed by <player> table per player (the same without By who). The name column is never narrower than its longest name needs and wraps a very long name onto a second line instead of cutting it with "..."; the other cells wrap too. The server table is shown first, so it is not buried under the player tables.
- In-game Killer mobs tab (split off the old Mob rankings tab): Top 5 mobs that killed players on the server (columns Name of mob, Amount, Most deaths by whom) and one Top 5 mobs that killed <player> table per player (Name of mob, Amount). Same wrapping rules as the Mobs killed tab; players who died most are listed first. Most deaths by whom (the player who died to that mob most times, bosses included) is now worked out by the server (see below). The tabs are two rows of three: Players, Bosses, Mobs killed / Killer mobs, Death causes, Highest hits.
- Highest hit per kind of mob: every hit a player lands on a mob (never a boss) is measured by the game that owns the mob, like the highest hit and the boss hits. Only the best hit per player and kind of mob is kept and sent, and only when it beats the one that game already sent, so a long fight costs at most one small message every five seconds. The server keeps the best hit of every player on every kind of mob all week (saved in the weekly data file as new
-
Weekly report tracking for the Killer mobs tab.
- Most deaths by whom: the server already counted, per player, how often each mob (bosses included) killed them and saved it in the weekly data file (
mobdeathlines). It now also works out, for each mob in the combined top five, which player died to it most times, over ALL players of the week (not only the ones the window lists). Players tied for the most deaths are all named (alphabetically, at most three, then "+N more"), because with only a few deaths a tie is the usual case. The tab shows the name instead of "-". - Network: the snapshot reply has a third extension block after the other two (version
3: per mob in the combined top five, the "who" text). A game of an older build stops reading before it; a new game copes with a reply from an older server (the column then shows "-"). No new events and no change to the weekly data file: older and newer builds read each other's files. - Build tag in the log is now
killer-mobs(later builds of 1.3.5 change it).
- Most deaths by whom: the server already counted, per player, how often each mob (bosses included) killed them and saved it in the weekly data file (
-
Weekly report tracking for the Death causes tab.
- Finishing hit: when a player dies, their game now also reads the hit that killed them (the game's own last hit: its total damage and the damage type that makes up most of it: Blunt, Slash, Pierce, Chop, Pickaxe, Fire, Frost, Lightning, Poison or Spirit; plain damage such as falling or drowning has no type). The server keeps the biggest finishing hit per player and cause of death all week (saved in the weekly data file as new
deathhitlines; older files still load, older builds ignore the lines) and works out the biggest of everybody when a snapshot is built. - Highest amount by who: the server works out, for each cause in the combined top five, which player died of it most times, over ALL players of the week. Ties are all named (alphabetically, at most three, then "+N more").
- Network: new event kind
7(EventDeathHit: damage type, cause of death exactly as the death event sent it, damage), sent right after the death event, and a fourth extension block at the end of the snapshot reply (version4: the finishing hit of the top causes per player and combined, and the "who" text). A game of an older build stops reading before it; a new game copes with a reply from an older server (the new columns then show "-"); a server of an older build logs the new event as an unknown kind and ignores it. - In-game Death causes tab (replaces the plain ranking lists): Most common death causes on the server (columns Cause name, Finishing hit/damage, Amount, Highest amount by who) and one Most common death causes by player <name> table per player (the same without the last column). Same wrapping rules as the Mobs killed and Killer mobs tabs: the name column is never narrower than its longest name needs, and every cell wraps instead of being cut with "...". The players who died most are listed first.
- The finishing hit is the game's own record of the last hit when the player died (the mod's own record of the last hit is the fallback); a death for which neither exists shows "-".
- Build tag in the log is now
death-causes-2. - Death causes tracking reworked (fixes wrong and missing causes).
- The cause of a death without a killer now comes from the type of the killing hit (new
DeathMessage.CauseName,DeathMessageBuilder.EnvironmentalCauseName): Drowning, Burning, Freezing, Poison, Water damage, Smoke, Edge of the world, Cinder fire, Ashlands ocean, Lava, Incinerator, Fall damage, Self-inflicted damage, Falling tree, Cart, Boat, Collapsing structure, Falling stalactite, Drawbridge, Turret, Catapult and Impact damage. Before, the cause was guessed by searching the death sentence for words: it contained the player's own name and a random joke, so a player called "Waterman" drowned in every death, a falling tree was filed as "Fall damage", and lava, Ashlands ocean, carts, boats and collapsing structures all ended up as "Unknown / environment". The word search is now only the last resort, with the player's name taken out of the text. - A creature has the same name on the Death causes and Killer mobs tabs. The cause was named without the killer's prefab, so a game that could not give English text produced "Greydwarf Elite" on one tab and "Greydwarf Brute" on the other, and the same creature was counted twice under two names. The server now names the cause with the prefab, exactly like the mob death (the finishing-hit event carries the killer's prefab in its previously empty
killerfield; an older game sends it empty and behaves as before). - The game's own log (
BepInEx/cache/ValheimDiscordRelay.log) now has one line for every death a game reports ([Report] Death reported: ...) and, on the server, one for every death and finishing hit it receives ([Report] Death received ...,[Report] Finishing hit received ...), so a missing row can be traced.
- The cause of a death without a killer now comes from the type of the killing hit (new
- Finishing hit: when a player dies, their game now also reads the hit that killed them (the game's own last hit: its total damage and the damage type that makes up most of it: Blunt, Slash, Pierce, Chop, Pickaxe, Fire, Frost, Lightning, Poison or Spirit; plain damage such as falling or drowning has no type). The server keeps the biggest finishing hit per player and cause of death all week (saved in the weekly data file as new
Fixed (report review)
- A killing blow was recorded as only the health the creature had left. A 200 damage hit on a creature with 30 health left showed as 30 in the Highest hits tab, the Mobs killed tab's Highest hit received column and the boss's Highest hit received, so the best hit on a kind of mob could never be much higher than that mob's health. For a hit that kills, the full damage of the hit (the game's own total, after resistances and bonuses) now counts for these "highest hit" numbers. Total Damage still counts the health really removed. A hit that does not kill is measured exactly as before, and if the game's total cannot be read the old number is used.
- Highest hits tab cut long names with "...". Player, weapon and enemy names now wrap onto more lines (the row grows with them), like the other tabs.
- The "Bosses killed" column of the Players tab was a few pixels too narrow for its own sort arrow (the header is longer while that column is sorted); the column is 12 px wider.
- Build tag in the log is now
hit-size-1.
Fixed
- Report window style sheet:
border-width: 1pxwas rejected. Plain-number properties (border-width,border-left-width,opacity...) did not accept apxsuffix, although the README listsborder-widthas supported; they now accept1pxas well as1. - A solo boss kill did not escape the player's name for Discord markdown. The "has fallen!" embed showed a name like
xX_Slayer_Xxin italics, and a name containing[text](url)became a clickable link. The name is now escaped and capitalised the same way as in the party message (Server/BossAnnouncer.cs). Nobody could be pinged (allowed_mentionsis empty). - A small
Server - Queue Limitcould drop parts of the weekly report. The report is up to 24 messages queued at once, but the limit can be as low as 10, and busy chat could push report parts out as well; dropped parts were only sent again by the 15-minute retries. The report's messages (also the test report's) are now exempt: they do not count towards the limit and are never discarded by it. Chat and the other messages are limited as before (Server/WebhookWorker.cs,ServerRelay.EnqueueJson,Report/ReportScheduler.cs). - One player can no longer flood the Discord chat queue. Each connected player may relay a burst of 10 chat lines and then 1 per second; extra lines are not sent and a warning is logged at most every 30 seconds per player. The host's own chat is not limited (
ServerRelay.AllowChatFrom). - A failure while starting the server relay can no longer break the game's startup.
GameStartPatchnow catches and logs it like the other patches. - Webhook messages are no longer lost on a network blip. A timeout, DNS failure or dropped connection (no HTTP answer from Discord) is now retried with the normal backoff instead of dropping the message after one try (
Server/WebhookWorker.cs). - Video uploads retry the same file instead of re-encoding. A network error, HTTP 429 or HTTP 5xx on a death, boss or clip upload is retried up to 3 times with the same file; only HTTP 413 (too large) moves to a smaller encode, and other failures no longer waste lower-quality encodes. A timeout while waiting for Discord's answer is not retried, so a video that may already have been posted is not posted twice (
UploadWithRetryinClient/ClientCaptureService.Webhook.cs). - A slow Discord could freeze the server for up to ~9 s at start and shutdown. The up / restart / down notices were sent on the game's main thread and waited for. They now go through the normal send queue: starting never waits, and at shutdown the game waits at most 2 seconds for the queue (the "going down" notice included).
- Messages still queued at shutdown were thrown away, and the "going down" notice could arrive before earlier ones. The notice keeps its place in line, and when the plugin is unloaded the worker keeps sending for up to 4 more seconds instead of dropping the queue after 1.5 s.
- The mod replaced the game's TLS setting on every Discord request, overriding other mods. TLS 1.2 is now only added, once, if it is missing (new
Common/HttpSecurity.cs). - A boss kill reported again after a server restart could be counted twice in the weekly report, and a boss announcement could be repeated after a restart. Both are now remembered across restarts (see above).
- The weekly report's statistics were reset as soon as the report was queued, so a report Discord refused, or that could not be delivered, lost the week. They are now reset only after Discord has confirmed it; otherwise the numbers are kept and the report is tried again after 15 minutes (4 attempts, then the period is closed with an error in the log). The confirmation is written to disk at once, so a server that stops right after Discord accepted the report no longer posts it a second time after the restart.
- The weekly report never rolled over without a webhook. With
[Weekly Report] Server - Webhook URLempty, the period now ends when the report is due (with a warning in the log) instead of growing for ever. - Damage and kills waiting to be sent were lost when there was no connection to the server. The batch is kept and sent at the next flush, and dropped when a new connection begins.
- A player name with characters a path cannot hold stopped all later death videos. The file on disk now has a fixed name (
death-HHmmss.webp), the name Discord shows is the player name with unusable characters replaced by_(at most 40 characters), and an unexpected error on the processing thread now clears the "processing" flag and sends the text-only death message. - The screenshot hotkey fired while typing in the chat, the console or a sign / map-pin text box.
- A player name starting with
#,-or1.could turn the join / leave message into a heading, bullet or numbered list in Discord. These are now escaped.
1.3.4
- Death camera. After you die, the camera rises and looks down at your body, turning towards the killer if there is one, so the death video ends on a cinematic shot.
- Death camera settings. New
[Player Deaths]settings:Client - Death Camera,Client - Death Camera HeightandClient - Death Camera Look At Killer. - Screenshot hotkey works while other keys are held. Moving or holding Shift no longer blocks it.
- Black screenshots are retried automatically with a different capture strategy. A new native strategy is tried first.
- Last-resort fallback. If every capture is black, the newest death-video frame is sent instead (file name ends in
-buffered). - The working screenshot strategy is remembered between game sessions, per PC and graphics setup.
- Smoother screenshots. The capture texture is reused between screenshots and no longer shared with the death-video capture.
- More screenshot diagnostics. Each screenshot logs the game state, so a black screen can be told apart from a failed capture.
- Build tag in the log. The startup line shows a build tag and the DLL write time.
1.3.3
- The in-game death shout is now sent 5 seconds after the death
- Faster, multithreaded WebP encoding that stays light on the PC.
- Quitting the game while a video is processing no longer hangs it.
- Config reorganised by feature, with
Server -/Client -names. - Every feature has its own Enabled switch.
- Repeat-death message changed. A second death while the first is still being recorded/uploaded (or within 30 s of it) now posts three lines in one code block: the normal random death quote for that death,
{Player} died again in a very short time, maybe fight an enemy of your size: T.W.I.G., andNo video recording of this unfortunate death will be presented.It replaces the old "seems to be weak" sentence. - Death video and boss video are now independent of the frame recording.
- New
[Admin]config category holdingLock ConfigurationandLog Successful Sends(both synced, admin-controlled). - Config category
[Server]renamed to[Chat]. - Introduced Boss death video recording, which by default uses same recording and FPS settings set for Death recording.
- Admin-set webhooks and report schedule. The webhook URLs the clients upload to are now synced from the server: the admin sets them once on the server and every client receives them.
- Player notifications: new
[Player Notifications]section and its own webhook which notifies when players join or leave the server. Works on local hosted worlds as well. - Server notifications are now sent with the username "Server notifications". New synced checkbox
[Server Notifications] Use Discord Webhook Namesends no username so Discord shows the name set on the webhook. The server name is bold in every message. - Weekly report (first version): new
[Weekly Report]section, its own webhook. One embed per week with: players joined, bosses defeated, highest damage dealt, and a table of mob kills and deaths per player. Statistics are saved toBepInEx/cache/ValheimDiscordRelay.WeeklyReport.txt.Send Test Reportposts a preview without resetting anything. - Death quotes are randomly selected from a list based on different criteria.
- Fixed chat from the host not reaching Discord on a world hosted from Valheim's own menu (no dedicated server).
- Fixed the server always reporting "restarted" after any clean shutdown, however long it had been off. A startup is now a restart only if it happens within
Restart Window Seconds(new config, default 120) of the shutdown; otherwise it is reported as "is up". - Fixed name display for mini-bosses. Enemy names carrying a
<color=...>tag are shown in Discord in red ANSI colour instead of raw tags (e.g. Geirrhafa). In-game chat shows the plain name only, with no tags.
1.3.2
- Added server up/down/restart notifications.
- Intercept Valheim's own arrival message.
- Forward it to the Server Notifications webhook.
- Prevent duplicate arrival notifications.
- Deaths now shout in game chat.
- Death shouts stay out of the normal Discord webhook.
1.3.1
- Rolling pre/post-death frame buffer now lives in memory instead of on disk; disk is only touched once a death happens, to stage frames for
img2webp. - Frame staging and the WebP encode/upload now run entirely on a worker thread instead of partly on the main thread.
- Fixed logging out (or quitting to desktop) being misreported as a death, sending an unwanted death message/video. The local player object is destroyed on logout/quit the same way it is on death; death detection now checks
Game.IsShuttingDown()and skips the death signal whenever the game itself is the one tearing the session down.
1.3.0
Performance rework for the frame-rate drop reported while the death-video rolling buffer and manual screenshots were active.
- Death-video capture now downscales on the GPU before reading back, instead of reading back full resolution twice.
- Screen readback uses
AsyncGPUReadback(non-blocking), with a synchronous fallback when unsupported. - GPU downscale now preserves aspect ratio (letterboxed) instead of stretching.
- Manual screenshots use the same GPU-side capture path, removing a stutter on every keypress.
- Disk writes, uploads, and frame staging now run on background threads instead of the main thread.
- All logging now goes through one file (
ValheimDiscordRelay.log) via a single background thread; the separate death log is gone. - Log lines now use one consistent format and always match their actual severity.
- Old-file cleanup now runs at most every 5 minutes on a background thread, instead of every frame.
- Building from source now requires
UnityEngine.ScreenCaptureModule.dllinReferences/(no new runtime dependency for end users).
1.2.2
- Added client-side death videos as animated WebP, 2-4s before/after death, 20/30 FPS, 480x270/640x360/960x540.
- Death videos upload directly from the client to the configured webhook.
- Added automatic encoding fallbacks; if all WebP attempts fail, only the death message is sent.
- Death frames are disk-backed instead of a large RAM buffer.
- Screenshots and death-video files are cleaned up automatically after upload or expiry.
- All logging (client and server) now goes through
ValheimDiscordRelay.logfirst, with BepInEx console output as a secondary, correctly-leveled step.
1.2.1
- Adjusted
README.nfo.
1.2.0
- Consolidated client and server into one
ValheimDiscordRelay.dllwith one shared config file. - Server component stays inactive on clients.
- Screenshot hotkey defaults to
PageUp; screenshots use PNG. - Added Thunderstore/Hexium publishing metadata and icon.
Death-cause statistics
- Added per-player and combined weekly death-cause counts.
- Death cause rankings are exposed in the Home report window's Death causes tab and the Discord weekly report.
- Cause labels use the identified attacker when available; otherwise they classify common environmental causes from the existing death message, falling back to Unknown / environment.
- Existing weekly report data is extended with death-cause records; older saved data remains loadable and starts these counts at zero.