ValheimDeathBan
Ban accounts after character death. Persistent bans, admin immunity and a death journal. Server handles bans; optional client installation adds death reasons.
模組介紹 作者原文
Valheim Death Ban
Standalone permadeath mod for Valheim. When the server detects a connected player's death, it bans their account and disconnects them after a configurable delay. Creating a new character on the same account does not bypass the ban.
Features
- Persistent account bans using Valheim's native ban list.
- Server-side death detection through the s_dead flag in character ZDO data, without requiring loaded player models.
- Configurable player scan interval and ban/disconnect delay.
- Admin immunity through the server's adminlist.txt.
- UTF-8 death journal with timestamps, character names, account IDs, raw reasons, sources and exemption status.
- Optional Discord webhook notifications, including the ban outcome.
- Global chat announcements and queued red banners using the Valheim-Norsebold font.
- Shared Russian death messages across chat, banners and Discord.
- Configurable server scan diagnostics.
- Local-world host deaths are logged; the host is always exempt from bans.
- No Jotunn, PvP Tweaks or ValheimEnforcer dependency.
Installation
Install BepInExPack Valheim and this mod on the server. For manual installation, copy ValheimDeathBan.dll to BepInEx/plugins/ValheimDeathBan.
| Installation | Available features |
| --- | --- |
| Server only | Death detection, account bans, journal, diagnostics and Discord notifications with the available reason. |
| Server and clients | Adds client death-reason reports, chat announcements and on-screen banners. |
Install the same version on the server and all clients for the full feature set. Without a client reason report, the server records an unknown reason and the public message uses the generic death sentence. The local-world host's reason is read directly.
Configuration
Created after the first launch:
BepInEx/config/com.xtasy.ValheimDeathBan.cfg
[General]
Enabled = true
KickDelaySeconds = 3
BanAdmins = false
ScanIntervalSeconds = 0.25
[Announcements]
Chat = true
Banner = true
BannerSeconds = 8
[Discord]
Enabled = false
WebhookUrl =
[Diagnostics]
Enabled = true
LogIntervalMinutes = 15
| Setting | Default | Description |
| --- | --- | --- |
| General.Enabled | true | Enable server death processing and bans. |
| General.KickDelaySeconds | 3 | Delay after death detection before applying the ban and disconnecting. |
| General.BanAdmins | false | Exempt accounts in adminlist.txt when false. |
| General.ScanIntervalSeconds | 0.25 | Seconds between server scans; range 0.05–30. |
| Announcements.Chat | true | Server broadcasts shout-style chat death announcements to modded clients. |
| Announcements.Banner | true | Server broadcasts red death banners to modded clients. |
| Announcements.BannerSeconds | 8 | Banner duration on each client, clamped to 1–60 seconds. |
| Discord.Enabled | false | Enable server-side webhook notifications. |
| Discord.WebhookUrl | empty | Discord webhook URL; empty disables sending. |
| Diagnostics.Enabled | true | Enable server scan timing and periodic diagnostic logs. |
| Diagnostics.LogIntervalMinutes | 15 | Minutes between diagnostic reports; range 0.1–1440. |
Existing values are preserved when updating. If your old configuration has BanAdmins = true, change it to false to enable admin immunity. Immunity does not remove existing bans.
After manually editing the configuration file, restart the server or client concerned. Banner duration is a client setting; the server controls whether chat and banner announcements are broadcast.
A larger scan interval reduces check frequency but increases death-detection latency. Synchronization delay also affects detection. The disconnect delay starts when death is detected, not at the exact moment of the client's death.
Death messages
The same Russian sentence is used in chat, the banner and the first line of Discord notifications. Character names are inserted as-is, without grammatical declension.
| Cause | Example |
| --- | --- |
| Creature attack | Древний убивает Дэнчик |
| Falling | Дэнчик разбилс
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。
下面這些內容需要先安裝,否則該模組不會生效: