Far Bows [farbows] + Raycast Bows API [rcbows] (1.15-2.2)

User avatar
runs
Member
Posts: 1748
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Far Bows [farbows] + Raycast Bows API [rcbows] (1.15-2.2)

by runs » Post

Image
Raycast Bows API

- It is an API to easy create bows, forked from the SmallJoker's 'Farbows mod' Mod.
- Bows use the new 5.0 Raycast function.
- Two functions to register both bows and arrows.
-- rcbows.register_arrow(name, def)
-- rcbows.register_bow(name, def)
- You can kill players and mobs.
- It supports translations.
- Sounds by default or defined.
- Optional:
-- Trail effect.
-- Charge time.
-- Replace node effect.
-- Explosion and Water effects.
-- Viewfinder.

Depends
None

License
GPLv3

Source Code and README for developers
Source Code

Download Raycast Bows

Manual
- Charge the bow with right click (if the arrow present in the inventory).
- Throw the arrow with left-click.

Far Bows (Example Mod)
Image

It adds Wooden, Mese and Flaming bows. And a Crossbow.

Depends
rcbows, default, farming, fire, tnt

Source Code

Download Far Bows
Last edited by runs on Fri Jul 31, 2020 21:24, edited 35 times in total.
Day 42 of the quarantine

User avatar
runs
Member
Posts: 1748
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Raycast Bows [rcbows] + Farbows [farbows]

by runs » Post

v1.1
- Now you can define the damage for a arrow.
Day 42 of the quarantine

User avatar
runs
Member
Posts: 1748
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Farbows [farbows] + Raycast Bows API [rcbows]

by runs » Post

- Now available on ContentDB (Awating for approval).
Day 42 of the quarantine

Gundul
Member
Posts: 925
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: Farbows [farbows] + Raycast Bows API [rcbows]

by Gundul » Post

Yes !

Now you can hunt eagles :D
And safely hunt sharks, too :)

But I will make the eagles fight back when you shoot them with arrows x)
My servers: Jungle, Lilly in the valley, ZombieTest

User avatar
runs
Member
Posts: 1748
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Farbows [farbows] + Raycast Bows API [rcbows]

by runs » Post

Gundul wrote:Yes !

Now you can hunt eagles :D
And safely hunt sharks, too :)

But I will make the eagles fight back when you shoot them with arrows x)
I will add fire arrows to kill shaks maybe :-D
Day 42 of the quarantine

User avatar
runs
Member
Posts: 1748
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Far Bows [farbows] + Raycast Bows API [rcbows]

by runs » Post

v1.2

- Raycast Bows API: Now sounds by default. Also you can mute them or define your own.

- Far Bows: Sounds enabled. Changed decription form 'bow' to 'far bow'.
Day 42 of the quarantine

User avatar
runs
Member
Posts: 1748
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.2)

by runs » Post

v1.3

- Raycast Bows API: Added "effects" definition: 'replace_node' and "trail_particle".

- Far Bows: Added "Far Flaming Bow" & "Fire Arrow"
Day 42 of the quarantine

CalebJ
Member
Posts: 312
Joined: Sat Dec 29, 2018 19:21
GitHub: KaylebJay
IRC: KaylebJay
In-game: CalebJ
Location: Tunnelers' Abyss

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.3)

by CalebJ » Post

This looks great! Thanks for another mod, runs :)
If you want realism, you're in the wrong place. Get off your mobile.

Gundul
Member
Posts: 925
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.3)

by Gundul » Post

It really works very good so far. Only I think arrows should not work underwater, or at least behave differently :)
Maybe something like a harpoon or arrows not shooting as far as in air.
My servers: Jungle, Lilly in the valley, ZombieTest

User avatar
runs
Member
Posts: 1748
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.3)

by runs » Post

I will modify the water behaviour:

https://en.wikipedia.org/wiki/Drag_%28physics%29
Day 42 of the quarantine

User avatar
runs
Member
Posts: 1748
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.4)

by runs » Post

v1.4 (rcbows & farbows)
- Now arrows drag on liquids.
- Fix: Missing arrow texture.
Day 42 of the quarantine

User avatar
runs
Member
Posts: 1748
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.5)

by runs » Post

v1.5 (rcbows & farbows)
- Now you can define multiple arrows for bows (table). The Flaming Bow can throw normal arrows.
- Splash effect when an arrow enter into the surface of the water and trail effect.
Day 42 of the quarantine

Chem871
Member
Posts: 948
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.5)

by Chem871 » Post

Plz Crossbows and arbalests too.
What is SCP-055 again? I forgot.

User avatar
runs
Member
Posts: 1748
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.6)

by runs » Post

v1.6
- rcbows: Now you can define a "charge_time" for bows.
- farbows: Now arrows do not load inmediately.
- farbows: Added a "Crossbow".
Day 42 of the quarantine

User avatar
runs
Member
Posts: 1748
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.6)

by runs » Post

v1.7
- rcbows: Fixed wrong inventory replacement when the "charge_time" is big and the player change/delete the bow item.
Day 42 of the quarantine

User avatar
runs
Member
Posts: 1748
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.8)

by runs » Post

v1.8 (rcbows & farbows)
- Added a "base_texture" definition for a better visualization of the bows.
Day 42 of the quarantine

User avatar
runs
Member
Posts: 1748
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.8)

by runs » Post

Well, the mod is finished (bugs aside). I will request to move to finished mods.
Day 42 of the quarantine

Gundul
Member
Posts: 925
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.8)

by Gundul » Post

Bug:

shooting an arrow can be heard globaly. :)
But recharging can not.
My servers: Jungle, Lilly in the valley, ZombieTest

User avatar
runs
Member
Posts: 1748
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.8)

by runs » Post

1.8.1
- (rcbows) Fixed: Shooting sound globally.
Day 42 of the quarantine

Gundul
Member
Posts: 925
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.8.1)

by Gundul » Post

Thanks for fixing sounds, I had no opportunity yet to test it on my servers because a lock of players
to test it with x)

I found two other things:

Code: Select all

Undeclared global variable "gain" accessed at /home/mars/.minetest/mods/rcbows/init.lua:67
2020-04-10 11:34:06: WARNING[Server]: Undeclared global variable "max_hear_distance" accessed at .minetest/mods/rcbows/init.lua:67
2020-04-10 11:34:26: WARNING[Server]: Undeclared global variable "gain" accessed at .minetest/mods/rcbows/init.lua:103
2020-04-10 11:34:26: WARNING[Server]: Undeclared global variable "max_hear_distance" accessed at .minetest/mods/rcbows/init.lua:103

the other thing is that you can register effects with arrows.
Maybe I am wrong but there are no checks for owner and protection ?

line 185 init.lua in rcbows

Code: Select all

if def.effects and def.effects.replace_node then
	minetest.set_node(self.old_pos, {name = def.effects.replace_node})
end
Someone could grief protected buildings by shooting arrows at it.

[Edit]
if you want to replace the hit node it should be

Code: Select all

if def.effects and def.effects.replace_node then
	minetest.set_node(pos, {name = def.effects.replace_node})
end
I guess. :)
My servers: Jungle, Lilly in the valley, ZombieTest

User avatar
runs
Member
Posts: 1748
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.8.1)

by runs » Post

v1.8.2 (rcbows)
- Fixed some global variables.
- Check for protected nodes in case of a replace_node effect.
- Changed the pos of the hit node.
Day 42 of the quarantine

User avatar
runs
Member
Posts: 1748
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.8.2)

by runs » Post

Hmm, I've realized that this API could be applied to make guns as pistols and bullets. But first I have to define a drop = false or nil or {}.

Also I will try to add a new effect: snipper (zoom with viewfinder texture), if possible. And later a crossbow with snipper. And more later a Hunter Riffle with snipper too (a separated mod) to kill my Petz :-D
Day 42 of the quarantine

Gundul
Member
Posts: 925
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.8.1)

by Gundul » Post

runs wrote:v1.8.2 (rcbows)
- Fixed some global variables.
- Check for protected nodes in case of a replace_node effect.
- Changed the pos of the hit node.
Thanks now it works very well. If you have enable_fire = true and shoot a fire arrow in trees
you have amazing effects xD
My servers: Jungle, Lilly in the valley, ZombieTest

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

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.8.2)

by Krock » Post

Wow, this is unexpected. Thank you for re-using my work. farbows is a 0.5.0-dev feature demonstration and development testing mod, but it looks like it offers enough potential to you for extending it to an enjoyable unique mod.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

Adnunano
Member
Posts: 22
Joined: Thu Feb 13, 2020 09:28

Re: Far Bows [farbows] + Raycast Bows API [rcbows] (1.8.2)

by Adnunano » Post

Hmm,it would be nice to add poisonous and explosive arrows.

Post Reply

Who is online

Users browsing this forum: nemo42 and 7 guests