[Mod] Basic Bow [basic_bow]

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

[Mod] Basic Bow [basic_bow]

by Napiophelios » Post

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"

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.).
Spoiler
basic_bow.zip
basic_bow_rev001
(158.39 KiB) Downloaded 197 times
basic_bow_rev002.zip
expanded targets / fixed textures
(158.66 KiB) Downloaded 213 times
Last edited by Napiophelios on Thu Jul 20, 2017 06:05, edited 12 times in total.

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

Re: [MOD]Basic Bow [basic_bow]

by lightonflux » Post

Would be neat if the target had a scale like this

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [MOD]Basic Bow [basic_bow]

by Napiophelios » Post

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.

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

Re: [MOD]Basic Bow [basic_bow]

by Don » Post

I like the idea of just one bow. The people need different options.
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
philipbenr
Member
Posts: 1897
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

Re: [MOD]Basic Bow [basic_bow]

by philipbenr » Post

Looks really good.

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod] Basic Bow [basic_bow]

by Hybrid Dog » Post

you could implement it in the shooter mod

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Basic Bow [basic_bow]

by Napiophelios » Post

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.

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Basic Bow [basic_bow]

by Napiophelios » Post

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

User avatar
benrob0329
Member
Posts: 1341
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

Re: [Mod] Basic Bow [basic_bow]

by benrob0329 » Post

I really like this mod, but is there a way for other mods to add more bows/arrows that tie into this one?

User avatar
afflatus
Member
Posts: 362
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Mod] Basic Bow [basic_bow]

by afflatus » Post

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
Grailtest is stirring ...

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Basic Bow [basic_bow]

by Napiophelios » Post

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.

User avatar
benrob0329
Member
Posts: 1341
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

Re: [Mod] Basic Bow [basic_bow]

by benrob0329 » Post

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.

User avatar
afflatus
Member
Posts: 362
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Mod] Basic Bow [basic_bow]

by afflatus » Post

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?

Code: Select all

 git push ... 
... as I'm sure you're aware, is the WTG
Grailtest is stirring ...

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

Re: [Mod] Basic Bow [basic_bow]

by Don » Post

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
afflatus
Member
Posts: 362
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Mod] Basic Bow [basic_bow]

by afflatus » Post

Don wrote:I put it on github for you.
/me does happy dance.
Nice one Don!
Grailtest is stirring ...

User avatar
afflatus
Member
Posts: 362
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Mod] Basic Bow [basic_bow]

by afflatus » Post

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.
Grailtest is stirring ...

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Basic Bow [basic_bow]

by Napiophelios » Post

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.

User avatar
afflatus
Member
Posts: 362
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Mod] Basic Bow [basic_bow]

by afflatus » Post

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.
Grailtest is stirring ...

User avatar
afflatus
Member
Posts: 362
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Mod] Basic Bow [basic_bow]

by afflatus » Post

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.
Grailtest is stirring ...

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Basic Bow [basic_bow]

by Napiophelios » Post

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})

User avatar
afflatus
Member
Posts: 362
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Mod] Basic Bow [basic_bow]

by afflatus » Post

The arrow landing.
Grailtest is stirring ...

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: [Mod] Basic Bow [basic_bow]

by rubenwardy » Post

Check that the sound is mono, otherwise it is played location less.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Basic Bow [basic_bow]

by Napiophelios » Post

@Afflatus I made some adjustments let me know if it helps.
I havent checked the sound files like Ruben suggested (yet)

User avatar
afflatus
Member
Posts: 362
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Mod] Basic Bow [basic_bow]

by afflatus » Post

The sound files are stereo. So what rubenwardy said. I have monoised and am now testing.
Grailtest is stirring ...

User avatar
The_Critic
New member
Posts: 6
Joined: Mon Jan 04, 2016 00:26
IRC: The_Critic
In-game: Andreas

Re: [Mod] Basic Bow [basic_bow]

by The_Critic » Post

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

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests