Page 1 of 1

[Mod] Basic Bow [basic_bow]

PostPosted: Wed Mar 18, 2015 06:45
by Napiophelios
Basic Bow Mod

original code by Stuart Jones
modified by Napiophelios

License: LGPL v2.1 for code and CC-BY-SA 3.0 for media

Depends: default, farming

For Minetest 0.4.12

Repository: https://github.com/Napiophelios/basic_bow
Download: https://github.com/Napiophelios/basic_b ... master.zip
Rename extracted folder to "basic_bow"

Image

This mod adds a simple wooden hunter's bow with arrows that stick into nodes.
There are no special arrows or special bow types.

The crafting for the bow is sort of the same as Throwing mod;
"group:wood" and farming string.

Arrows are crafted with 2 "group:wood" blocks and 1 "group:stone",
giving players an even score of ammo (20ct.).

Image


+ Licenses/Credits of media, textures, code

Re: [MOD]Basic Bow [basic_bow]

PostPosted: Wed Mar 18, 2015 10:18
by lightonflux
Would be neat if the target had a scale like this

Re: [MOD]Basic Bow [basic_bow]

PostPosted: Wed Mar 18, 2015 22:16
by Napiophelios
Yeah that was my initial plan, but I am not that good with Blender
and my target's colored circles looked warped in the game so till I can get it right
I am just using default pine wood texture.

Re: [MOD]Basic Bow [basic_bow]

PostPosted: Thu Mar 19, 2015 00:17
by Don
I like the idea of just one bow. The people need different options.

Re: [MOD]Basic Bow [basic_bow]

PostPosted: Thu Mar 19, 2015 00:36
by philipbenr
Looks really good.

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Sat Mar 21, 2015 08:33
by Hybrid Dog
you could implement it in the shooter mod

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Sat Mar 21, 2015 19:24
by Napiophelios
Hybrid Dog wrote:you could implement it in the shooter mod


I dont think it really fits well with firearms and mechanized shooting devices, IDK.

This is something I wanted for a medieval type subgame for archery competitions and hunting.
I know others like the majik arrows and bows, but they arent a good fit for what I wanted.

I have been testing it and it seems the bow is pretty accurate up to 25 nodes.
not bad I guess for a short bow.

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Tue Sep 01, 2015 01:01
by Napiophelios
Mod Updated :

expanded targetable entities
mesh textures fixed
disabled the target node
simplified crafting recipes

Added a long list of possible mobs/targets;
I suggest disabling the ones you dont use.
    creatures
    creeper
    kpgmobs
    mobs
    mobs_goblins
    ninja
    pmobs
    pyramids
    zombie

Download : basic_bow_rev002

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Fri Nov 13, 2015 01:05
by benrob0329
I really like this mod, but is there a way for other mods to add more bows/arrows that tie into this one?

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Fri Nov 13, 2015 13:34
by afflatus
Yep, I ended up editing out all the non-realistic bows from throwing mod.
I like the look of this. will give it a spin.

Edit:
I wish you would use github

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Fri Nov 13, 2015 22:39
by Napiophelios
benrob0329 wrote:I really like this mod, but is there a way for other mods to add more bows/arrows that tie into this one?

Sorry it would no longer be a basic bow then :(
Check out Stu's shooter mod, thats where the code is from.
I believe it has different arrow types (but I am not really sure)
maybe you can change basic_bow to support different bows and arrows.


afflatus wrote:Yep, I ended up editing out all the non-realistic bows from throwing mod.
I like the look of this. will give it a spin.


Yeah that's how this one started out too :)

afflatus wrote:Edit:
I wish you would use github


I have a Github account I just cant upload textures to it,
the uploader crashes my computer everytime. (I use old Windows)
I guess I could at least put the code on there.

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Sat Nov 14, 2015 01:17
by benrob0329
Napiophelios wrote:
benrob0329 wrote:I really like this mod, but is there a way for other mods to add more bows/arrows that tie into this one?

Sorry it would no longer be a basic bow then :(


I'm was thinking like an item group that the mod would recognize, e.g. "arrow", "arrow_strength". Then this mod would be simple, but other mods could take advantage of the bow/arrow mechanics.

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Sat Nov 14, 2015 14:14
by afflatus
Napiophelios wrote:I have a Github account I just cant upload textures to it,
the uploader crashes my computer everytime. (I use old Windows)
I guess I could at least put the code on there.


Ow. Uploader?
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
 git push ...

... as I'm sure you're aware, is the WTG

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Sat Nov 14, 2015 15:41
by Don

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Sun Nov 15, 2015 00:52
by afflatus
Don wrote:I put it on github for you.


/me does happy dance.
Nice one Don!

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Sun Nov 29, 2015 15:52
by afflatus
I just got round to testing this. It is very good indeed! And a great improvement on throwing mod.

I would prefer that the crafting recipes were closer, however.
It would make more sense for arrows to be "group:stick", "group:stick", "group:stone" (and the reverse NB)
The target recipe conflicts with Sokomine's bench, perhaps "default:pine_wood" could be in the top row instead?

It would be great to have some kind of API for defining additional arrows. Naturally I'd like to have metal-tipped ones too.

One question: I confess I haven't studied the code closely ...
Do the arrows respect enable_pvp = false?
The fix is fairly trivial if not.

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Sun Nov 29, 2015 22:53
by Napiophelios
Well, how many items are in the group:stick?
In the game I wanted this for, I have 2
I really dont even understand the point of having a group stick.

I chose gravel cuz most the flint mods I have seen get their flint from gravel.
and I didnt want it to be exactly the same as throwing mod

Sorry about the target recipe, I thought I removed that stupid thing altogether.
I cant get the scale texture to work right.

I really dont know about the pvp setting, havent actually tested it
so far its been for archery contests and killing chickens from a distance
I ripped so much stuff out of the crossbow mod I am more than sure I may have
unknowingly thrown out something important.

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Mon Nov 30, 2015 09:26
by afflatus
Napiophelios wrote:Well, how many items are in the group:stick?
In the game I wanted this for, I have 2
I really dont even understand the point of having a group stick.


It's mostly for future-proofing / compatibility reasons. I only have one sort of stick in my sub-game, but some may have different sticks for each wood type.

I chose gravel cuz most the flint mods I have seen get their flint from gravel.
and I didnt want it to be exactly the same as throwing mod


The recipes may as well be the same as basic_bow is a drop-in replacement for throwing.

Sorry about the target recipe, I thought I removed that stupid thing altogether.
I cant get the scale texture to work right.


It is commented out.

I really dont know about the pvp setting, havent actually tested it
so far its been for archery contests and killing chickens from a distance
I ripped so much stuff out of the crossbow mod I am more than sure I may have
unknowingly thrown out something important.


I doubt it. Throwing didn't respect the pvp setting. The same hack will almost certainly work for basic_bow. I can test, track it down and suggest a patch if necessary.

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Fri Dec 11, 2015 12:00
by afflatus
Another little issue:
In multiplayer, everyone can hear the bowstring twang, even if they are miles away.
I will have a look at that too, to figure out why.

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Fri Dec 11, 2015 22:30
by Napiophelios
afflatus wrote:Another little issue:
In multiplayer, everyone can hear the bowstring twang, even if they are miles away.
I will have a look at that too, to figure out why.


From firing the bow? or the arrow landing?

edit Lines:
383 : minetest.sound_play("basic_bow_arrow", {pos = self.lastpos, gain = 0.8})
420 : minetest.sound_play("basic_bow_throw", {object=obj})
442 : minetest.sound_play("basic_bow_arrow", {gain = 0.0009})

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Fri Dec 11, 2015 23:18
by afflatus
The arrow landing.

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Sat Dec 12, 2015 01:09
by rubenwardy
Check that the sound is mono, otherwise it is played location less.

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Sat Dec 12, 2015 06:11
by Napiophelios
@Afflatus I made some adjustments let me know if it helps.
I havent checked the sound files like Ruben suggested (yet)

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Sat Dec 12, 2015 10:52
by afflatus
The sound files are stereo. So what rubenwardy said. I have monoised and am now testing.

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Sun Jan 10, 2016 09:25
by The_Critic
I really like this mod.It has potential, but it needs a few adjustments.
1.The arrow (when fired at a mob) hits the ground behind it and flies through it.
2.maybe a fire arrow might be interesting.(because you can actually make a fire arrow in reality,and people used to do it often in battles of that time.)
but further the mod is fairly cool.
I am currently building a medieval RPG map.
viewtopic.php?f=12&t=13836

Re: [Mod] Basic Bow [basic_bow]

PostPosted: Mon Mar 27, 2017 21:44
by v-rob
How do you edit how far the arrow goes and how much it hurts something? I can't find it anywhere in the code. Could someone show me?