[0.11.x] Magnet

Topics and discussion about specific mods
Schmendrick
Fast Inserter
Fast Inserter
Posts: 222
Joined: Wed Apr 30, 2014 11:17 pm
Contact:

[0.11.x] Magnet

Post by Schmendrick »

Extremely simple mod, mainly created "just because."

Adds a new item, the magnet, crafted from a steel bar, a copper cable, and a battery. While held in hand, player picks up all items in a 16-tile radius. Basically, the "f" key on steroids.
magnetmp.jpg
magnetmp.jpg (216.4 KiB) Viewed 24790 times
Edit: fixed error when item(s) on ground were removed, even when player's inventory was too full to take it.

Changelog:
  • v1.1: magnet radius starts small, increases over about a second and a half to max radius. This should mitigate messiness when rearranging the magnet in inventory, or upon accidental selection.
  • v1.2: magnet radius is round.See post below for download; the download in this post is still the square one.
  • v1.2.1: magnet radius is round, fixed name compliance for 0.10.7
  • v1.3.1: works in multiplayer (probably won't in pre-0.11.x, old mod included for 0.10.x players)
  • v1.3.2: fixed bug where players who logged out with a magnet in hand kept sucking up items
  • v2.0.0: updated for 0.14. Square version removed.
Attachments
magnet_2.0.0.zip
(4.35 KiB) Downloaded 451 times
magnet_1.3.2.zip
(4.41 KiB) Downloaded 1838 times
Last edited by Schmendrick on Tue Nov 29, 2016 7:52 am, edited 13 times in total.
Like my mods? Check out another! Or see older, pre-0.12.0 mods.

Vitduo
Fast Inserter
Fast Inserter
Posts: 182
Joined: Sun Nov 17, 2013 7:28 pm
Contact:

Re: [0.9.8 +] Magnet

Post by Vitduo »

Very useful in battles for biters with mods DyTech and F-mod.
Thanks!

Schmendrick
Fast Inserter
Fast Inserter
Posts: 222
Joined: Wed Apr 30, 2014 11:17 pm
Contact:

Re: [0.9.8 +] Magnet

Post by Schmendrick »

Cleaned up a little; added English localization info and moved it to the logistics tab (with belts and splitters).
Like my mods? Check out another! Or see older, pre-0.12.0 mods.

Schmendrick
Fast Inserter
Fast Inserter
Posts: 222
Joined: Wed Apr 30, 2014 11:17 pm
Contact:

Re: [0.9.8 +] Magnet

Post by Schmendrick »

Version of the magnet with a round radius instead of a square one.
magnetround.jpg
magnetround.jpg (340.73 KiB) Viewed 26973 times
Edit: removed "magnetround.zip" during fix for 0.10.7, made round magnet standard.
Last edited by Schmendrick on Thu Aug 14, 2014 8:44 pm, edited 1 time in total.
Like my mods? Check out another! Or see older, pre-0.12.0 mods.

Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: [0.9.8 +] Magnet

Post by Rahjital »

This will come useful when I accidentally destroy a fully laden steel chest again. xD I would just prefer the radius to be a bit smaller so that I wouldn't drain the entire factory of resources when trying to clean up. xD

By the way, if this works under 0.10.1, you might want to change the headline of the topic not to put people off. ;)

Schmendrick
Fast Inserter
Fast Inserter
Posts: 222
Joined: Wed Apr 30, 2014 11:17 pm
Contact:

Re: [0.10.x, 0.9.8] Magnet

Post by Schmendrick »

Well, you can keep the radius small if you "let go" of the magnet and pick it up again (which is the other reason I chose to make the radius ramp up), but you could also permanently lower the max radius by editing the file, there is a conveniently labeled "magnetmax" variable right at the top of control.lua.

I could also rewrite it so there are a few different magnet sizes, if there is interest in such a thing.

Also yes, thank you for the note on the thread title. I actually intended to change it while I was updating the first post but forgot. :oops:
Like my mods? Check out another! Or see older, pre-0.12.0 mods.

Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: [0.10.x, 0.9.8] Magnet

Post by Rahjital »

I'll just set the initial and max radius the same so that it behaves like an F key with a larger radius. I'm a bit too used to it to learn a second system, I'm afraid.

Different magnet sizes would actually be a pretty nice thing to have. Ideally there would be a smart magnet with customizable radius, but I might be asking for too much here. :)

User avatar
CreeperDaReeper
Fast Inserter
Fast Inserter
Posts: 228
Joined: Fri May 23, 2014 8:59 pm
Contact:

Re: [0.10.x, 0.9.8] Magnet

Post by CreeperDaReeper »

Getting an error with the round magnet version.
Error

hoho
Filter Inserter
Filter Inserter
Posts: 677
Joined: Sat Jan 18, 2014 11:23 am
Contact:

Re: [0.10.x, 0.9.8] Magnet

Post by hoho »

Rahjital wrote:Different magnet sizes would actually be a pretty nice thing to have. Ideally there would be a smart magnet with customizable radius, but I might be asking for too much here. :)
What about having the radius increase the more a person clicks the button in a row without clicking any other key?

E.g player stands in one place and clicks on F (or whatever key they have bound to it) and it picks up stuff from non-magnet range. Every other click of F done within at most one second since last click increases the radius 1.5x.


Having multiple magnets seems like a huge waste of inventory space.

Schmendrick
Fast Inserter
Fast Inserter
Posts: 222
Joined: Wed Apr 30, 2014 11:17 pm
Contact:

Re: [0.10.x, 0.9.8] Magnet

Post by Schmendrick »

CreeperDaReeper wrote:Getting an error with the round magnet version.
Error
Rename the .zip file to "magnet" instead of "magnetround" maybe? If you unzip it the directory name is simply "magnet," I just renamed the .zip file for the upload.
Like my mods? Check out another! Or see older, pre-0.12.0 mods.

MtNak
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Fri May 16, 2014 4:03 pm
Contact:

Re: [0.10.x, 0.9.8] Magnet

Post by MtNak »

Thanks! :) Very useful!

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: [0.10.x, 0.9.8] Magnet

Post by cube »

Hi, There is a future bug in 0.10.7, because the mod name in info.json (Magnet) doesn't match the filename (magnet) and __magnet__ inside.
https://forums.factorio.com/forum/vie ... =14&t=5364

Schmendrick
Fast Inserter
Fast Inserter
Posts: 222
Joined: Wed Apr 30, 2014 11:17 pm
Contact:

Re: [0.10.x, 0.9.8] Magnet

Post by Schmendrick »

Fixed.
Like my mods? Check out another! Or see older, pre-0.12.0 mods.

User avatar
Lone_Player
Inserter
Inserter
Posts: 44
Joined: Sat Jul 12, 2014 9:56 am
Contact:

Re: [0.10.x, 0.9.8] Magnet

Post by Lone_Player »

Hello,

1. Thank you for this very useful mod, it save´s a lot of time, when u have to clean up the floor.

2. Factorio 10.6 + magnet_1.2.1.zip = Error Path _magnet_/graphics/magnet.png does not match any mod.

Solved = Rename magnet_1.2.1.zip = magnet.zip = Working

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.10.x, 0.9.8] Magnet

Post by Rseding91 »

Lone_Player wrote:Hello,

1. Thank you for this very useful mod, it save´s a lot of time, when u have to clean up the floor.

2. Factorio 10.6 + magnet_1.2.1.zip = Error Path _magnet_/graphics/magnet.png does not match any mod.

Solved = Rename magnet_1.2.1.zip = magnet.zip = Working
I don't think the mod needs to be renamed (to include the version number) until 0.10.7 is out :)
If you want to get ahold of me I'm almost always on Discord.

Schmendrick
Fast Inserter
Fast Inserter
Posts: 222
Joined: Wed Apr 30, 2014 11:17 pm
Contact:

Re: [0.10.x, 0.9.8] Magnet

Post by Schmendrick »

Aw, dammit. So much for being proactive about being proactive. :roll:
Like my mods? Check out another! Or see older, pre-0.12.0 mods.

Schmendrick
Fast Inserter
Fast Inserter
Posts: 222
Joined: Wed Apr 30, 2014 11:17 pm
Contact:

Re: [0.10.x, 0.9.8] Magnet

Post by Schmendrick »

Proper update for multiplayer.
Like my mods? Check out another! Or see older, pre-0.12.0 mods.

User avatar
AlphaRaptor
Fast Inserter
Fast Inserter
Posts: 102
Joined: Wed Dec 03, 2014 6:58 pm
Contact:

Re: [0.10.x, 0.9.8] Magnet

Post by AlphaRaptor »

Schmendrick wrote:Proper update for multiplayer.
AWESOME WOHO , another Mod for MP , isnt that Awesome ?

I like mods like this , this makes the Gameplay easier :lol:
Live your life like you want.
Mods are still Awesome , and i love Mods , for every Game.

Lov'in it.

Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: [0.11.x] Magnet

Post by Rahjital »

With the new 0.11 features, it would be nice if one of the smaller magnets was a part of power armour.

Schmendrick
Fast Inserter
Fast Inserter
Posts: 222
Joined: Wed Apr 30, 2014 11:17 pm
Contact:

Re: [0.11.x] Magnet

Post by Schmendrick »

Always on???
Like my mods? Check out another! Or see older, pre-0.12.0 mods.

Post Reply

Return to “Mods”