Valheim
0 of 0

File information

Last updated

Original upload

Created by

urgemeuwu

Uploaded by

urgemeuwu

Virus scan

Safe to use

About this mod

Turn your character into an "item" magnet and pull loose items towards you. Items that are in the magnet's radius will fly towards your character. Stones, flint, berries, mushrooms, monster drops, wood, etc... will all fly towards your character. Ignores tamed animals food, filter out items from being pulled by the magnet easily.

Requirements
Permissions and credits
Overview
Turn your character into an "item" magnet and pull loose items towards you. Items that are in the magnet's radius will fly towards your character. Stones, flint, berries, mushrooms, monster drops, wood, etc... will all fly towards your character. The magnet feels bad about taking your tamed animal's food, so it won't do that. If Flying items are not your style you can turn on teleporting items which will instantly teleport items to your character instead of animating the item. Useful if you find that items are always getting stuck on ledges. Filter out items you don't want to be effected by the magnet by adding them to the filter list.
Features
  • Ignores items when you are encumbered.
  • Ignores food items if they are near a tamed animal.
  • Adjustable magnet radius.
  • Adjust magnet's speed.
  • Optional ability of teleporting of items in radius to player for faster item collection.
  • Two filter modes Allowlist and blocklist.
  • highly configurable

How to use
You can turn the magnet off and on using hotkeys. The default hotkey is F9. You can also change the way items move to your character by turning on or off item teleportation. The default hotkey to turn this on is ctrl+F9. You can change the default hot keys in the bepInEx configuration manager. You can filter out items you don't want to be affected by the magnet. This filter can be enabled and disabled via default hotkey (Z).  By clicking and dragging an item in your inventory and pressing the add item to filter hotkey (Shift+Z). You can do the same thing if you wish to remove an item from the filter.

You can also manually add it through bepInEx configuration manager. Item names can be found here https://valheim.fandom.com/wiki/Localization
 remove the “item_” at the beginning of the item name. For example if you wanted to manually add stone to the filter you would find stone on that list “Item_stone” remove it so you have “stone” then add it to the config. Make sure to separate items via comma!

Here is an example item filter string:coal,stone,bronze,copper,tin
Configuration 
You can adjust  the mod settings by changing them inside the bepInEx configuration helper. (pressing f1 and clicking on magnet Mod) Or you can edit the config manually at <valheim-folder>\BepInEx\BepInEx\config\urgemeuwu.magnetmod.cfg which is generated after running the mod for the first time. What you can change:
Magnet Settings   
  • Magnet On – Turn the magnet off when unchecked. 
  • Max Magnet Radius – How close an item needs to be to begin being pulled towards the player.   
  • Magnet Speed – How fast the magnet pulls items towards the player
  • Teleport Items – Instantly teleports in range items to the player instead of moving the item towards them when enabled.
  • Ignore Food Near Tamed Radius – When this option is enabled any consumable item near a monster in a tame state will big ignored
  • Ignore Food Near Tamed Animals – Determines how close a tamed monster has to be to an item for said item to be ignored. Great to increase if your pet monsters are in a huge pen.
Magnet Item Filter Settings
  • Item Filter – list of items that will be ignored by the magnet. Separated by comma.   
    Enable Item Filter – Enable or disable the magnet's item filter.
Hotkeys
  • Magnet Toggle
  • Teleport Toggle
  • Enable Magnet Filter 
  • Add Item To filter

Installation
  • Follow instructions to install bepInEx modloader.
  • Download and install with Vortex Mod Manager
or
  • download manually
  • put magnetMod.dll inside of <valheim-folder>\BepInEx\BepInEx\plugins folder.
Requirements

Recommended Mods


Change Notes
2.3.4
  • Code Recompiled to work with latest version of game

2.3.3
  • The hot key for adding or removing items now only works when an item is being dragged as intended.
  • Fixed a bug that would cause items near a filtered item to be sometimes ignored.
  • Added an optional filter mode called allowlist that will make magnetmod only pull items that are on your filter list. Essentially doing the opposite of the block list.
  • Item Filter code was cleaned up a little 
2.3.2
  • Hotkeys can now be used while holding other keys (such as movement keys) 
  • Added a magnet item filter to filter out items that you don't want to be effected by the magnet.
  • Added toggle hotkey to turn the magnet item filter on and off (Default is Z key)
  • Added the ability to add items to magnet filter (default is Shift+Z)
  • Detects when you make changes to magnet item filter via bepInEx configuration mod
2.2.1
  • Cleaned up code
  • No longer use harmony patches to access Player class and instead use static Player.m_localplayer field.(This might make this plugin play nicer on multiplayer?)
  • Moved magnet code to FixedUpdate method which should make the mod play more nicely with the unity physics engine.
  • Changed the code that handles how magnet moves items towards player in hopes to fix weird glitches causing items to float around your character and to prevent items flying away if speed is set too high.
  • Hotkeys now are disabled when using an interface like chat, map, signs, are open or if you are dead etc.
  • Hotkeys are now more easily configurable when using the bepInEx configuration manager.

2.1.0
  • added toggle message that displays when magnet  item teleport is turned on or off
  • Consumable items that are near tamable monsters will now be ignored. The item will only be ignored if the monster is in a tamed state and the item can be consumed by that monster.
  • Added an option to tweak how close items need to be near a tamed monster to be ignored by MagnetMod
  • Added an option to stop ignoring consumable items near tamed animals.
  • Added some extra checks to stop asynchronous code from running if the magnet has been toggled off
2.0.0     rewrote how magnet works on the back-end to get more control over how the magnet works. now uses our own code instead of just changing field values.
  •  added ability to adjust item speed when being pulled towards player.
  •  added toggle to teleport items to player when within range that's turned on by hitting ctrl plus set hotkey