Fixed - SVM Compatibility and Scabbard Preservation
This release fixes gear not restoring on death when SVM is installed (GitHub #20), and melee weapons being deleted from non-managed Scabbard slots.
SVM Restoration Failure (CRITICAL)
Problem: When SVM is installed, it replaces MatchCallbacks via dependency injection, preventing RaidEndInterceptor from running. The fallback restoration in DeleteInventory was too late in SPT’s pipeline. By the time it ran, SetInventory had already copied the death-state inventory to the server profile.
Symptoms:
- Only Pockets restored on death (because Pockets container is always preserved)
- All other gear lost despite snapshot being taken
- Only occurs when SVM is installed
Fix: Override SetInventory in CustomInRaidHelper to restore snapshot items into postRaidProfile BEFORE base.SetInventory copies them to the server profile. The snapshot file acts as coordination: if RaidEndInterceptor already ran, it deleted the file so SetInventory finds nothing. If SVM prevented it, the file still exists.
Scabbard Deletion on Death (MEDIUM)
Problem: Melee weapons were being deleted from non-managed Scabbard slots. In normal Tarkov, melee weapons are never lost on death.
Fix: Added Scabbard to always-preserved slots in DeleteNonManagedSlotItems.
Technical
- New two-phase restoration: Phase 1 (SetInventory override) restores snapshot, Phase 2 (DeleteInventory override) handles selective deletion
- Removed fallback
TryRestore from DeleteInventory (was too late in the pipeline)
- Added
Constants.ScabbardSlot shared constant
- 48 tests passing (10 serialization + 38 restoration algorithm)
- All fixes are server-side only; client DLL version bumped but code unchanged
Contributors
- @theguy101 - Reported gear not restoring with SVM installed via GitHub #20
Compatibility
- SPT 4.0.x (tested on 4.0.11)
Installation
Extract the archive directly into your SPT root folder (where SPT.Server.exe is located).