• Journey's End on PC - Find info here and here. Please report bugs and issues for PC 1.4 and 1.4.1 to Re-Logic here.
  • Journey's End on Mobile - Find info here. Report bugs for Mobile 1.4 to DR Studios at this link and give as much detail as possible.
  • 1.4 will bring many changes to the PC version. We strongly advise making plans to back up your worlds and players prior to updating your game. More details here.
  • Console and Switch - The latest news can be found here. To report a bug, please use this link.

tModLoader ItemMagnetPlus - Customizable Item Magnet

direwolf420

Terrarian
ItemMagnetPlus


UPDATE: v1.0.2.1 is out, check the changelogs!

(For older versions of this mod, download them here)

ItemMagnetPlus adds a single item called "Item Magnet" that does the obvious thing: Sucking in items around you so you don't have to run around and collect them yourself. It is available on the Mod Browser.

Adds:
Item Magnet (and corresponding buff) that
* can be crafted with simple materials (Iron/Lead)
* works while in your inventory
* can be toggled on and off
* has adjustable range and item succ speed
* has increased stats after killing bosses
* customizable via config ingame to fit your playstyle

How to use:
* Left click cycles through its ranges
* Right click shows current range (you can always check the stats on the buff tooltip)
* This right click functionality changes to "turn off" when "Buff" in the config is false
* Killing bosses improves its stats
* If you want it to either be on or off, change "Scale" in the config to anything but "Increase With Bosses"

Multiplayer:
* This mod is multiplayer compatible, the config is entirely server side, but the buff flag is forced to 1
* Items that are inbetween two players with magnets will "float"
* Due to the way the "grab delay" is only set in singleplayer, items dropped by the player will instantly latch onto the player, which is normal behavior
* Items might not get sucked up and turn into a "ghost" with the Auto Trash Mod enabled
* Lost items due to this bug won't be recovered
* Report any bugs in the forum thread (please)

Progression: (default config)
Starts with:
Range = 10 (blocks in each direction)
Velocity = 8
Acceleration = 8

Ends with: (killing Moonlord)
Range = 120 (one and a half screens)
Velocity = 32
Acceleration = 32

About the config:
* Buff decides if it gives you a corresponding buff icon to show the status of the magnet
* Held decides if the magnet works only when held
* "Activate on enter" decides if magnet should be automatically activated when entering the world
* Filter function: Presets (hearts, mana stars, coins, pickup effects), blacklist/whitelist
* Magnet stats are limited to sensible values (Range only goes up to about three screens in any direction)
* If you increase Vel or Acc too much from those recommended above, items might get "stuck" on you until you deactivate it again
* Beware of lag when increasing these values, especially range
* If the difference between velocity and acceleration is too big, items will go in circles around you or get stuck until you deactivate it
* After you change the values in the config, use the magnet again to take effect

Showcase


Github
direwolf420/ItemMagnetPlus

Changelog
v1.0.2.1: Fixed the "coin" dust not disappearing properly when grabbing coins

v1.0.2: Added "Activate on enter" setting that allows a magnet in your inventory to automatically activate itself when entering a world

v1.0.1.3: tml 0.11.7 update. Cleaner range indicator, now also shows when mouseovering the buff icon

v1.0.1.2: tml 0.11.6 update. Fixed unintended config saving in multiplayer, fixed preset filter being inverted

v1.0.1.1: Fixed incompatibility with Jpans Bags of Holding, the "Pickup Effect Items" setting will be ignored with this mod enabled

v1.0.1: Added filter for nebula pickup and modded items that have pickup effects (Thorium music notes for example), grabbed coins don't overproduce sparkles

v1.0.0.1 + 2: Fix velocity cap, other stat caps

v1.0: tml 0.11.4 update. Fixed multiplayer, updated to ingame config, fixed coin filter, added custom black/whitelist

v0.1.11: Added config flag to have the magnet work either from inside the inventory or only when held

v0.1.10: Scale spark rate on pulled items, fixed some desync bugs in MP, fixed grab bags being pulled in by all players

v0.1.9: Fixed desync bug with more than two players in MP

v0.1.8: Made config entirely server side now, the mod is stable in MP

v0.1.7: Made config entirely client side now

v0.1.6.2: Reverted hotfix

v0.1.6.1: Hotfix bug where items get deleted very rarely when opening crate-like things (now you won't attract items with a full inventory)

v0.1.6: Added persistency: Magnet now keeps its state when you respawn! (Also switched scale mode 0 and 2 around, check your config)

v0.1.5: Added new scale config mode: Keep all the buffs from killing bosses but don't shuffle through each range again upon activation

v0.1.4.1 + 2 + 3 + 4: Filter hotfix, fix stuck range when using magnet inside inventory, another filter hotfix

v0.1.4: Added blacklist "filter" to be able to filter hearts, mana stars and coins (for now)

v0.1.3: Added config flag "buff" to be able to decide if a buff should be applied while the magnet is active

v0.1.2: Added Buff- and Tooltip to show range, updated icons (Thanks to Harblesnargits!)

v0.1.1: Fixed incompatibility with Even More Modifiers, changed acceleration values (updating will set it back to default)

v0.1: Initial release

Credits

- Panini and her server for playtesting (check out her amazing TerrariaChatRelay mod!)
- Joeyrsp for bouncing off ideas and giving me the rights to use his mod name
- Cinnamonstrosity for suggestions and playtesting
- Harblesnargits for the sprites
- goldenapple for the config guide (the old config pre-ModConfig)
 
Last edited:

Virukino

Terrarian
Interesting mod. The sprite could use some shading, and is it 2x2 pixels?(terraria sprites are) But yeah, is cool.
 

[eXponentia]

Terrarian
So as much as I absolutely adore the idea of this mod (been looking for one for a while, the best I've found is magnets you have to be actively holding for them to work) I can't use it since I'm getting a game breaking bug.

The moment I left click with the magnet in my hand to increase the range, my controls lock up, and nothing works. Alt+f4 gets me out, and I reload, and I still can't move or do anything. So I disabled the mod, and bam, I can move again, everything's back to normal. I re-enable it to see if it was a one time thing, and the exact same thing happens again.

I'm using the default config, and a lot of mods, so there may be a conflict somewhere if this isn't re-producable by anyone else.

Also, while I'm here, I'd like to ask 2 questions: First, does the scaling work based just on unique bosses killed, therefore mod bosses would work and it would increase more than vanilla, or is it purely vanilla bosses killed? Second, what would the proper config look like if I wanted it to start off at 10 like it does, but scale to like 500, or is that not possible?
 

direwolf420

Terrarian
So as much as I absolutely adore the idea of this mod (been looking for one for a while, the best I've found is magnets you have to be actively holding for them to work) I can't use it since I'm getting a game breaking bug.

The moment I left click with the magnet in my hand to increase the range, my controls lock up, and nothing works. Alt+f4 gets me out, and I reload, and I still can't move or do anything. So I disabled the mod, and bam, I can move again, everything's back to normal. I re-enable it to see if it was a one time thing, and the exact same thing happens again.

I'm using the default config, and a lot of mods, so there may be a conflict somewhere if this isn't re-producable by anyone else.

Also, while I'm here, I'd like to ask 2 questions: First, does the scaling work based just on unique bosses killed, therefore mod bosses would work and it would increase more than vanilla, or is it purely vanilla bosses killed? Second, what would the proper config look like if I wanted it to start off at 10 like it does, but scale to like 500, or is that not possible?
I had no issues regarding the game locking up, this sounds odd. Are you sure you have a buff slot available? Do you see the buff apply before you freeze? Is the game fine if you just keep it in your inventory? Does the game freeze or can you just not move? I have only tried this in a 26-mod big mod pack and it worked fine for me.
Could you try only this mod and no others and test it?
For the first question, it only works for vanilla bosses right now
For the second question, you can set the scale to 1 (makes it so you can toggle all the ranges) and set range to 500. If you kill any bosses though the number will rise (by 10 per boss (side bosses like queen bee or king slime only increase velocity and acceleration))
 
Last edited:

[eXponentia]

Terrarian
I had no issues regarding the game locking up, this sounds odd. Are you sure you have a buff slot available? Do you see the buff apply before you freeze? Is the game fine if you just keep it in your inventory? Does the game freeze or can you just not move? I have only tried this in a 26-mod big mod pack and it worked fine for me.
Could you try only this mod and no others and test it?
For the first question, it only works for vanilla bosses right now
For the second question, you can set the scale to 1 (makes it so you can toggle all the ranges) and set range to 500. If you kill any bosses though the number will rise (by 10 per boss (side bosses like queen bee or king slime only increase velocity and acceleration))
I figured out the conflict, disabled every mod except magnet, and enabled 5 at a time until it stopped working, then narrowed it down. As soon as I got to the mod that conflicts I knew it'd be that one before I even tested it, it just seemed so obvious once I considered it.

https://forums.terraria.org/index.php?threads/even-more-modifiers-relaunch-beta.68438/

It assigns extra modifiers to weapons and armor. My guess is it tries to assign modifiers to the magnet and it breaks.
 

direwolf420

Terrarian
I figured out the conflict, disabled every mod except magnet, and enabled 5 at a time until it stopped working, then narrowed it down. As soon as I got to the mod that conflicts I knew it'd be that one before I even tested it, it just seemed so obvious once I considered it.

https://forums.terraria.org/index.php?threads/even-more-modifiers-relaunch-beta.68438/

It assigns extra modifiers to weapons and armor. My guess is it tries to assign modifiers to the magnet and it breaks.
I have found the cause of this bug, and it is fixed and updated.
 
Last edited:

[eXponentia]

Terrarian
Created a better showcase video, enjoy:
Awesome. One thing that I think you should really showcase more (if you ever bother to do another one) is that you don't have to be holding the magnet for it to work (which is what 99.9% of other mods have you do, or they have a pet that magnetises for you) and that you don't even have to have it on your hotbar, just in your inventory.

That is honestly 80% of the reason that this mod is a MUST have for me (the other 20% is the customization).

Also if possible, I'd love to have a config option to turn off the buff while still keeping the magnet on, because I run a bunch of mods and I'm running into buff slot issues where in a hectic fight my magnet gets turned off sometimes if enough buffs proc to over-ride it.
 

direwolf420

Terrarian
Awesome. One thing that I think you should really showcase more (if you ever bother to do another one) is that you don't have to be holding the magnet for it to work (which is what 99.9% of other mods have you do, or they have a pet that magnetises for you) and that you don't even have to have it on your hotbar, just in your inventory.

That is honestly 80% of the reason that this mod is a MUST have for me (the other 20% is the customization).

Also if possible, I'd love to have a config option to turn off the buff while still keeping the magnet on, because I run a bunch of mods and I'm running into buff slot issues where in a hectic fight my magnet gets turned off sometimes if enough buffs proc to over-ride it.
This is implemented in the new update, enjoy! I had to turn the "right click to show range" functionality into "turn off" in the no-buff mode since you have no easy way to turn the magnet off otherwise.
 

[eXponentia]

Terrarian
This is implemented in the new update, enjoy! I had to turn the "right click to show range" functionality into "turn off" in the no-buff mode since you have no easy way to turn the magnet off otherwise.
Awesome. There's always cycling through all the ranges, but yeah I guess that could get tedious after you've upgraded the range a bunch of times. I use a custom range anyway and just set it to not scale and just scale it myself as I get further in the game, so the range show option actually stopped working for me anyway, it just shows the default (lowest) range. Not really an issue since I'm at the point where the range extends off the screen anyway, so if it showed off the screen it'd be less obvious to know when I turn it off or on (would have to read the text).

Big commends for the prompt updates and improvements. Excited to see where this mod goes in the future, although it's already essentially feature complete for what I need from it. That's mostly why I'm excited to see if you come up with anything cool that I can't even think of.

This is definitely a must have mod for me, and I'll definitely be recommending it to the few of my friends that still play.
 

direwolf420

Terrarian
Awesome. There's always cycling through all the ranges, but yeah I guess that could get tedious after you've upgraded the range a bunch of times. I use a custom range anyway and just set it to not scale and just scale it myself as I get further in the game, so the range show option actually stopped working for me anyway, it just shows the default (lowest) range. Not really an issue since I'm at the point where the range extends off the screen anyway, so if it showed off the screen it'd be less obvious to know when I turn it off or on (would have to read the text).

Big commends for the prompt updates and improvements. Excited to see where this mod goes in the future, although it's already essentially feature complete for what I need from it. That's mostly why I'm excited to see if you come up with anything cool that I can't even think of.

This is definitely a must have mod for me, and I'll definitely be recommending it to the few of my friends that still play.
Thats good to hear that you are using the configuration options, I'm wondering what the context is with the range only showing 10 even tho yours is much bigger.
 

[eXponentia]

Terrarian
Thats good to hear that you are using the configuration options, I'm wondering what the context is with the range only showing 10 even tho yours is much bigger.
No clue, I currently have my velocity and acceleration at 32, and scale at 0, range at 500.

As you can see here https://imgur.com/2ID7b0D the range display shows 12 when I turn it on, but the text says 500. This is still on the last version, since I'm still playing since you updated (version 3 in the config).
 

direwolf420

Terrarian
ah it is in a different color than green, I made it so when the range is outside of that rectangle (over 60) it loops back to 10 and keeps on going
so you still have a sense of increments (but since you use scale 0 it doesnt matter)
 

Gopnik Bui

Terrarian
so i am having a glitch to where instead of the items coming to me they are being pushed away like i am the opposite of a succing magnet help?
 

Gopnik Bui

Terrarian
so i am having a glitch to where instead of the items coming to me they are being pushed away like i am the opposite of a succing magnet help?
nevermind my acceleration was at 42 so everything was being pushed away all i had to do was lower my acceleration in the config
 
Top Bottom