Page 1 of 3

[Mod] Item magnet and in-world node drops [item_drop]

Posted: Wed Mar 08, 2017 09:21
by texmex
Image

item_drop
A highly configurable mod providing item magnet and in-world node drops

Features
- pulls items to the player's inventory if item_drop.enable_item_pickup. (true by default)
- drops items in-world on dig if item_drop.enable_item_drop is set to true. (true by default)
- picks items one by one, sounds better.
- displays a particle of the item just picked above the player, useful in multiplayer

Settings
- Enable item pickups: Pick up items automatically.
- Enable item drops: Drop items in-world on dig, does nothing in creative mode.
- Use pickup key: Use a key to pick up items.
- Invert pickup key: Collect items when the key is not pressed instead of when it is pressed.
- Pickup keytype: What keytype to use as pickup key.
- Pickup sound gain: The volume of the pickup sound.
- Pickup radius: Player pickup radius, the maximum distance from which items can be collected.
- Magnet radius: Magnet radius, items between pickup_radius and this begin flying to the player.
- Magnet time: Item flight duration, items flying for more than this time are added to the player's inventory.
- Pickup age: Time delay in seconds after autopicking an item if it's dropped by a player.
- Pickup particle: Display a particle of the item picked up above the player
(All settings may be configured from Settings tab > Advanced settings > Mods > item_drop)
- Pickups by mouse disableable.

Notes
remove_items feature was removed as item_entity_ttl is now in engine.
Version 0.4.17 through 0.4.17.1 creates lag when moving entities. This is fixed in 0.5.0-dev.

Download (zip)
Source

Re: [Mod] Item drops, key-triggered item pickups [item_picku

Posted: Fri Mar 10, 2017 16:41
by Desour
Maybe nice.

Re: [Mod] Item drops, key-triggered item pickups [item_picku

Posted: Mon Jun 26, 2017 13:09
by texmex

Re: [Mod] Maintained item_drop, key-triggered pickup [item_d

Posted: Sun Jul 09, 2017 15:48
by texmex
(Edited first post to completely convert thread to be about item_drop)

Re: [Mod] Maintained item_drop, key-triggered pickup [item_d

Posted: Wed Aug 02, 2017 08:28
by LouisCyfer
sent you a PR via github, hope you like and agree to the updates

greets :)

Re: [Mod] Maintained item_drop, key-triggered pickup [item_d

Posted: Wed Aug 02, 2017 09:54
by Desour
@texmex: On github you could enable issues in the settings.

Re: [Mod] Maintained item_drop, key-triggered pickup [item_d

Posted: Wed Aug 02, 2017 10:16
by Phoenixflo44
like

Re: [Mod] Maintained item_drop, key-triggered pickup [item_d

Posted: Thu Aug 24, 2017 12:41
by texmex
PR merged, Github issues enabled.

Re: [Mod] Maintained item_drop, key-triggered pickup [item_d

Posted: Fri May 11, 2018 14:13
by Stix
This is really great! a plea: could you change the key from auxiliary to left-shift? thats how its set up on the survivalX server and it works great!
*EDIT: nvm, just tealized there was an option for that #dum.

Re: [Mod] Maintained item_drop, key-triggered pickup [item_d

Posted: Sun Jun 17, 2018 06:42
by texmex
Big rewrite by HybridDog merged into master. First post updated accordingly.

Re: [Mod] Maintained item_drop, key-triggered pickup [item_d

Posted: Mon Jun 18, 2018 08:28
by texmex
New multiplayer feature: Pickup particle. Display a particle of the item picked up above the player.

Sorry for the horrible gif
Image

Re: [Mod] Maintained item_drop, key-triggered pickup [item_d

Posted: Mon Jun 18, 2018 08:51
by texmex
All newish features are back in the dev branch since a fatal bug was discovered.

Re: [Mod] Maintained item_drop, key-triggered pickup [item_d

Posted: Mon Jun 18, 2018 11:29
by bosapara
How to setup it, if i need pickup only, not drop?
checked this, but doesnt work
local drop = minetest.settings:get_bool("enable_item_drop") ~= false

Re: [Mod] Maintained item_drop, key-triggered pickup [item_d

Posted: Mon Jun 18, 2018 18:56
by texmex
Sorry about that bug bosapara, I've committed a fix for it.

Re: [Mod] Maintained item_drop, key-triggered pickup [item_d

Posted: Mon Jun 18, 2018 22:10
by Otter
The option to delete instead of just drop might be nice for particular objects. Cobble and gravel both come to mind as targets for this.

Re: [Mod] Maintained item_drop, key-triggered pickup [item_d

Posted: Sat Jun 23, 2018 08:17
by texmex
The bug that caused the mod to crash when dropping 0 items has been resolved, and the dev branch has been merged into master with all the good new stuff.

Re: [Mod] Maintained item_drop, key-triggered pickup [item_d

Posted: Sat Jun 23, 2018 08:35
by texmex
Otter wrote:The option to delete instead of just drop might be nice for particular objects. Cobble and gravel both come to mind as targets for this.
I can look into it.

Re: [Mod] Item drops, pickups. Rewrite, new features [item_d

Posted: Wed Oct 03, 2018 03:34
by zasnool
Hello! I tried this mod to make blocks pickups like in mine clone 2, and this doesn't work quite as I would expect it to. Please explain the advanced settings to me. I also tried the other mod and it behaves closer to that in mine clone 2 game but the "dropped" blocks fly around to far and in random directions, it could jump five meters away from a player and you will have to go and get it anyway, because the magnet doesn't seem to work from that distance and you can't adjust it because the mod has no settings. So I looked to this mod, and the "magnet" doesn't work at all, the blocks just drop on the ground and you have to go and click on them manually to get them to your inventory. This is happening on default settings, as well ass when everything is disabled. I also tried to adjust pickup radius and magnet radius to up to 500 and nothings changed.
Does this mod requires something else for the magnet function to work? Or am I doing something wrong here?
Game version is 4.17 from minetest website.

Also, what does the number in the radius setting(for example pickup radius) mean? Is it how many blocks or meters away from player?

Re: [Mod] Item drops, pickups. Rewrite, new features [item_d

Posted: Wed Oct 03, 2018 05:29
by texmex
Hi! The mod is key triggered by default and the key is the Use key (usually E).

Re: [Mod] Item drops, pickups. Rewrite, new features [item_d

Posted: Wed Oct 03, 2018 06:47
by zasnool
texmex wrote:Hi! The mod is key triggered by default and the key is the Use key (usually E).
Oh, thanks! Setting it to inverted worked well.
Another question rises. The items seem to fly towards the player a bit slow, I would even say very slow, and not in constant pattern, they move unevenly, in gusts(going fast some millimeters and then slowing down, almost stoping, and then moving again until they reach a player). From approximately two block away they can take up to 5 or more seconds to reach the player. It is not fps issue, fps is 60. I can guess that the movement speed is in some setting. I tried to set pickup radius to 1.75 and magnet radius to 2 so that the difference would be very small, and I would imagine that the difference is the distance that the items travel from their initial point to the point where they are being picked up. Sadly it didn't work.
I must also say that I am new to the minetest. If this cannot be fixed by the settings, maybe it can be tweaked in the lua file, just point me in that direction if it is so.

Re: [Mod] Item drops, pickups. Rewrite, new features [item_d

Posted: Wed Oct 03, 2018 07:20
by texmex
I don't know why your problem arises. By adding only this setting…

Code: Select all

item_drop.magnet_radius = 5
… my pickups are smooth and fast.

Re: [Mod] Item drops, pickups. Rewrite, new features [item_d

Posted: Wed Oct 03, 2018 07:56
by zasnool
texmex wrote:I don't know why your problem arises. By adding only this setting…

Code: Select all

item_drop.magnet_radius = 5
… my pickups are smooth and fast.
Strange. Yes, that's what I want!

Here's what i get:
https://imgur.com/a/h0TlADe
All settings are default except the magnet radius.
Gif is 28mb

I want to add that in mineclone 2 it works well, hence I do not think it is the computer problem.

Re: [Mod] Item drops, pickups. Rewrite, new features [item_d

Posted: Wed Oct 03, 2018 08:01
by texmex
That sure is laggy, I'm sorry.

Could your graphic settings have something to do with it? Do you run any other mods? What's your OS, Minetest version etc?

Re: [Mod] Item drops, pickups. Rewrite, new features [item_d

Posted: Wed Oct 03, 2018 08:09
by zasnool
My fps is 60 at all times, for the test above I disabled all the other mods and this is the default minetest_game. Version is 0.4.17.1 OS is windows 8.1 x64

Re: [Mod] Item drops, pickups. Rewrite, new features [item_d

Posted: Wed Oct 03, 2018 08:24
by texmex
I've recreated the problem. I myself tried it on 0.4.16 and 0.5.0-dev. The problem is 0.4.17.1, possibly the whole 0.4.17 version. To my knowledge it's been a quite disastrous release. Since this seems like an engine bug, an issue has been filed here. (I've filed an issue on the mod's end too fwiw)

It's good that it's somehow fixed in 0.5.0-dev, so you should be good with one of these builds by core developer sfan5.