[Mod] Throwing enhanced [maint.] [throwing]

User avatar
Echoes91
Member
Posts: 80
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

[Mod] Throwing enhanced [maint.] [throwing]

by Echoes91 » Post

Throwing enhanced
By Echoes91

This mod adds many bows, arrows and other stuff to be thrown, like spears, to Minetest.
It began as a fork of the good PilzAdam's throwing, which improved the first throwing mod by Jeija and still provides some functions. This mod aims at being the most complete throwing mod, so please fill it with any idea or possible improvement.

Get the lastest release here
To install, unzip the archive into a folder named 'throwing' inside your mod folder, or run

Code: Select all

git clone https://gitlab.com/echoes91/throwing.git
directly from your mod folder so that you can track changes by running

Code: Select all

git pull
after any update.
Browse the code

Dependencies: default, farming, dye (all included into minetest_game as for 0.4.12 and newer)
Optionals: bucket (fire arrows), fire (fire and tnt arrows), tnt (fireworks, shell and tnt arrows)

License:
Code under LGPLv2.1
Textures and sounds under CC-BY 3.0
Contents and code from tnt and old throwing mods, both released under WTFPL, are included.

Instructions: To shot an arrow, first place a bow in your hotbar and any arrow right next to it, then select the bow and load it with 'left click'. After it's reload time the bow, if still wielded, switches to being loaded, then it can throw the loaded arrow with 'left click' or be unloaded, giving back the arrow, with 'drop' (default 'Q'). A loaded bow stores the arrow as metadata, so it doesn't depend anymore on the arrow's stack; they can both be moved.
You can create a file named throwing.conf inside mod's directory which won't be overwritten to enable or disable any content you prefer, see throwing.conf.example. Note that some content is disabled by default.

Contents and recipes
Wood, stone and coal into the recipes can be any member of respective groups, metals must be ingots. Symmetric recipes (vertically mirrored) work too.
Please notice that everything is balanced against entities from the Mobs redo mod and NOT tested against armors for a PvP world.
Spoiler
  • Image Wooden bow: this light and cheap bow isn't much more than a stick bent with a string, it's very quick to reload but it's mediocre performances are only enough for some hunting

    | ____ | stick | ____ |
    | string | ____ | stick |
    | ____ | stick | ____ |

    Image Longbow: The glory of the Britons, a longbow is as tall as the archer and has unmatched weight and range between wooden self bows. However it requires great strength to be drawn and it's all but handy, reloading will take longer than with any other bow.

    | string | wood | ___ |
    | string | ___ | wood |
    | string | wood | ___ |

    Image Composite bow: combining different materials and well oriented fibers, this bow can achieve the same performance of a longbow while being lighter and easier to master, granting good resistance and reload time

    | string | wood | ____ |
    | string | ____ | steel |
    | string | wood | ____ |

    Image Steel bow: tough and heavy, this long lasting modern warfare bow throws stronger than any other bow but it's weight limits the rate of fire

    | string | steel | ____ |
    | string | ____ | steel |
    | string | steel | ____ |

    Image Royal bow: the longest lasting bow, it's superbly crafted and insanely expensive while providing overall average performances.

    | string | wood | diamond |
    | string | ____ | gold |
    | string | wood | diamond |
Spoiler
  • Image Crossbow: a crossbow is a dangerous and powerful weapon, its capable of throwing its darts with much more power than any bow, not requiring pure muscular force to be drawn. However it has its drawbacks, it must be held to the ground with a foot to be recharged with both arms, thus it can't be reloaded while running away, and the whole process takes much more time. Stay at distance and get the best from you much faster arrows, but remember that reloading will fail if you move!


    | wood | string | ____ |
    | steel | string | wood |
    | wood | string | ____ |

    Image Arbalest: this scary weapon wiped away all the old balance rules from the battlefield, making the lesser of the peasants capable of killing the most noble and well armoured knight within one shot and very little training. It is essentially the crossbow taken to the extreme, its mechanically driven drawning system outclasses the strength of any archer's arm so its darts will take any armour into very little consideration; on the other hand the arbalest it's expensive and takes even longer to reload then the crossbow, but will also last longer. Be prepared to switch for a close range weapon if your first shots should not be enough.

    | steel | string | stick |
    | steel | string | steel |
    | steel | string | stick |

    Image Automated arbalest: the ultimate weapon for the long range addicted ones has a pneumatic driven reloading system controlled by mese logics and is able to quickly draw itself beyond any voxel arm's strength and be ready for the most accurate and dangerous shot in few seconds. Beware that the whole system discharges quickly and it's not replaceable, which means that this super expensive tool will last even fewer shots than an ordinary crossbow. This should balance an otherwise OP weapon that's able to terminate quickly any living entity from great distance.

    | steel | string | mese crystal |
    | steel | string | steel |
    | steel | string | mese crystal |
Spoiler
Yes, these arrows are fireworks, throw them to the sky and watch it after 3 seconds. They may also be used as a temporary light source, but are meant only to be cool :)
  • Image Blue fireworks

    | stick | gunpowder | blue dye |

    Image Red fireworks

    | stick | gunpowder | red dye |
Spoiler
These arrow deal direct damage to any fleshy object they hit. The damage is proportional to the speed with a more than linear relation; better arrows add a constant "equivalent speed" to the calculation, thus damage increase is bigger when arrows are thrown faster. They have also a chance to break, so it's better not to waste stronger arrows with a poor bow, the risk would be much bigger than the benefits.
  • Image Stone arrow: cheap and raw, good for prehistorical style huntings

    | stick | stick | stone | for 16

    Image Steel arrow: affordable and well rounded arrow, better to have a supply

    | stick | stick | steel | for 16

    Image Diamond arrow: the hard hitting, longest lasting shiny arrow

    | stick | stick | diamond | for 16

    Image Obsidian arrow: the sharpest and hardest arrowhead will tear the fleshes dealing the highest damage, but it makes this arrow expensive and brittle

    | stick | stick | obsidian | for 16

    Image Shell arrow: this HE bullet explodes when it hits the target, dealing the same "kinetic" damage of a steel arrow plus a fixed terrific direct damage to any living thing; however it's expensive and single use, don't waste it!

    | stick | gunpowder | bronze | for 8
Spoiler
  • Image Build arrow: this arrow places an item from the stack right BEFORE the bow (on it's left on the hotbar) as a node, if possible, otherwise it falls as item. The hotbar sequence must be node - bow loaded with build arrow. If it doesn't break, the shovel can be found upon or buried into the node. Disabled by default

    | stick | stick | steel shovel | for 1

    Image Dig arrow: this arrow digs the node it hits. The pickaxe used in such a bad way has an high chance to break. Disabled by default

    | stick | stick | steel pickaxe | for 1

    Image Teleport arrow: this arrow teleports the player to the target it hits and leaves quantum physicists shocked. The mese fragment gets lost into another dimension. Disabled by default

    | stick | stick | mese crystal fragment | for 1

    Image Torch arrow: this arrow attaches a torch to the node it hits. The torch can be attached in any of the possible wallmonted positions, however it's a known glitch that the position will be wrong if hitting with a sharp angle. I've not been able to fix this by now.

    | stick | stick | coal | for 4
Spoiler
big, funny and potentially apocalyptic effects on your world, use with a lot of care on servers
  • Image Fire arrow: this incendiary arrow will make pyromaniacs happy. Practice FAR away from trees, grass and your beautiful wooden cottage. Disabled by default

    | stick | stick | lava bucket | for 1, the bucket won't be thrown

    Image TNT arrow: when you get bored of your world, why don't you become a bomber? This arrow explodes just like TNT, destroys living things and non living things and causes big fires . Somebody have also been able to destroy god (himself in creative mode with damage disabled), this shouldn't be possible with the code but who knows... Disabled by default

    | stick | TNT | bronze | for 1
Last edited by Echoes91 on Sun Oct 25, 2015 14:30, edited 47 times in total.

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Throwing enhanced [0.8] [throwing]

by Krock » Post

Finally there's an update for the older throwing mod :)
Some of those arrows are really special, I hope you'll get more ideas.

EDIT: This happens when I shoot a build arrow:

Code: Select all

14:57:50: ERROR[main]: Map::setNode(): Not allowing to place CONTENT_IGNORE while trying to replace "air" at (-22,2,31) (block (-2,0,1))
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Echoes91
Member
Posts: 80
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Throwing enhanced [0.8] [throwing]

by Echoes91 » Post

Thanks for appreciation :)
Ideas are waiting, some will be introduced soon while others depend on my understanding of the code or some external help.
Build arrows work, like the old one, by placing the item in the first inventory slot, which is also the first toolbar slot, as a node, so there must be something exactly into that slot which is also placeable. I may change it in the future if requested and if i understand how...
Individual item informations like this will be added soon too, as for recipes, but it takes some time. I want to see if the core and the post are correct and accepted before it.

Miner59
Member
Posts: 46
Joined: Mon Sep 22, 2014 19:14

Re: [Mod] Throwing enhanced [0.8.1] [throwing]

by Miner59 » Post

Hi,
you can add two arrows I made as addition for throwing mod:

golden arrow:
It's crafted with 2 sticks and a gold ingot, gives 16 arrows.
If you don't hit the target you aim for, you get it automatically back in your inventory.
Also teleports all things which animals drop when you hit them in your inventory.

steal arrow:
Crafted with a golden arrow and glue from mesecon mod, gives one steal arrow.
Maybe think of an alternative, so you don't need mesecons.
If you hit a player with this arrow you can steal an random item from his inventory.
To prevent really valuable items from stealing, i coded that the first 8 item slots are protected from stealing stuff from there
For animals it works like a golden arrow.


I made more bows, too.
You can copy some if you want.
And you can copy the code I added, so that you can pick things up from ground with a bow in your hand when you hold the "sneak" key.

Here you find my version of throwing mod: https://github.com/Miner59/hunting/tree/master/throwing
if obj:get_luaentity().name ~= "throwing:arrow_fire_entity" and obj:get_luaentity().name ~= "__builtin:item" then ...
This code is to search for all luaentities in a list of objects
"throwing:arrow_fire_entity" is the name of the arrow itself,
"__builtin:item" is an internal name for the dropped items laying on the map.
You don't want to "hit" this objects, only mobs or similar luaentities

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Throwing enhanced [0.8.1] [throwing]

by Don » Post

Great to see throwing being developed more.
+1
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
Echoes91
Member
Posts: 80
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Throwing enhanced [0.9] [throwing]

by Echoes91 » Post

Updated to 0.9 Bows have just become even more challenging, enjoy!
Finally found that "__builtin:item" on the wiki, code is almost good enough.
Keep on testing, new contents will be introduced soon.

@Miner59: thanks for suggestions! They'll all be introduced after code stabilization, however those arrows have quite powerful effects so they must be harder to obtain and maintain in order to keep it balanced

User avatar
Echoes91
Member
Posts: 80
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Throwing enhanced [0.9.1] [throwing]

by Echoes91 » Post

Updated to 0.9.1
Great improvement for torch arrows, now they can be very useful

User avatar
Minetestforfun
Member
Posts: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

Re: [Mod] Throwing enhanced [0.9.1] [throwing]

by Minetestforfun » Post

WoooOwwwW ! i waited for a throwing update since one year !

Thank you so much and keep up the good work; i will try your mod soon ! :)

PS : maybe you can take ideas from this tweaked mod => https://github.com/Ombridride/minetest- ... s/throwing)

Storm787
New member
Posts: 1
Joined: Tue Mar 10, 2015 15:26
In-game: Storm787

Re: [Mod] Throwing enhanced [0.9.1] [throwing]

by Storm787 » Post

How do you fire it? I tried both right and left click..and I even had an arrow...is there something I'm forgetting?

User avatar
Echoes91
Member
Posts: 80
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Throwing enhanced [0.9.2] [throwing]

by Echoes91 » Post

Updated to 0.9.2 See changelog

Added firing instructions to bow description, slowly completing the intro post

User avatar
Echoes91
Member
Posts: 80
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Throwing enhanced (bows and arrows) [0.9.3] [throw

by Echoes91 » Post

Updated to 0.9.3 See changelog

Now that the code is practically stable, it's time to take a decision about how to fix things for the stable release. I have to choose between a bow set coherent to the standard tool sets (all with same shape and recipe, changing colors and materials) or a more "historical" set with something like longbow, composite bow, crossbow etc. with more variable shapes and recipes. I'd like the second option more, but i fear it would become incoherent with the rest of the game and with itself too, while also being hard to render graphically due to tools being in fact 2D and all with same dimension. Since I'm not sure at all I'll start a pool and wait for some opinions before going on. In both cases some item and recipe will change for the last time to be adapted.
Last edited by Echoes91 on Wed Mar 11, 2015 17:57, edited 1 time in total.

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Throwing enhanced (bows and arrows) [0.9.3] [throw

by Don » Post

I vote for historical bows.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
HeroOfTheWinds
Member
Posts: 470
Joined: Wed Apr 23, 2014 23:16
GitHub: HeroOfTheWinds
IRC: WindHero
Location: Hawaii

Re: [Mod] Throwing enhanced (bows and arrows) [0.9.3] [throw

by HeroOfTheWinds » Post

Really liking how this is turning out. I, too, favor historical bows.

I'm thinking that this would be great to include in SkyTest.... Whenever I get around to implementing the other 5 mods I have sitting, waiting to be added...
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P

User avatar
lightonflux
Member
Posts: 384
Joined: Mon Nov 11, 2013 07:22
In-game: lof
Location: Germany

Re: [Mod] Throwing enhanced (bows and arrows) [0.9.3] [throw

by lightonflux » Post

It was possible to kill my avatar in creative with damage not enabled. I fired tnt arrows below me and got damage. The "You died" message appeared in the chat, but the game was not affected otherwise, except that i wasn't able to use the bows anymore.

User avatar
Bas080
Member
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080
Location: Netherlands

Re: [Mod] Throwing enhanced (bows and arrows) [0.9.3] [throw

by Bas080 » Post

I changed the textures for the simple game. Would you consider using the "improved" textures? Tell me if you'd like them. I'll send a pull request.

Image

https://github.com/bas080/simple/tree/m ... g/textures

User avatar
Echoes91
Member
Posts: 80
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Throwing enhanced (bows and arrows) [0.9.3] [throw

by Echoes91 » Post

lightonflux wrote:It was possible to kill my avatar in creative with damage not enabled. I fired tnt arrows below me and got damage. The "You died" message appeared in the chat, but the game was not affected otherwise, except that i wasn't able to use the bows anymore.
Sorry but I've not been able to reproduce it, even going directly into explosion. Note that in later versions tnt arrows dig instead of removing nodes, it can't hurt if damage is disabled.
Bas080 wrote:I changed the textures for the simple game. Would you consider using the "improved" textures? Tell me if you'd like them. I'll send a pull request.

Image

https://github.com/bas080/simple/tree/m ... g/textures
Thanks, but I'm already working on some more elegant textures, see the gold bow for a starting point. The final shape will depend on poll results and it may also be different for each bow. Old bow textures will all be changed in any case.

User avatar
Echoes91
Member
Posts: 80
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Throwing enhanced (bows and arrows) [0.9.4] [throw

by Echoes91 » Post

Updated to 0.9.4 See changelog

This bow texture should be definitive. Composite bow will have to change (or be substituted) if standard set wins, while golden bow will be substituted if historical wins

u34

Re: [Mod] Throwing enhanced (bows and arrows) [0.9.4] [throw

by u34 » Post

+1 awesome mod...

User avatar
lightonflux
Member
Posts: 384
Joined: Mon Nov 11, 2013 07:22
In-game: lof
Location: Germany

Re: [Mod] Throwing enhanced (bows and arrows) [0.9.3] [throw

by lightonflux » Post

Echoes91 wrote:
lightonflux wrote:It was possible to kill my avatar in creative with damage not enabled. I fired tnt arrows below me and got damage. The "You died" message appeared in the chat, but the game was not affected otherwise, except that i wasn't able to use the bows anymore.
Sorry but I've not been able to reproduce it, even going directly into explosion. Note that in later versions tnt arrows dig instead of removing nodes, it can't hurt if damage is disabled.
I am running the newest dev version.

Steps:

* Start with creative enabled and damage disabled
* fly 20 nodes in the air
* have a composite bow with tnt arrows
* disable fly
* fire tnt arrow so that you would get tnt and fall damage at the same time if damage was enabled
* then you get the message, can click it away and nothing happens, but your bow doesn't work
* when you start with creative and damage in the same constellation you get the message again and the bow still does not work
* start the world again with damage enabled and die properly then your mod works again

Is it a mod bug or an engine bug? If the later i will happily report it, but i need conformation that it is not the mods fault.

Video proof

User avatar
Echoes91
Member
Posts: 80
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Throwing enhanced (bows and arrows) [0.9.5] [throw

by Echoes91 » Post

Updated to 0.9.5 See changelog
lightonflux wrote:
Echoes91 wrote:
lightonflux wrote:It was possible to kill my avatar in creative with damage not enabled. I fired tnt arrows below me and got damage. The "You died" message appeared in the chat, but the game was not affected otherwise, except that i wasn't able to use the bows anymore.
Sorry but I've not been able to reproduce it, even going directly into explosion. Note that in later versions tnt arrows dig instead of removing nodes, it can't hurt if damage is disabled.
I am running the newest dev version.

Steps:

* Start with creative enabled and damage disabled
* fly 20 nodes in the air
* have a composite bow with tnt arrows
* disable fly
* fire tnt arrow so that you would get tnt and fall damage at the same time if damage was enabled
* then you get the message, can click it away and nothing happens, but your bow doesn't work
* when you start with creative and damage in the same constellation you get the message again and the bow still does not work
* start the world again with damage enabled and die properly then your mod works again

Is it a mod bug or an engine bug? If the later i will happily report it, but i need conformation that it is not the mods fault.

Video proof
I tried again your same sequence so many time without success, however you've got the old bow texture so it must not be the last release. TNT code used to remove nodes and deal damage but since 0.9.2 it digs nodes instead of removing. Maybe under very unlikely circumstances it "removed" your avatar, but i don't know how engine work for those cases...

User avatar
Minetestforfun
Member
Posts: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

Re: [Mod] Throwing enhanced (bows and arrows) [0.9.5] [throw

by Minetestforfun » Post

Maybe a variable to enable/disable Shell arrow easily should be a good idea, and add a bow with diamonds/mithril (the final and most interresting bow ?

User avatar
Echoes91
Member
Posts: 80
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Throwing enhanced (bows and arrows) [0.9.6] [throw

by Echoes91 » Post

Updated to 0.9.6
Now everything can be easily disabled from config.lua, which won't be overwritten, see the example.

Since most textures and sounds (ok, sounds will come with next additions) have now been changed and polished, I release them from now on under the CC-BY license. It means that you can still do whatever you want, just don't forget to give some credits (anyway you may like, I'm not going to check links or credit screens...) to the author who's really noob and needs a lot of time to make them :)
and add a bow with diamonds/mithril (the final and most interresting bow ?
Looking at pool's results, it seems like that weapons will be someway realistic and won't use implausible materials (bows must have some elasticity). However this won't apply to arrows (obviously) and doesn't mean that some special weapon isn't about to come ;)

User avatar
Echoes91
Member
Posts: 80
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Throwing enhanced (bows and arrows) [0.9.7] [throw

by Echoes91 » Post

Updated to 0.9.7
Much better reload system, should fix the problem after dying while reloading and works on multiplayer too. It gives a visual feedback on hud, even if it isn't very good looking I find it very useful.

Since I've worked enough on the code to feel it a bit "mine" too, I'll release it from now on under LGPLv2.1 license

User avatar
Minetestforfun
Member
Posts: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

Re: [Mod] Throwing enhanced (bows and arrows) [0.9.7] [throw

by Minetestforfun » Post

I understand your answer for diamonds, but I don't understand very well the problem with the used materials when i sayed "mithril" material.

Many bows are built with allow and/or metals, like here :
Spoiler
Image
Ok, the mithril is an unreal material but, it's harder(/more rare) than the diamonds and, why can't we imagine (because it's unreal) it can have the better stretching force and compression force ?

PS : thank you for updates, you work is great ! :)

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [Mod] Throwing enhanced (bows and arrows) [0.9.7] [throw

by ExeterDad » Post

Using the above picture as reference...
Why would it be unbelievable to have non flexible materials such as diamonds for the center area (don't know it's proper name) and have the limbs made from the flexible materials?

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests