PauseMyServer

版本 v1.5.0·更新於 2026-09-26

Pause a server-hosted game: the world pauses when every player online has asked for a pause (the ESC menu, or a mod that pauses for an open map or panel), and an admin can pause the whole server for e

模組介紹 作者原文

Pause My Server

Pause a server-hosted Valheim game.

Vanilla only pauses when you host the world yourself and nobody else is connected. On a dedicated server the menu never pauses anything: the day rolls on, raids fire, your smelter finishes and the boar you were fighting keeps chewing. This mod gives you two ways to pause a server.

Everyone asking for a pause pauses the game

When every player online has asked for a pause, the world pauses, exactly like solo. Opening the ESC menu is how you ask; a mod can ask for you (see below):

  • Every client freezes (monsters, ships, physics, crafting, everything you see).
  • The server freezes its world clock, so day and night, weather, plant growth, fermenters, beehives and respawn timers stop too.
  • Raids and other random events are held.
  • A sleep time-skip in progress waits.

Alone on the server, that is just you: open the menu and the world stops. With friends, the game pauses the moment the last of you asks. Anyone closing their menu resumes it instantly, and so does a new player arriving (you will see a small message if your menu is still open).

While you have asked for a pause but the game keeps running because others are still playing, the label reads "Unpaused" in bright red, with "1/3 want to pause" underneath, so a pause you asked for and did not get is never silent.

Vanilla behavior is kept for hosted (non-dedicated) games, where the host already pauses when alone; with guests online the host's request counts like everyone else's.

Other mods can ask for a pause

Any mod that calls Valheim's own Game.Pause() and Game.Unpause() takes part, with no reference to this mod and no API to call. The request goes to the server like a menu request, counts towards "everyone has asked", and the red warning appears if it is refused. Two of ours do it: The Greatest Map pauses while the large map is open, and Grab Materials while the inventory panel is open.

For a mod that wants to show its own state, Game.IsPaused() is the honest answer: it is true only when the game really is frozen, whether this mod is installed or not. There is nothing else to query.

One caveat, and it is vanilla's: the game keeps a single pause flag, not a count. If two mods ask at once and one of them calls Game.Unpause(), the request is dropped for both. A mod that pauses for a panel should re-assert while its panel is open.

Admin pause

An admin (listed in the server's adminlist) presses the pause key, by default the keyboard's Pause key, to pause the whole server for everyone, whatever their menus:

  • Every client freezes, whether or not their menu is open.
  • Players who join during the pause are frozen as soon as they spawn.
  • The pause stays until any admin presses the key again. A non-admin who presses it gets a notice.
  • The label reads "Paused by ", and everyone gets a "Game resumed by " message afterwards.
  • Safety net: when the last player leaves, an admin pause is dropped, so the next player to log in is not frozen with nobody online to resume.

Console commands (F5): pms_pause toggles the admin pause like the key, and pms_status prints the state. On the dedicated server's own console pms_pause toggles directly, which is the way out if no admin is online.

The admin pause is designed for dedicated servers. On a hosted (non-dedicated) game the host freezes with everyone else, and a player joining during the pause may have to wait until it is lifted.

The on-screen label

A persistent label is shown while the game is paused, in solo games too: "Paused", or "Paused by ". When a pause has been asked for and the game is still running, it turns bright red and reads "Unpaused", with "1/3 want to pause" on a second line in a smaller font. It waits half a second first, so the trip to the server and back never flashes red, and it stays quiet during the intro and cinematics. Texts, position (top or bottom) and size are configurable, and each mode can be turned off.

Telling a monitor or dashboard

The server keeps a

安裝與使用 安裝:BepInEx 外掛

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

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

前置依賴

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

denikson-BepInExPack_Valheim

檔案與校驗

檔案名稱
PauseMyServer-1.5.0.zip
檔案大小
23.3 KiB