HexenBeGone

v1.1.0·Updated 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.

About this mod Author’s original text

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

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.

Dependencies

Install these first, or the mod will not work:

denikson-BepInExPack_Valheim

File & checksum

Filename
HexenBeGone-1.1.0.zip
File size
54.1 KiB