Gjallarhorn

版本 v0.3.0·更新於 2026-09-22

Server-side Viking death announcements, boss-defeat chronicles, and join/leave notices. Vanilla clients supported; installing it client-side upgrades the feed to exact killer and cause of death.

模組介紹 作者原文

Gjallarhorn

A server-side Viking kill feed and roster. Player deaths land in the top-left message feed

and the chat window; boss defeats get the centre-screen banner; players arriving and leaving

are announced in the same voice.

Named for Heimdall's horn — the one sounded to announce across all nine realms.

Who needs to install this

The server needs it. Every client is optional, and the mod is not version-enforced.

  • On the server it does all the work — detection, wording, and broadcasting. It reaches

players over ShowMessage and ChatMessage, two RPCs vanilla Valheim already registers,

so a server full of unmodded players still sees the whole feed.

  • On a client it is purely additive. Installed, that player's deaths are reported with the

real cause and the real killer. Absent, their deaths still announce, but the killer is a

proximity guess and non-combat causes read as generic.

Mixed populations are fine and expected. Nobody is refused at connect.

Why clients change the quality of the feed

Everything specific about a death — who swung, what kind of damage, whether another player

did it — lives in Character.m_lastHit, set in Character.Damage. That runs on whichever

peer owns the dying character's ZDO, which is the victim's own machine. A dedicated server

never instantiates a Player component for a remote client and can never read it.

So the server falls back to what it can see: the dead flag on each connected player's

replicated character ZDO, and whatever hostile creatures are standing near the corpse. That

gets the ordinary case right — you died to the thing that was hitting you, and it is still

there — and gets ranged kills, deaths on a fleeing mob, and every non-combat cause wrong.

| | Vanilla client | Client with Gjallarhorn |

|---|---|---|

| Death announced | yes | yes |

| Victim, position, biome | exact | exact |

| Killer creature | nearest hostile within 20m, a guess | exact |

| Star rank | from the guessed creature | exact |

| PvP kills | never identified | exact, with the killer named |

| Fall, drowning, fire, freezing, poison, falling trees | read as generic | each has its own message |

| Carts, boats, structures, turrets, the edge of the world | read as generic | grouped as environmental |

Boss defeats are exact either way. The server sees them through

ZoneSystem.RPC_SetGlobalKey, which is registered server-side only.

Joins and leaves

Vanilla announces arrivals but never departures, and the asymmetry is not an oversight. The

arrival line is a chat shout the joining client sends itself, from Game.SpawnPlayer the

first time it spawns. A client that is leaving cannot shout, so there is nothing to mirror it

with. Both halves have to be observed server-side instead.

Departures are caught at ZNet.Disconnect, the single funnel a clean quit, a dropped

connection and a kick all pass through. Arrivals come from a diff over the peer list on the

server tick, gated on the player actually having a character in the world, so someone who

backs out at character select is never announced. That same diff backs up the departure hook:

if a game update ever moves Disconnect, leaves announce a tick late instead of silently

stopping.

Leaves come in three wordings, because a crash should not read as a cheerful farewell:

| How they left | Pool |

|---|---|

| Quit to menu or desktop | LeaveMessages |

| Crash, alt-F4, network loss | LeaveTimeoutMessages |

| Kicked, banned, not on the permitted list | LeaveKickedMessages |

RejoinQuietPeriod keeps a flapping connection from filling the feed: a player who rejoins

inside the window is not announced, and the leave that follows is suppressed too — unless the

session outlasted the window, in which case it was a real visit and its ending is reported.

Identity is the peer's platform id, so it survives reconnects and does not collide when two

players pick the same name.

Leaves are announced by default. Arrivals are not: vanilla already covers them, so

AnnounceJoins starts off, and tur

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

denikson-BepInExPack_ValheimValheimModding-Jotunn

檔案與校驗

檔案名稱
Gjallarhorn-0.3.0.zip
檔案大小
142.7 KiB