[Mod] Throwing, PilzAdam version [throwing]

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

by BrunoMine » Fri Sep 27, 2013 02:14

did not work! Took no damage.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

by philipbenr » Fri Sep 27, 2013 03:32

Adam, could you add damage support in Simple mobs. I have a whole castle to defend from oekkri and stone monsters.
"The Foot is down!"
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

by BrunoMine » Fri Sep 27, 2013 13:30

Help! Can someone help me. I played in multiplayer and did not work properly. There was no damage. I used the arrow cooreta but did not.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Fri Sep 27, 2013 13:39

I finally stoped being lazy for 1 minute and upgraded to the new damage system; everything should work now.
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

by BrunoMine » Fri Sep 27, 2013 15:21

PilzAdam wrote:I finally stoped being lazy for 1 minute and upgraded to the new damage system; everything should work now.


...........................
....__________... ____________
...| |... / \
...| (O) (O) |... -< THANK YOU!!! )
...| _ _ |... \____________/
...| \ \__ / / |...
...|__"""""""__|...
........| |........
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

User avatar
Mossmanikin
Member
 
Posts: 599
Joined: Sun May 19, 2013 16:26

by Mossmanikin » Fri Sep 27, 2013 17:29

Yes! Works fine.
Finally one can hunt with bow and arrow again. :)

Noob 4 life!
My stuff
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

by BrunoMine » Wed Oct 09, 2013 02:00

If I want to disable the mod in my server.
This can damage the server? Or let it slow?

I think of disable and enable the mod constantly. (for any purpose)

What do you say to that?
Last edited by BrunoMine on Wed Oct 09, 2013 02:09, edited 1 time in total.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Wed Oct 09, 2013 14:55

brunob.santos wrote:If I want to disable the mod in my server.
This can damage the server? Or let it slow?

I think of disable and enable the mod constantly. (for any purpose)

What do you say to that?

I dont know what you mean by "damage the server". If you remove it then people get unkown items in their inventories instead of the bows and arrows, and arrows in the world will show up as unknown objects. When you re-enable the mod, then the unknown objects and items should turn back into what they were originally.
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

by BrunoMine » Wed Oct 09, 2013 17:31

PilzAdam wrote:
brunob.santos wrote:If I want to disable the mod in my server.
This can damage the server? Or let it slow?

I think of disable and enable the mod constantly. (for any purpose)

What do you say to that?

I dont know what you mean by "damage the server". If you remove it then people get unkown items in their inventories instead of the bows and arrows, and arrows in the world will show up as unknown objects. When you re-enable the mod, then the unknown objects and items should turn back into what they were originally.


alright! but anyway.
If I just turn off. the server is slow?
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Wed Oct 09, 2013 18:11

brunob.santos wrote:
PilzAdam wrote:
brunob.santos wrote:If I want to disable the mod in my server.
This can damage the server? Or let it slow?

I think of disable and enable the mod constantly. (for any purpose)

What do you say to that?

I dont know what you mean by "damage the server". If you remove it then people get unkown items in their inventories instead of the bows and arrows, and arrows in the world will show up as unknown objects. When you re-enable the mod, then the unknown objects and items should turn back into what they were originally.


alright! but anyway.
If I just turn off. the server is slow?

No, there is no reason why disabling a mod would slow down the server. In fact, disabling mods should speed up the server (depends on the mod, though).
 

User avatar
Melkor
Member
 
Posts: 285
Joined: Sat Sep 24, 2011 01:03

by Melkor » Thu Oct 10, 2013 01:17

I tried making my own arrows for this mod, using my very very old WCC mod as a container for experiments, replacing the weighted cube for this:

Image

but that didn't work in the Throwing mod:

Image

Now they are darts, they are almost invisible :)

here is the arrow if anyone is interested:

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
--        stick
        {-0.5,0.0,0.0, 0.5,0.06250,0.06250},

--        point
        {-0.43750,0.06250,-0.0, -0.31250,0.12500,0.06250},
        {-0.43750,-0.06250,0.0, -0.31250,0.0,0.06250},

--        feather up
        {0.18750,0.06250,0.0, 0.43750,0.12500,0.06250},
        {0.25000,0.12500,0.0, 0.43750,0.18750,0.06250},
--        feather down
        {0.18750,-0.06250,0.0, 0.43750,0.0,0.06250},
        {0.25000,-0.12500,0.0, 0.43750,-0.06250,0.06250},
--        feather right
        {0.18750,0.0,-0.0625, 0.43750,0.06250,0.0},
        {0.25000,0.0,-0.12500, 0.43750,0.06250,-0.06250},
--        feather left
        {0.18750,0.0,0.06250, 0.43750,0.06250,0.12500},
        {0.25000,0.0,0.12500, 0.43750,0.06250,0.18750},
 

User avatar
DaN
Member
 
Posts: 82
Joined: Sat Apr 06, 2013 19:09

by DaN » Fri Oct 18, 2013 02:34

The throwing mod isn't working for me now (migrated from 0.4.6 to 0.4.7-dev); I left-click, it acts like a regular item (you punch with it). No arrows are shot, and no arrows are lost. Any ideas?

EDIT: My bad. It seems I have to equip arrows in one of my main slots and then shoot the bow.
Last edited by DaN on Fri Oct 18, 2013 23:13, edited 1 time in total.
DaN H.
 

User avatar
DaN
Member
 
Posts: 82
Joined: Sat Apr 06, 2013 19:09

by DaN » Fri Oct 18, 2013 02:35

Melkor wrote:I tried making my own arrows for this mod, using my very very old WCC mod as a container for experiments, replacing the weighted cube for this:

http://i288.photobucket.com/albums/ll190/melkor_666/MineTest/screenshot_18319620_zps71193162.png

but that didn't work in the Throwing mod:

http://i288.photobucket.com/albums/ll190/melkor_666/MineTest/screenshot_19421655_zpscaa47239.png

Now they are darts, they are almost invisible :)

here is the arrow if anyone is interested:

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
--        stick
        {-0.5,0.0,0.0, 0.5,0.06250,0.06250},

--        point
        {-0.43750,0.06250,-0.0, -0.31250,0.12500,0.06250},
        {-0.43750,-0.06250,0.0, -0.31250,0.0,0.06250},

--        feather up
        {0.18750,0.06250,0.0, 0.43750,0.12500,0.06250},
        {0.25000,0.12500,0.0, 0.43750,0.18750,0.06250},
--        feather down
        {0.18750,-0.06250,0.0, 0.43750,0.0,0.06250},
        {0.25000,-0.12500,0.0, 0.43750,-0.06250,0.06250},
--        feather right
        {0.18750,0.0,-0.0625, 0.43750,0.06250,0.0},
        {0.25000,0.0,-0.12500, 0.43750,0.06250,-0.06250},
--        feather left
        {0.18750,0.0,0.06250, 0.43750,0.06250,0.12500},
        {0.25000,0.0,0.12500, 0.43750,0.06250,0.18750},

Cool
DaN H.
 

User avatar
markbe
Member
 
Posts: 23
Joined: Thu Jun 06, 2013 23:00

Re: [Mod] Throwing, PilzAdam version [throwing]

by markbe » Wed Jul 09, 2014 11:49

A change to the default farming in Minetest 0.4.10 has unintentionally broken crafting of bows in Throwing by renaming/redefining gathered cotton to "cotton" rather than "string" (it possibly makes more sense)

As a work-around ... if you want to craft bows with cotton, add the following to the init.lua for throwing:
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
minetest.register_craft({
   output = 'throwing:bow_wood',
   recipe = {
      {'farming:cotton', 'default:wood', ''},
      {'farming:cotton', '', 'default:wood'},
      {'farming:cotton', 'default:wood', ''},
   }
})

minetest.register_craft({
   output = 'throwing:bow_stone',
   recipe = {
      {'farming:cotton', 'default:cobble', ''},
      {'farming:cotton', '', 'default:cobble'},
      {'farming:cotton', 'default:cobble', ''},
   }
})

minetest.register_craft({
   output = 'throwing:bow_steel',
   recipe = {
      {'farming:cotton', 'default:steel_ingot', ''},
      {'farming:cotton', '', 'default:steel_ingot'},
      {'farming:cotton', 'default:steel_ingot', ''},
   }
})


There's probably a more efficient way of making that work but I don't know LUA yet :-)

Another idea is crafting string from cotton but that's too tricky for me just yet
 

User avatar
SAMIAMNOT
Member
 
Posts: 363
Joined: Wed Sep 03, 2014 00:51
In-game: notanewbie

Re: [Mod] Throwing, PilzAdam version [throwing]

by SAMIAMNOT » Thu Oct 09, 2014 04:12

Im totally getting this. I would like to see some official screenshots though, Pilz--ahem--Adam.
I test mines.
 

User avatar
SAMIAMNOT
Member
 
Posts: 363
Joined: Wed Sep 03, 2014 00:51
In-game: notanewbie

Re:

by SAMIAMNOT » Thu Oct 09, 2014 04:16

DeepGaze wrote:real bomb explodes at target


Grenade?
I test mines.
 

User avatar
LodeRunner
Member
 
Posts: 25
Joined: Mon Nov 17, 2014 03:14

Re: [Mod] Throwing, PilzAdam version [throwing]

by LodeRunner » Mon Nov 17, 2014 04:41

Folks,

I've been trying to learn lua and minetest by reading the code for a bunch of mods. One of the items that I'm most interested in is the bow/arrow model, as I'd like to eventually create additional mobs who use bows also, sort of like the skeletons from MC but not exactly. Therefore, I had some questions:

1) Just as a learning experience, I tried to adapt the TNT arrow from the original throwing mod to this one. However, it uses the iron-TNT item from the nuke mod which is not what I prefer. I'd like to stick with the existing TNT mod that is part of the base install. However, when looking at the code, I don't think that I can detonate the default TNT by just hitting it or having it hit something else--I don't think that it's coded for that. Being new to lua, I wasn't sure if the code for how detonation happens should be taken from tnt:tnt or from the code for the arrow itself.

2) Other than including a reference to tnt:tnt in the crafting recipe and the depends.txt, would I need to reference the tnt:tnt lua code in any way? Does lua use cross-referencing like this, or does all the code have to reside in the lua file for the arrow?

3) Does this item (a TNT arrow) already exist for this version of the throwing mod?

4) I had also thought about creating an arrow that would attach a "torch" to wherever the arrow hits/lands, thereby allowing to get torches to otherwise inaccessible locations. Does a "torch arrow" already exist?

5) Would it make sense to develop an api.lua file that would hold common code about arrows? It seems that this mod has lots of potential, not only for players but new mobs as well. Not knowing enough to know better, this seemed like a legit question.

Thanks for any help!
LodeRunner
Wait...didn't I just explore this cavern?
 

User avatar
SAMIAMNOT
Member
 
Posts: 363
Joined: Wed Sep 03, 2014 00:51
In-game: notanewbie

Re: [Mod] Throwing, PilzAdam version [throwing]

by SAMIAMNOT » Sat Nov 22, 2014 03:17

Im not sure about the coding part but from what I remember you nee a fuse to detonate TNT. If you arent planning to make Skelly throw gunpowder and fire along with his TNT you might have to reference to the detonating code. If the TNT mod uses a function to detonate the TNT just referring to the function should do the trick.
Sorry if my advice doesnt help. I sont know Lua but I do code in Python and JavaScript so I do kinda know what Im talking about. Kinda.
Im interested in this mod youre talking about, its a fascinating concept.
I test mines.
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

Re: [Mod] Throwing, PilzAdam version [throwing]

by Calinou » Sat Nov 22, 2014 18:51

LodeRunner wrote:Folks,

I've been trying to learn lua and minetest by reading the code for a bunch of mods. One of the items that I'm most interested in is the bow/arrow model, as I'd like to eventually create additional mobs who use bows also, sort of like the skeletons from MC but not exactly. Therefore, I had some questions:

1) Just as a learning experience, I tried to adapt the TNT arrow from the original throwing mod to this one. However, it uses the iron-TNT item from the nuke mod which is not what I prefer. I'd like to stick with the existing TNT mod that is part of the base install. However, when looking at the code, I don't think that I can detonate the default TNT by just hitting it or having it hit something else--I don't think that it's coded for that. Being new to lua, I wasn't sure if the code for how detonation happens should be taken from tnt:tnt or from the code for the arrow itself.

2) Other than including a reference to tnt:tnt in the crafting recipe and the depends.txt, would I need to reference the tnt:tnt lua code in any way? Does lua use cross-referencing like this, or does all the code have to reside in the lua file for the arrow?

3) Does this item (a TNT arrow) already exist for this version of the throwing mod?

4) I had also thought about creating an arrow that would attach a "torch" to wherever the arrow hits/lands, thereby allowing to get torches to otherwise inaccessible locations. Does a "torch arrow" already exist?

5) Would it make sense to develop an api.lua file that would hold common code about arrows? It seems that this mod has lots of potential, not only for players but new mobs as well. Not knowing enough to know better, this seemed like a legit question.

Thanks for any help!


Carbone has a modified throwing mod with torch arrows (places a torch at landing location), dig arrows (digs at landing location) and build arrows (builds obsidian glass at landing location). However, the torches will always be placed on their “ceiling” variation.
 

User avatar
LodeRunner
Member
 
Posts: 25
Joined: Mon Nov 17, 2014 03:14

Re: [Mod] Throwing, PilzAdam version [throwing]

by LodeRunner » Mon Nov 24, 2014 00:42

Samiamnot and Calinou,

Thanks for your feedback.

S - That helps me to flesh out what I was thinking. I wasn't sure about referencing the function, but I thought that might be necessary. Detonation will be the real trick here, methinks. If I do a skeleton-related mob, I was initially thinking of just normal arrows, that way I could confirm one piece of the puzzle at a time. Other projectiles would come later. *evil grin*

C - Thanks for the tip. Using the graphic for ceiling attachment may not be an issue at the start. I was just wanting to do a proof-of-concept mod for myself. If I were to get anything useful, I'd let everyone know what I developed, but I'm a bit too far away from that to say at the moment.

I'll keep working on this when I can. I have family members who are ill right now, so my time to invest is sporadic.
LodeRunner
Wait...didn't I just explore this cavern?
 

User avatar
LodeRunner
Member
 
Posts: 25
Joined: Mon Nov 17, 2014 03:14

Re: [Mod] Throwing, PilzAdam version [throwing]

by LodeRunner » Mon Nov 24, 2014 00:58

Folks,

Just in case this issue has plagued anyone, I wanted to cross-post a link to another discussion.

Several people asked if there was a way to have mobs drop their respective items when killed by arrows, as this didn't seem to be happening. Swords worked fine, but not arrows.

Here is a solution that may be helpful for people:

https://forum.minetest.net/viewtopic.php?f=11&t=3063&p=162717#p162717

I have tested it with hostile and non-hostile mobs, and it appears to work, but please see the boldface caveat in the explanation, as that may have an effect on its use.

Moderator - if cross-posting like this is a breach of policy, my apologies. Please adjust as you see fit.
LodeRunner
Wait...didn't I just explore this cavern?
 

User avatar
Samson1
Member
 
Posts: 92
Joined: Wed Apr 01, 2015 19:41
IRC: Samson1
In-game: Samson1

Re: [Mod] Throwing, PilzAdam version [throwing]

by Samson1 » Fri Aug 21, 2015 15:22

What this mod needs are much better textures for the textures that it has at the moment are so got that it does not look like an arrow, the bow does not have a pull back time and it does not have any animation. You can not have dig arrows/build arrows. I would think about changing the default textures and re making the mod
MT name: Samson1

MC name: MoJo4000
 

User avatar
benrob0329
Member
 
Posts: 1192
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
In-game: benrob03

Re: [Mod] Throwing, PilzAdam version [throwing]

by benrob0329 » Fri Aug 21, 2015 16:39

I use [throwing] enhanced, it's based off of this mod. As for the animation, this isn't currently possibe with the way that the HUD works.
 

User avatar
Samson1
Member
 
Posts: 92
Joined: Wed Apr 01, 2015 19:41
IRC: Samson1
In-game: Samson1

Re: [Mod] Throwing, PilzAdam version [throwing]

by Samson1 » Mon Aug 31, 2015 11:56

Do you think you could make the arrow stick into blocks? like wooden fence and wood and so on?
MT name: Samson1

MC name: MoJo4000
 

User avatar
Echoes91
Member
 
Posts: 67
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes

Re: [Mod] Throwing, PilzAdam version [throwing]

by Echoes91 » Sun Sep 13, 2015 11:41

If you're interested, my throwing enhanced mod which was forked from this one has now more complex reload and damage systems (with different reload times and stiffness), improved textures and contents (crossbows, spears and many different arrows) and it's still being developed.
If you like sticking arrows have a look at the basic bow mod, which already implements it; I'm also looking at its code but I'm still not sure if adding such a feature.
"It wasn't easy to break so many functions by editing a single line"
 

User avatar
pithy
Member
 
Posts: 252
Joined: Wed Apr 13, 2016 17:34
GitHub: pithydon

Re: [Mod] Throwing, PilzAdam version [throwing]

by pithy » Tue Apr 26, 2016 16:30

Would it be possible to make this work with an armor mod so that you put your bow in your shield slot to allow you to throw arrows?
 

saavedra29
Member
 
Posts: 10
Joined: Mon Mar 06, 2017 00:19
GitHub: saavedra29

Re: [Mod] Throwing, PilzAdam version [throwing]

by saavedra29 » Sun Mar 12, 2017 20:25

Hello, thank's for this great code.
I'm making some changes to fit it in my own needs. But since i focus on realism i want to make it impossible for the bow to reload and shoot if at least (for example) 2 seconds haven't past since the last shot. But on this mod i can shoot every single moment i press the key. The "punch" function confuses me.
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
obj:punch(self.object, 1.0, {
    full_punch_interval=1.0,
    damage_groups={fleshy=damage},
}, nil)


Here i see two 1.0s and thought one of them would create some forced delay. But it doesn't. Does anyone have an idea how to implement this "delay"?
 

Previous

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 8 guests

cron