SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Source-checkedQuality of life & UI

SwiftPickupMagnetFix

by Saru · for Valheim

Stops SwiftPickup's magnet from dragging items you cannot carry. Checks free slots, partial stacks and carry weight.

160Downloads
2 mo agoLast updated
BepInExLoaders
ThunderstoreSource

About SwiftPickupMagnetFix

From Thunderstore

Stops SwiftPickup's magnet from dragging items you cannot carry. Checks free slots, partial stacks and carry weight.

SwiftPickup Magnet Fix

SwiftPickup aimante les objets au sol sans jamais vérifier qu'ils peuvent entrer dans l'inventaire. Quand celui-ci est plein, les objets sont tirés vers le joueur, le ramassage échoue, puis ils sont réinjectés au scan suivant — ils finissent par suivre le joueur en permanence.

Ce plugin retire de la liste magnet tout objet que l'inventaire ne peut pas accepter. Il ne touche ni au ramassage, ni au merge des drops, ni au multiplicateur de loot.

Détail du test

Un objet est écarté si l'une des deux conditions échoue :

  • Inventory.CanAddItem(item) — cases libres ou pile partielle compatible
  • GetTotalWeight() + item.GetWeight() <= Player.GetMaxCarryWeight() — surcharge

Les deux comptent. CanAddItem ignore le poids, et c'est la surcharge qui bloque l'autopickup vanilla, d'où le second test.

Conséquence des piles partielles : avec zéro case libre mais une pile de bois à 30/50, le bois reste aimanté. C'est voulu — l'objet rentre réellement.

Fonctionnement

Prefix Harmony sur SwiftPickup.SwiftPickupPlugin.MoveMagnets, appelée à chaque frame depuis le postfix de Player.Update. La liste statique MagnetItems est purgée avant tout déplacement. HandleScan réinjecte les objets au scan suivant (0,15 s par défaut), le prefix les retire à nouveau avant la frame suivante : déplacement net nul.

Les internes de SwiftPickup sont résolus par reflection. Si une mise à jour renomme MoveMagnets ou MagnetItems, le plugin logge un avertissement et ne patche rien plutôt que de casser le jeu.

Configuration

BepInEx/config/saru.swiftpickup.tweaks.cfg

| Clé | Défaut | Effet | | --- | --- | --- | | Enabled | true | Active le filtrage de la liste magnet |

Compilation
dotnet build -c Release -p:Deploy=true

Les chemins ValheimDir et BepInExDir sont définis dans le .csproj et peuvent être surchargés en ligne de commande. Cibler net472 demande soit le package NuGet Microsoft.NETFramework.ReferenceAssemblies, soit le .NET Framework 4.7.2 Developer Pack.

Testé avec SwiftPickup 1.3.3 et BepInEx 5.

Highlights

From source data

Loaders

Runs on BepInEx.

Footprint

Rated a light load on a server.

Last update

Its author last shipped an update 2 mo ago.

SwiftPickupMagnetFix on Nxeon

From our catalogue
One-click install
Supported on Nxeon Valheim servers, for BepInEx servers. We download it from Thunderstore, place it, and restart the server.
Server type needed
BepInEx
Server load
light
Smallest plan we suggest
Valheim — 2 GB (2 GB RAM). This follows our own load rating above, not a benchmark.
Latest build
2.0.0, released 2026-09-20

Game versions by loader

LoaderGame versionsNewest
BepInEx

From 1 recorded build of SwiftPickupMagnetFix.

Dependencies

Declared by the newest build that lists any. Required ones are installed with it on one-click installs.

Run SwiftPickupMagnetFix on a Valheim server

Pick a server or deploy a new one above; it is installed in one click.

What kind of mod it is

From the catalog
Listed on Thunderstore as “Tweaks”

Quality of life & UI

Small conveniences, tweaks and interface improvements players notice straight away.

Compatibility

Game
Valheim
Loaders
BepInEx
Requires
One-click install needs a BepInEx server.

Verified at the source

  • ✓ThunderstoreOfficial listing, checked 2026-10-16Open ↗
  • ✓AuthorSaru, as published on Thunderstore
  • ✓LicenseNot published by the sourceFree

SwiftPickupMagnetFix, answered

Generated from the mod’s own source data.

Which loaders does it support?

BepInEx.

Is it free?

Yes. SwiftPickupMagnetFix is free to download from Thunderstore.

How do I add it to my Nxeon server?

Use “Add to a server” on this page, or open NxLabs from your dashboard. We install it, restart your server and switch it on.

NxLabs

Run SwiftPickupMagnetFix on a Valheim server.

Deploy in about a minute from $6.50 a month, then add SwiftPickupMagnetFix in one click.