[Mod] Item Drop [item_drop]

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
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

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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

Re: [Mod] Item Drop Reloaded [item_drop]

by Martin_Devil » Sat Feb 06, 2016 20:33

Wow, +1!!!
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
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: 1865
Joined: Tue Sep 27, 2011 18:44
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
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: 355
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

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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: 193
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: 587
Joined: Fri May 06, 2011 08:49
IRC: cHyper
In-game: cHyper

Re: [Mod] Item Drop Reloaded [item_drop]

by cHyper » Tue Feb 16, 2016 19:48

+1 nice
 

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...
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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...
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local vel = self.object:getvelocity()

..to..
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local vel = self.object:getvelocity() or {x=0, y=0, z=0}

...fixed the problem.
 

cy
Member
 
Posts: 31
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: 176
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: 99
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: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Item Drop Reloaded [item_drop]

by azekill_DIABLO » Sun May 08, 2016 09:22

+1000
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
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: 1865
Joined: Tue Sep 27, 2011 18:44
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: 355
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: 226
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.
I spend all my days going down to the mines. Under the ground where the sun never shines. Breaking my back I put heat in your house. I’ve got the roar of a digtron, the breath of a mouse.
 

User avatar
GreenDimond
Member
 
Posts: 460
Joined: Wed Oct 28, 2015 01:26
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?
I am Green. I tend to binge-post. "All of this over a 16x16 representation of a cartoon cat ?!?! what has this world come to..." -TenPlus1, 2017.
Diz mah mods! :D ↑ github.com/minetest/minetest_game/issues/1647#issuecomment-288134572 ↑
Sand Plus - Tac Nayn - Waffles - Coming Soon: Caverealms Plus
 

User avatar
burli
Member
 
Posts: 1313
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: 226
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
I spend all my days going down to the mines. Under the ground where the sun never shines. Breaking my back I put heat in your house. I’ve got the roar of a digtron, the breath of a mouse.
 


Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 26 guests

cron