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

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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

Content Rating

Image

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 Tue Dec 22, 2020 15:53, edited 36 times in total.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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

by runs » Post

v1.1
- Now you can define the damage for a arrow.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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

by runs » Post

- Now available on ContentDB (Awating for approval).

u18398

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

by u18398 » 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)

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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'.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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"

CalebJ
Member
Posts: 407
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 :)

u18398

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

by u18398 » 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.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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.

Chem871
Member
Posts: 999
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?

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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".

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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.

u18398

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

by u18398 » Post

Bug:

shooting an arrow can be heard globaly. :)
But recharging can not.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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

by runs » Post

1.8.1
- (rcbows) Fixed: Shooting sound globally.

u18398

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

by u18398 » 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. :)

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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

u18398

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

by u18398 » 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

User avatar
Krock
Developer
Posts: 4649
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: 43
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.
NfAPhpmGaVphBjK8NIr9Mit5xNW2emD2

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests