Gjallar
Restart warnings for dedicated servers. Write a file with a timestamp and a reason and every player gets a countdown, on screen and in chat. Server-side only; players install nothing.
模組介紹 作者原文
Gjallar
Gjallar warns players before a dedicated server restarts.
Without it a restart is a silent disconnect. Nobody is told it is coming, and nobody can tell
afterwards whether the server went down on purpose, crashed, or whether their own connection
dropped. Gjallar counts the restart down on screen so people can get somewhere safe and log out
properly.
Named for Gjallarhorn, the horn sounded in Norse myth to warn that something is coming.
Install on the server only. Players need nothing. Gjallar announces using messages the
base game already knows how to show, so there is no version to keep in step and removing
Gjallar can never stop anybody joining.
Gjallar Does Not Restart Your Server
It only announces the restart. Whatever takes the server down now - a systemd timer, a cron job,
an update script, a hosting panel - keeps doing that.
This is deliberate. A mod that fails to load should never be able to stop a restart happening.
There are two ways to tell Gjallar a restart is coming.
Daily Restarts
If your server restarts at the same times every day, put those times in the config:
DailyRestarts = 00:00,12:00
24-hour HH:MM, separated by commas, in the server's own local time. Gjallar counts down to
each one automatically.
Because Gjallar only announces these restarts, the times have to match whatever actually
performs them. Gjallar prints the next scheduled restart at startup and in gjallar_status,
next to the server's current clock, so you can check the two agree.
Unplanned Restarts
For a mod update or anything else you cannot predict, write a file. Gjallar checks for it every
couple of seconds, announces the countdown, and deletes it.
|
For example, warning for two minutes and then restarting:
echo "$(( $(date +%s) + 120 ))|Mod update" > /opt/valheim/restart.signal
sleep 120
systemctl restart valheim
The reason is optional and appears in the message. The file lives beside BepInEx in your game
folder unless you set SignalFile; gjallar_status prints the exact path.
The account your server runs as needs to be able to delete this file.
A signal file always takes priority over the daily schedule.
What Players See
A message in the middle of the screen, in the same style the game uses for its own
announcements, at 90, 60, 30, 10 and 5 seconds and again when time runs out:
Server restarting in 90 seconds - Mod update
Each one is also kept in the player's message log, so somebody who stepped away can still see
what happened.
If the restart is announced part-way between two marks, Gjallar opens by saying how long is
actually left rather than skipping to the next mark.
Settings
| Setting | Default | What It Does |
|---|---|---|
| Enabled | true | Turn Gjallar off without uninstalling. Does not affect whether the server restarts. |
| SignalFile | (empty) | Where to look for the signal file. Empty means restart.signal beside BepInEx. |
| PollSeconds | 2 | How often to check for a signal file. |
| DailyRestarts | (empty) | Times the server restarts each day, HH:MM separated by commas, server local time. |
| ScheduledReason | Scheduled restart | The reason shown for a daily restart. |
| Marks | 90,60,30,10,5 | Seconds remaining at which to announce. |
| AnnounceOnPickup | true | Announce immediately when a restart is first known about. |
| AnnounceAtZero | true | A final message when time runs out. |
| Template | Server restarting in {seconds} seconds - {reason} | The wording. {seconds} and {reason} are filled in. |
| ZeroTemplate | Server restarting now - {reason} | The wording for the final message. |
| CentreScreen | true | The message in the middle of the screen. |
| ChatLine | false | Also announce in chat. Off by default - the game renders it as yellow capitals across the bottom left, which alongside the centre message reads as the same warning twice. |
| ChatName | Server | The name shown against the chat line. |
Commands
Admin only. A dedicated server has no console to type into, so these are mainly for tes
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。
下面這些內容需要先安裝,否則該模組不會生效: