Page 1 of 2

[Mod] Item Drop [item_drop]

PostPosted: Sat Feb 06, 2016 03:44
by jordan4ibanez
This is a mod of pilzadam original item drop.

Features:
  • New function to direct item to player using moveto to stop glitching when lagging
  • Items which fell straight down now have a random trajectory
  • Delay for pickup, you can now walk away from an item when you throw it on the ground
  • Made player throw item farther and will throw using player's velocity
  • Uses a gui to show what and how much of the item's you've collected

Video

Github

Download


License: WTFPL

Code: Select all
            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                    Version 2, December 2004

 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

 Everyone is permitted to copy and distribute verbatim or modified
 copies of this license document, and changing it is allowed as long
 as the name is changed.

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. You just DO WHAT THE FUCK YOU WANT TO.

Re: [Mod] Item Drop Reloaded [item_drop]

PostPosted: Sat Feb 06, 2016 20:33
by MoNTE48
Wow, +1!!!

Re: [Mod] Item Drop Reloaded [item_drop]

PostPosted: Sun Feb 07, 2016 07:47
by jordan4ibanez
Martin_Devil wrote:Wow, +1!!!

Thanks.

I updated it to use moveto to prevent lag from breaking item collection and player throws item farther.

Re: [Mod] Item Drop Reloaded [item_drop]

PostPosted: Sun Feb 07, 2016 08:02
by MoNTE48
jordan4ibanez wrote:
Martin_Devil wrote:Wow, +1!!!

Thanks.

I updated it to use moveto to prevent lag from breaking item collection and player throws item farther.

Please use Github!
By the way, too many food particles, it is a bit annoying! :)
I added it to MultiCraft - Best Minecraft clone based Minetest!

Re: [Mod] Item Drop Reloaded [item_drop]

PostPosted: Sun Feb 07, 2016 08:17
by jordan4ibanez
Martin_Devil wrote:
jordan4ibanez wrote:
Martin_Devil wrote:Wow, +1!!!

Thanks.

I updated it to use moveto to prevent lag from breaking item collection and player throws item farther.

Please use Github!
By the way, too many food particles, it is a bit annoying! :)
I added it to MultiCraft - Best Minecraft clone based Minetest!

You might want to download it again and readd it, I just fixed items falling down if server lags and items following players if they walk away from it and made it feel a little better

And that's awesome.

Re: [Mod] Item Drop Reloaded [item_drop]

PostPosted: Tue Feb 09, 2016 04:21
by Splizard
Is it possible for the food particles to just be a similar colour to the food or a subset of the image?

Re: [Mod] Item Drop Reloaded [item_drop]

PostPosted: Sat Feb 13, 2016 21:46
by mahmutelmas06
Code: Select all
2016-02-13 20:52:45: ERROR[Main]: ServerError: Runtime error from mod 'item_drop' in callback ScriptApiEnv::environment_Step(): D:\Oyun\Kurulan\Minetest\bin\..\mods\item_drop\init.lua:281: attempt to index local 'vel' (a nil value)
2016-02-13 20:52:45: ERROR[Main]: stack traceback:
2016-02-13 20:52:45: ERROR[Main]:    D:\Oyun\Kurulan\Minetest\bin\..\mods\item_drop\init.lua:281: in function 'func'
2016-02-13 20:52:45: ERROR[Main]:    D:\Oyun\Kurulan\Minetest\bin\..\builtin\game\misc.lua:18: in function 'update_timers'
2016-02-13 20:52:45: ERROR[Main]:    D:\Oyun\Kurulan\Minetest\bin\..\builtin\game\misc.lua:50: in function 'toregister'
2016-02-13 20:52:45: ERROR[Main]:    ...n\Kurulan\Minetest\bin\..\builtin\game\mod_profiling.lua:154: in function <...n\Kurulan\Minetest\bin\..\builtin\game\mod_profiling.lua:150>
2016-02-13 20:52:45: ERROR[Main]:    D:\Oyun\Kurulan\Minetest\bin\..\builtin\game\register.lua:361: in function <D:\Oyun\Kurulan\Minetest\bin\..\builtin\game\register.lua:341>

Re: [Mod] Item Drop Reloaded [item_drop]

PostPosted: Mon Feb 15, 2016 17:50
by SaKeL
I really like the minetest way of getting the drop item straight the way to the inventory but it would be a nice addition to pick up dropped items what didn't got straight to inventory (i.e. by killing a sheep the wool and meet falls always on the ground) while holding shift. Would it be possible to collect the dropped items only while holding shift and for the rest as default going straight to inventory?

Re: [Mod] Item Drop Reloaded [item_drop]

PostPosted: Tue Feb 16, 2016 19:48
by cHyper
+1 nice

Re: [Mod] Item Drop Reloaded [item_drop]

PostPosted: Thu Feb 18, 2016 00:38
by blert2112
My daughter opened her mailbox and my server crashed with the following error...
Code: Select all
2016-02-17 18:09:26: ERROR[Main]: ServerError: Runtime error from mod 'item_drop' in callback environment_Step(): ...esktop\minetest\bin\..\games\mk4\mods\item_drop\init.lua:281: attempt to index local 'vel' (a nil value)

Changed line 280 from...
Code: Select all
local vel = self.object:getvelocity()

..to..
Code: Select all
local vel = self.object:getvelocity() or {x=0, y=0, z=0}

...fixed the problem.

Re: [Mod] Item Drop Reloaded [item_drop]

PostPosted: Sat Apr 30, 2016 07:10
by cy
Did you see my fork of that item drop mod? I haven't tried this one you made out, but a few years ago I added to the PilzAdam one, preventing items from never expiring, and making items accelerate towards the player as they get close. It worked pretty good when I did it, but it's been a while, so I dunno if yours uses a better technique or not. Still, worth taking a look I hope. I did a lot of refactoring and cleanup too, to make it more readable.

Re: [Mod] Item Drop Reloaded [item_drop]

PostPosted: Sat May 07, 2016 12:57
by DoyleChris
How do you make the items that you dig go right into your inventory.

Re: [Mod] Item Drop Reloaded [item_drop]

PostPosted: Sat May 07, 2016 18:17
by xeranas
How eating food particles related with item drop? Maybe worth to split into separate mod?

Re: [Mod] Item Drop Reloaded [item_drop]

PostPosted: Sun May 08, 2016 09:22
by azekill_DIABLO
+1000

Re: [Mod] Item Drop [item_drop]

PostPosted: Mon Nov 21, 2016 00:35
by jordan4ibanez
I've updated the mod.
  • It's a little faster, tried to optimize as much as I could
  • Has a gui that shows you the items you've collected
  • Uses your velocity when throwing items

Here's a video https://youtu.be/iEbl417sgdM

Re: [Mod] Item Drop [item_drop]

PostPosted: Mon Nov 21, 2016 00:38
by MoNTE48
jordan4ibanez wrote:I've updated the mod.
  • It's a little faster, tried to optimize as much as I could
  • Has a gui that shows you the items you've collected
  • Uses your velocity when throwing items

Here's a video https://youtu.be/iEbl417sgdM

Thank you! +1

Re: [Mod] Item Drop [item_drop]

PostPosted: Thu Nov 24, 2016 01:45
by jordan4ibanez
I've updated it to work with mods that use the drop item function, mainly VanessaE's pipeworks mod. The changes throw items further from dispensers and so forth.

Re: [Mod] Item Drop [item_drop]

PostPosted: Thu Nov 24, 2016 07:16
by mahmutelmas06
Seems you have deleted food particles. Could you release it as a seperate mod ?

Re: [Mod] Item Drop [item_drop]

PostPosted: Thu Feb 09, 2017 19:50
by texmex
I like this mod! It's very snappy.

By glancing the code it looks like you're checking for sneaking key. Not knowing code that well I'm assuming it's for being able to drop a single item out of an item stack. Can't get that to work however, it throws the whole stack regardless of sneak key being pressed or not.

Coming from Minetest_TNG I'm kinda used to pressing the use key (E) to trigger the pickup function. What would you think of adding such feature to your mod?

Re: [Mod] Item Drop [item_drop]

PostPosted: Fri Feb 10, 2017 00:16
by GreenDimond
Welp, I want to try this, but if I enable it, Minetest disables it for me. Why?

Re: [Mod] Item Drop [item_drop]

PostPosted: Tue Feb 21, 2017 13:56
by burli
GreenDimond wrote:Welp, I want to try this, but if I enable it, Minetest disables it for me. Why?

Maybe you need to exit Minetest completely and then edit the setting. If you edit Minetest.conf while Minetest is running (even in main menu) any change will be overwritten

Re: [Mod] Item Drop [item_drop]

PostPosted: Tue Feb 21, 2017 15:03
by texmex
texmex wrote:Coming from Minetest_TNG I'm kinda used to pressing the use key (E) to trigger the pickup function. What would you think of adding such feature to your mod?


I managed to do it myself, here. :D

Re: [Mod] Item Drop [item_drop]

PostPosted: Thu May 04, 2017 06:10
by Cage
Can anyone tell me the right way to install this mod so that it works. I installed it per the readme and a few other ways. While it is activated it doesn't seem to work. Thanks in advance.

Re: [Mod] Item Drop [item_drop]

PostPosted: Thu May 04, 2017 06:28
by burli
Cage wrote:Can anyone tell me the right way to install this mod so that it works. I installed it per the readme and a few other ways. While it is activated it doesn't seem to work. Thanks in advance.

Are you in creative mode? Items don't drop in creative mode

Re: [Mod] Item Drop [item_drop]

PostPosted: Thu May 04, 2017 11:19
by Linuxdirk
Sometimes items dropping right in front of me (for example when harvesting a tree) just float a little towards me and then disappear without the item being added to my inventory and without the little "plopp" sound :(