Laredson-ServersideQoL_DuplicateSummonFix icon

ServersideQoL DuplicateSummonFix

Unofficial server-only fix preventing duplicate summon animation keys, such as Wizardry's staff_summon, from aborting ServersideQoL initialization.

Last updated 10 hours ago
Total downloads 4
Total rating 0 
Categories Mods Server-side
Dependency string Laredson-ServersideQoL_DuplicateSummonFix-0.1.2
Dependants 0 other packages depend on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2333 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.

Preferred version: 5.4.2333
ArgusMagnus-ServersideQoL-1.8.0 icon
ArgusMagnus-ServersideQoL

Serverside-only QoL mod, compatible with vanilla (e.g. XBox) clients. Stack from player inventories into nearby chests, generated portal hub, auto-sort chests, refuel smelters from containers, disable rain damage, infinite building/farming stamina and more

Preferred version: 1.8.0

README

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.