HexenBeGone

版本 v1.1.0·更新於 2026-09-24

A switch for each way Hexen spawn, synced from the server. By default only stops natural Deep North spawns; dungeon and invasion Hexen stay. AI-assisted.

模組介紹 作者原文

HexenBeGone

A small BepInEx mod for Valheim that gives you a switch for each way Hexen can spawn. By default it only stops the natural Deep North spawns, the roaming Hexen that start showing up after you've destroyed the crystal in Mörkhalla. Hexen still appear in Mörkhalla and during Jotun invasions.

Settings sync from the server to every player, so everyone on a server plays by the same rules.

Spawn types

These are all the ways the base game spawns Hexen, taken from the game's own data:

| Setting | Default | Where Hexen come from |

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

| AllowNaturalSpawns | off | Roaming Deep North spawns (Jotun Witch Patrol), unlocked by the jotun_killed key. |

| AllowInvasionSpawns | on | Deep North spawns that only run during the Jotun invasion (Fimbulvinter - Jotun Witches). |

| AllowSpawnerStructureSpawns | on | The Black Ice core at Jotun invasion sites. When off, the core spawns Krigen instead. |

| AllowDungeonSpawns | on | The fixed spawn points in Mörkhalla rooms. |

| AllowRaidSpawns | on | Random raids. No vanilla raid includes Hexen, but this covers other creatures you add and mods that add raids. |

Every other creature always spawns as normal. To apply the same switches to other creatures, add their prefab names to AffectedPrefabs.

Installation

Install it on the server and on every player's game, like TameProtection:

| Installed on | Gameplay effect | Configuration |

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

| Players only | Works for the areas each player's game is running | Local, per-player |

| Server only | Nothing | — |

| Both | Works | Server decides; admins can edit it live |

Valheim runs spawning on the game of whichever player "owns" that part of the world, not on the server. So every player needs the mod, and a player without it still gets vanilla spawns around them. The server copy is what makes the settings authoritative. It pushes its synced settings to players when they connect. Without the mod on the server, each player just uses their own config.

A player without the mod isn't kicked. They just don't get the effect.

  • r2modman Mod Manager: install it like any other mod, on the server profile and on every player's profile.
  • Manual: copy plugins/HexenBeGone/ into BepInEx/plugins.

Configuration

The config file is BepInEx/config/n3bby.valheim.hexenbegone.cfg, created on first run.

| Setting | Default | Synced | Meaning |

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

| LockConfiguration | true | yes | While connected, only server admins may change synced settings. |

| AffectedPrefabs | JotunWitch | yes | Comma-separated creature prefab names the spawn switches apply to. |

| AllowNaturalSpawns | false | yes | See Spawn types. |

| AllowInvasionSpawns | true | yes | See Spawn types. |

| AllowSpawnerStructureSpawns | true | yes | See Spawn types. |

| AllowRaidSpawns | true | yes | See Spawn types. |

| AllowDungeonSpawns | true | yes | See Spawn types. |

| VerboseLogging | false | no | Logs every spawn this mod blocks. Noisy; testing only. |

Admins can change synced settings live from an in-game configuration manager.

How it works

Three Harmony patches, one for each part of the game that spawns creatures:

  • SpawnSystem.UpdateSpawnList: the periodic spawn loop. It covers natural spawns, invasion spawns (entries tied to a persistent event such as jotun_invasion), and raids (the active random event's list). Blocked entries are switched off for that one pass and switched straight back on afterwards.
  • SpawnArea.SelectWeightedPrefab: the pick made by spawner structures such as the Black Ice core. Blocked creatures are left out of the weighted pick, so the structure spawns one of its other creatures instead.
  • CreatureSpawner.Spawn: fixed spawn points such as Mörkhalla's. A blocked spawn point simply doesn't spawn. If the setting is switched back on later, it spawns as normal.

Config syncing uses ServerSync by blaxxun, included as source under its MIT license (ServerSync.LICENSE.txt).

AI disclosure

This mod was written with th

安裝與使用 安裝:BepInEx 外掛

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

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

前置依賴

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

denikson-BepInExPack_Valheim

檔案與校驗

檔案名稱
HexenBeGone-1.1.0.zip
檔案大小
54.1 KiB