[Mod] Item Drop [item_drop]

User avatar
jordan4ibanez
Member
 
Posts: 1876
Joined: Tue Sep 27, 2011 18:44
Location: Rhode Island, USA
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

[Mod] Item Drop [item_drop]

by jordan4ibanez » Sat Feb 06, 2016 03:44

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.
Last edited by jordan4ibanez on Mon Nov 21, 2016 00:30, edited 10 times in total.
If you can think it, you can make it.
 

Martin_Devil
Member
 
Posts: 190
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48
 

User avatar
jordan4ibanez
Member
 
Posts: 1876
Joined: Tue Sep 27, 2011 18:44
Location: Rhode Island, USA
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

Re: [Mod] Item Drop Reloaded [item_drop]

by jordan4ibanez » Sun Feb 07, 2016 07:47

Martin_Devil wrote:Wow, +1!!!

Thanks.

I updated it to use moveto to prevent lag from breaking item collection and player throws item farther.
If you can think it, you can make it.
 

Martin_Devil
Member
 
Posts: 190
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48

Re: [Mod] Item Drop Reloaded [item_drop]

by Martin_Devil » Sun Feb 07, 2016 08:02

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!
 

User avatar
jordan4ibanez
Member
 
Posts: 1876
Joined: Tue Sep 27, 2011 18:44
Location: Rhode Island, USA
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

Re: [Mod] Item Drop Reloaded [item_drop]

by jordan4ibanez » Sun Feb 07, 2016 08:17

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.
If you can think it, you can make it.
 

User avatar
Splizard
Member
 
Posts: 220
Joined: Wed Jan 25, 2012 07:20
Location: New Zealand
GitHub: Splizard
IRC: Splizard
In-game: Splizard

Re: [Mod] Item Drop Reloaded [item_drop]

by Splizard » Tue Feb 09, 2016 04:21

Is it possible for the food particles to just be a similar colour to the food or a subset of the image?
Games: The Hungry Games.
Mods: Lifters (Simple Lifts), Snow Biomes and Gates.
Also checkout my texture pack Gridtoon!
View all of them plus more at http://minetest.splizard.com! (may not always be online).
 

User avatar
mahmutelmas06
Member
 
Posts: 367
Joined: Mon Mar 02, 2015 13:10
GitHub: mahmutelmas06
IRC: mahmutelmas06
In-game: masum

Re: [Mod] Item Drop Reloaded [item_drop]

by mahmutelmas06 » Sat Feb 13, 2016 21:46

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>
My Mods:

Beverage
 

User avatar
SaKeL
Member
 
Posts: 232
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [Mod] Item Drop Reloaded [item_drop]

by SaKeL » Mon Feb 15, 2016 17:50

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?
Follow my Collection for more Minetest creations found on my server or join the Community for the latest Server updates and news.

SaKeL
 

User avatar
cHyper
Member
 
Posts: 625
Joined: Fri May 06, 2011 08:49
Location: Austria
IRC: cHyper
In-game: cHyper
 

blert2112
Member
 
Posts: 244
Joined: Sat Apr 25, 2015 04:05
GitHub: blert2112

Re: [Mod] Item Drop Reloaded [item_drop]

by blert2112 » Thu Feb 18, 2016 00:38

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.
 

cy
Member
 
Posts: 43
Joined: Sun Jun 24, 2012 17:25

Re: [Mod] Item Drop Reloaded [item_drop]

by cy » Sat Apr 30, 2016 07:10

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.
 

DoyleChris
Member
 
Posts: 181
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: [Mod] Item Drop Reloaded [item_drop]

by DoyleChris » Sat May 07, 2016 12:57

How do you make the items that you dig go right into your inventory.
 

User avatar
xeranas
Member
 
Posts: 136
Joined: Fri Feb 05, 2016 11:06
GitHub: xeranas

Re: [Mod] Item Drop Reloaded [item_drop]

by xeranas » Sat May 07, 2016 18:17

How eating food particles related with item drop? Maybe worth to split into separate mod?
 

User avatar
azekill_DIABLO
Member
 
Posts: 6344
Joined: Wed Oct 29, 2014 20:05
Location: Inside the Box
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
jordan4ibanez
Member
 
Posts: 1876
Joined: Tue Sep 27, 2011 18:44
Location: Rhode Island, USA
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

Re: [Mod] Item Drop [item_drop]

by jordan4ibanez » Mon Nov 21, 2016 00:35

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
If you can think it, you can make it.
 

Martin_Devil
Member
 
Posts: 190
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48

Re: [Mod] Item Drop [item_drop]

by Martin_Devil » Mon Nov 21, 2016 00:38

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
 

User avatar
jordan4ibanez
Member
 
Posts: 1876
Joined: Tue Sep 27, 2011 18:44
Location: Rhode Island, USA
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

Re: [Mod] Item Drop [item_drop]

by jordan4ibanez » Thu Nov 24, 2016 01:45

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.
If you can think it, you can make it.
 

User avatar
mahmutelmas06
Member
 
Posts: 367
Joined: Mon Mar 02, 2015 13:10
GitHub: mahmutelmas06
IRC: mahmutelmas06
In-game: masum

Re: [Mod] Item Drop [item_drop]

by mahmutelmas06 » Thu Nov 24, 2016 07:16

Seems you have deleted food particles. Could you release it as a seperate mod ?
My Mods:

Beverage
 

User avatar
texmex
Member
 
Posts: 589
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Item Drop [item_drop]

by texmex » Thu Feb 09, 2017 19:50

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?
Last edited by texmex on Fri Feb 10, 2017 00:25, edited 4 times in total.
Taking a break from Minetest.
Mods Commons, Sling, hbSprint, Floodables, item_drop⑂, Telemosaic⑂, Herbs⑂.
Texturepacks Good Morning Craft
 

User avatar
GreenDimond
Member
 
Posts: 947
Joined: Wed Oct 28, 2015 01:26
Location: Just outside of existence.
GitHub: GreenXenith
IRC: GreenDimond
In-game: GreenDimond

Re: [Mod] Item Drop [item_drop]

by GreenDimond » Fri Feb 10, 2017 00:16

Welp, I want to try this, but if I enable it, Minetest disables it for me. Why?
My YouTube channel. I moderate the HOMETOWN Server. My Mods: Tac Nayn - Sandplus - Waffles - Pumpkin Spice ✂️- - - - - -
 

User avatar
burli
Member
 
Posts: 1463
Joined: Fri Apr 10, 2015 13:18

Re: [Mod] Item Drop [item_drop]

by burli » Tue Feb 21, 2017 13:56

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
 

User avatar
texmex
Member
 
Posts: 589
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Item Drop [item_drop]

by texmex » Tue Feb 21, 2017 15:03

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
Last edited by texmex on Thu May 04, 2017 07:15, edited 1 time in total.
Taking a break from Minetest.
Mods Commons, Sling, hbSprint, Floodables, item_drop⑂, Telemosaic⑂, Herbs⑂.
Texturepacks Good Morning Craft
 

Cage
Member
 
Posts: 32
Joined: Mon Oct 24, 2016 21:07

Re: [Mod] Item Drop [item_drop]

by Cage » Thu May 04, 2017 06:10

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.
 

User avatar
burli
Member
 
Posts: 1463
Joined: Fri Apr 10, 2015 13:18

Re: [Mod] Item Drop [item_drop]

by burli » Thu May 04, 2017 06:28

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
 

User avatar
Linuxdirk
Member
 
Posts: 998
Joined: Wed Sep 17, 2014 11:21
Location: Germany
GitHub: 4w
In-game: Linuxdirk

Re: [Mod] Item Drop [item_drop]

by Linuxdirk » Thu May 04, 2017 11:19

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 :(
 

Next

Return to Mod Releases



Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests