Valheim
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
Downloads
71
Size
150KB
ADDatHost Valheim hosting
30% off

Valheim Discord Relay

One BepInEx plugin DLL for Valheim that relays normal chat and shouts to Discord using webhooks, and lets clients capture screenshots of the final rendered game screen, including visible UI added by other mods.

Requirements

  • Valheim 1.0.12
  • BepInEx 5.4.2350
  • Install this mod on the dedicated server and every client that should relay chat or use screenshots.

Installation

Install the package with Thunderstore/Hexium, or place ValheimDiscordRelay.dll in BepInEx/plugins/ValheimDiscordRelay/.

The package contains one DLL. It contains both client and server components:

  • the server component activates only when running as a Valheim server;
  • the client component handles local chat interception and screenshots.

Configuration

The mod uses one shared file:

BepInEx/config/ValheimDiscordRelay.cfg

[Server]

  • Enabled — enable server-side chat relay.
  • Webhook URL — fallback Discord webhook.
  • Normal Webhook URL — webhook for normal chat; falls back to Webhook URL.
  • Shout Webhook URL — webhook for shouts; falls back to Webhook URL.
  • Max Message Length — maximum chat text sent to Discord.
  • Name Display — NameOnly, NameWithNumber, or NameWithIdSuffix.
  • Shout Prefix — ANSI prefix for shouts; default is dim red.
  • Normal Prefix — ANSI prefix for normal chat; default is dim cyan.
  • Queue Limit — maximum queued Discord messages.
  • Minimum Send Interval Ms — pacing between webhook requests.
  • Log Successful Sends — log successful Discord deliveries.

[Client]

  • Enabled — enable local chat interception and screenshot support.
  • Max Message Length — maximum chat text sent from the client to the server.
  • Screenshot Key — screenshot hotkey; default PageUp.
  • Screenshot Webhook URL — Discord webhook used for screenshots.
  • Include Player Name — use the local Valheim character name as the Discord webhook username for screenshots.

Example:

[Server]
Enabled = true
Webhook URL = https://discord.com/api/webhooks/...
Normal Webhook URL =
Shout Webhook URL =
Max Message Length = 1800
Name Display = NameWithNumber
Shout Prefix = ?[2;31m
Normal Prefix = ?[2;36m
Queue Limit = 100
Minimum Send Interval Ms = 250
Log Successful Sends = false

[Client]
Enabled = true
Max Message Length = 1000
Screenshot Key = PageUp
Screenshot Webhook URL = https://discord.com/api/webhooks/...
Include Player Name = true

Chat relay

The client sends only the chat type and text to the Valheim server. The server resolves the sender from the actual network peer, including character name and platform identifier. No Discord account linking is used.

Normal chat uses dim cyan ANSI formatting (ESC[2;36m); shouts use dim red (ESC[2;31m).

Whisper/private chat is intentionally not relayed.

The server uses sequential webhook delivery with queueing, pacing, and retry handling for Discord rate limits and temporary HTTP errors.

Screenshots

Press PageUp by default to capture the current rendered Valheim frame. The capture waits for the end of the frame, so visible UI from other mods is included.

Screenshots are encoded as PNG and uploaded directly from the client; they do not pass through the Valheim server.

Because the screenshot webhook URL is present on clients, use a dedicated screenshot webhook/channel if you do not want clients to have access to your normal chat webhook.

Packaging

The repository includes package-release.ps1. After building the DLL, run:

.\package-release.ps1 -Version 1.2.0

The script creates an upload-ready ZIP in dist/.

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.