ServersideQoL DuplicateSummonFix
Unofficial server-only fix preventing duplicate summon animation keys, such as Wizardry's staff_summon, from aborting ServersideQoL initialization.
About this mod Author’s original text
ServersideQoL Duplicate Summon Fix
Author: laredson
Unofficial, server-only compatibility patch for ServersideQoL 1.8.0.
It prevents PlayerSpawnedProcessor.Initialize from aborting when multiple modded summon staves use the same attack-animation key, for example:
System.ArgumentException: An item with the same key has already been added.
Key: staff_summon
This is known to occur with content packs that add multiple summon staves, including Wizardry.
What the patch changes
ServersideQoL inserts each summon animation into a dictionary with Dictionary.Add. A repeated animation key throws an exception. This patch changes only that insertion path:
- Unique key: behavior remains unchanged.
- Duplicate key: the configured duplicate policy is applied.
- Default Merge: merges tracked summon-prefab lists and uses the highest MaxSpawned value.
- KeepFirst and KeepLast: diagnostic fallback policies.
Because ServersideQoL indexes this data by animation rather than by individual staff, duplicate staves using the same animation share a combined summon cap under the default merge policy.
Installation
Install only on the dedicated server:
Valheim dedicated server/BepInEx/plugins/ServersideQoL.DuplicateSummonFix.dll
Clients do not need this patch.
Remove any earlier test build before installing this release.
Requires:
- BepInExPack Valheim 5.4.2333 or compatible
- ServersideQoL 1.8.0
Verification
At startup, the server log should contain:
[Info: ServersideQoL Duplicate Summon Fix] Patched PlayerSpawnedProcessor summon animation dictionary insertion.
When a duplicate is encountered, it logs the key once instead of throwing.
Configuration
Generated at:
BepInEx/config/laredson.serversideqol.duplicatesummonfix.cfg
Options:
- DuplicatePolicy = Merge — recommended.
- LogDuplicateKeys = true — logs each duplicate key once.
Tested with
- Valheim 0.221.12
- ServersideQoL 1.8.0
- Wizardry 1.1.8
Compatibility scope
Built specifically for ServersideQoL 1.8.0. If a future ServersideQoL version fixes the issue, remove this patch. If the target method changes, this patch logs an error and does not alter unrelated code.
This is an unofficial patch and is not affiliated with the ServersideQoL or Wizardry authors.
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- 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.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- 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.
Install these first, or the mod will not work: