[Mod] Throwing Redo [throwing]

User avatar
Palige
Member
 
Posts: 101
Joined: Sun Nov 23, 2014 14:39
GitHub: paly2
IRC: Upsilon
In-game: Upsilon

[Mod] Throwing Redo [throwing]

by Palige » Sat Jan 07, 2017 12:10

A new implementation of throwing with a cleaner code and providing an API in order to be extendable.

Throwing mod by PilzAdam
Throwing mod by Jeija

This mod is able to replace both throwing mods above without issues (if you name its directory throwing, the itemstrings remain the same).

This mod is actively tested on the Eurythmia server.

GitHub repository (includes issue tracker)

Download
(Also available in .tar.gz)

Configuration and API documentation

Dependencies: default and farming (both included in the minetest game, you don't need to install them)
License for code: MPL-2.0
License for textures: Same as for the textures of the throwing mod by PilzAdam (WTFPL).


Bows:
  • Wooden Bow
  • Stone Bow
  • Steel Bow
  • Bronze Bow
  • Mese Bow
  • Diamond Bow

Arrows:
  • Arrow
  • Golden Arrow
  • Dig Arrow
  • Admin Dig Arrow
  • Teleport Arrow
  • Torch Arrow
  • Build Arrow
  • Drop Arrow
Last edited by Palige on Mon Jun 12, 2017 09:18, edited 6 times in total.
Sorry for my english : I am french...

Some of my minetest stuff:
MoreMesecons
Throwing Redo
PvP-Plus
A few other things

I'm hosting the Eurythmia server
 

User avatar
yzelast
Member
 
Posts: 53
Joined: Sun Oct 02, 2016 01:18
Location: Far Far Away
GitHub: yzelast
In-game: yzelast

Re: [Mod] Throwing Redo [throwing]

by yzelast » Sat Jan 07, 2017 17:07

Interesting.But when i get hitted by an arrow the game crashes with the following error:

init.lua 66: attempt to call method "get_player_name" (a nil value)
Last edited by yzelast on Sat Jan 07, 2017 18:15, edited 1 time in total.
Have a free time? So check it out my mods: Real Trees and Wood Plus
 

User avatar
Palige
Member
 
Posts: 101
Joined: Sun Nov 23, 2014 14:39
GitHub: paly2
IRC: Upsilon
In-game: Upsilon

Re: [Mod] Throwing Redo [throwing]

by Palige » Sat Jan 07, 2017 17:37

yzelast wrote:Interesting.But when i het hitted by an arrow the game crashes with the following error:

init.lua 66: attempt to call method "get_player_name" (a nil value)


Sorry for this bug ! Now fixed ;-)
Thank you for testing !
Sorry for my english : I am french...

Some of my minetest stuff:
MoreMesecons
Throwing Redo
PvP-Plus
A few other things

I'm hosting the Eurythmia server
 

Martno
Member
 
Posts: 77
Joined: Thu May 28, 2015 07:09
Location: Hungary

Re: [Mod] Throwing Redo [throwing]

by Martno » Sun Jan 08, 2017 20:24

I tested it a little, and it seems working great with mods redo. Cool.
 

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

Re: [Mod] Throwing Redo [throwing]

by texmex » Thu Jan 12, 2017 08:29

Nice mod! Some bugs though:

• Arrows are placeable. Becomes black and not digable.
• Torch arrow puts all torches upside down, regardless of landing surface direction. Minetest 0.4.15 with new 3d torches.
• Teleport arrow sometimes crash the client (but not the server). Sorry for no log this time.
 

User avatar
Palige
Member
 
Posts: 101
Joined: Sun Nov 23, 2014 14:39
GitHub: paly2
IRC: Upsilon
In-game: Upsilon

Re: [Mod] Throwing Redo [throwing]

by Palige » Thu Jan 12, 2017 20:00

texmex wrote:Nice mod! Some bugs though:

• Arrows are placeable. Becomes black and not digable.
• Torch arrow puts all torches upside down, regardless of landing surface direction. Minetest 0.4.15 with new 3d torches.
• Teleport arrow sometimes crash the client (but not the server). Sorry for no log this time.


Thank you very much for these reports!

The first bug is now fixed. A new setting has been added (defaulting to false): throwing.allow_arrow_placing. If it's true, the arrow can be placed as a normal node (now diggable and coloured). If it's false, the arrow cannot be placed.

The second bug looks really hard to fix. I have replaced minetest.set_node by minetest.place_node, so that the torch is now placed vertically. However, now, it can only be placed if there is a non-air node under it, because it's an attached node (if it cannot be placed in non-creative mode, of course the torch goes back to your inventory).

I tried to reproduce the last bug, but the teleport arrow never crashes for me...
Sorry for my english : I am french...

Some of my minetest stuff:
MoreMesecons
Throwing Redo
PvP-Plus
A few other things

I'm hosting the Eurythmia server
 

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

Re: [Mod] Throwing Redo [throwing]

by texmex » Thu Jan 12, 2017 21:11

Sweet!

The teleport arrow bug could possibly have been triggered by moving fast and shooting the arrow into unloaded territory…
 

User avatar
Palige
Member
 
Posts: 101
Joined: Sun Nov 23, 2014 14:39
GitHub: paly2
IRC: Upsilon
In-game: Upsilon

Re: [Mod] Throwing Redo [throwing]

by Palige » Fri Jan 13, 2017 12:51

texmex wrote:The teleport arrow bug could possibly have been triggered by moving fast and shooting the arrow into unloaded territory…


No crash for me :/
Sorry for my english : I am french...

Some of my minetest stuff:
MoreMesecons
Throwing Redo
PvP-Plus
A few other things

I'm hosting the Eurythmia server
 

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

Re: [Mod] Throwing Redo [throwing]

by texmex » Mon Jan 16, 2017 23:03

Palige wrote:No crash for me :/

Perhaps a freak event :)

I wonder, could this mod be made to extend player's item drop feature? So that you may throw items longer, to a buddy on another cliff perhaps.
 

User avatar
Palige
Member
 
Posts: 101
Joined: Sun Nov 23, 2014 14:39
GitHub: paly2
IRC: Upsilon
In-game: Upsilon

Re: [Mod] Throwing Redo [throwing]

by Palige » Tue Jan 17, 2017 15:07

texmex wrote:I wonder, could this mod be made to extend player's item drop feature? So that you may throw items longer, to a buddy on another cliff perhaps.


Yeah, definitely, this can be done in 15 lines using the mod API ! And that's a great idea, I'm implementing it
Sorry for my english : I am french...

Some of my minetest stuff:
MoreMesecons
Throwing Redo
PvP-Plus
A few other things

I'm hosting the Eurythmia server
 

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

Re: [Mod] Throwing Redo [throwing]

by texmex » Tue Jan 17, 2017 15:16

Palige wrote:Yeah, definitely, this can be done in 15 lines using the mod API ! And that's a great idea, I'm implementing it


That's great! Because one should be able to…
+ Spoiler
 

User avatar
Palige
Member
 
Posts: 101
Joined: Sun Nov 23, 2014 14:39
GitHub: paly2
IRC: Upsilon
In-game: Upsilon

Re: [Mod] Throwing Redo [throwing]

by Palige » Tue Jan 17, 2017 18:08

texmex wrote:I wonder, could this mod be made to extend player's item drop feature? So that you may throw items longer, to a buddy on another cliff perhaps.


Done (in 20 lines)!
The dropped item is the item next to the arrow in the inventory.
The drop arrow can be crafted using a copper ingot (because I had no better idea...)
Last edited by Palige on Tue Jan 17, 2017 20:11, edited 1 time in total.
Sorry for my english : I am french...

Some of my minetest stuff:
MoreMesecons
Throwing Redo
PvP-Plus
A few other things

I'm hosting the Eurythmia server
 

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

Re: [Mod] Throwing Redo [throwing]

by texmex » Tue Jan 17, 2017 20:05

Tested it. The feature I hade in mind would extend the native Q key drop function. Perhaps throwing it longer the longer keypress before release. But I wasn't very clear at all, and drop arrow is cool and useful too!
 

User avatar
Palige
Member
 
Posts: 101
Joined: Sun Nov 23, 2014 14:39
GitHub: paly2
IRC: Upsilon
In-game: Upsilon

Re: [Mod] Throwing Redo [throwing]

by Palige » Tue Jan 17, 2017 20:20

texmex wrote:Tested it. The feature I hade in mind would extend the native Q key drop function. Perhaps throwing it longer the longer keypress before release. But I wasn't very clear at all, and drop arrow is cool and useful too!


Unfortunately, this is not possible, because the Minetest API does not provide any way to know whether a player is pressing the Q key (the only keys that the API can tell about are these ones).
Last edited by Palige on Mon Apr 03, 2017 19:09, edited 2 times in total.
Sorry for my english : I am french...

Some of my minetest stuff:
MoreMesecons
Throwing Redo
PvP-Plus
A few other things

I'm hosting the Eurythmia server
 

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

Re: [Mod] Throwing Redo [throwing]

by texmex » Tue Jan 17, 2017 22:45

Palige wrote:Unfortunately, this is not possible, because the Minetest API does not provide any way to know whether a player is pressing the Q key (the only keys that the API can tell are those).

Oh, i see. Well, at least I can start of my sneak key based mod based on this information.
 

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


Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 5 guests