[Mod] X Bows [x_bows]

Jackknife
Member
Posts: 189
Joined: Fri Sep 25, 2020 20:07

Re: [Mod] X Bows [x_bows]

by Jackknife » Post

The mod doesn’t seem to work after updating to 5.6. The arrows don’t shoot out of the bow anymore, they’re invisible.

Papang
Member
Posts: 19
Joined: Sun Jul 10, 2022 17:28
IRC: Papang
In-game: Papang

Re: [Mod] X Bows [x_bows]

by Papang » Post

Up ! the arrows don't work on 5.6 : when you shoot, an arrow is used but nothing happens, there isn't any object nor damages.

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] X Bows [x_bows]

by sirrobzeroone » Post

I think the problem is the particle update in 5.6 -

https://minetest.gitlab.io/minetest/def ... definition

significant changes in 5.6 I think it may need to be updated to

pos_tween, style forward then two vectors for start/end but not sure myself, I'll test and see.

User avatar
LMD
Member
Posts: 1385
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [Mod] X Bows [x_bows]

by LMD » Post

sirrobzeroone wrote:
Thu Aug 18, 2022 03:20
I think the problem is the particle update in 5.6 -

https://minetest.gitlab.io/minetest/def ... definition

significant changes in 5.6 I think it may need to be updated to

pos_tween, style forward then two vectors for start/end but not sure myself, I'll test and see.
No it's not. The problem is that this mod relied on spawning objects with a max HP of 0 to work. I've opened an issue.
My stuff: Projects - Mods - Website

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] X Bows [x_bows]

by sirrobzeroone » Post

LMD wrote:
Thu Aug 18, 2022 10:02
:)
Thanks LMD was just about to ask for a bit more help, tracked back the object wasn't being created any more but then got a little stuck as to why :)


Edit: yep that fixed it adjusted line 96 in arrow.lua from 0.5 to 1 :)

User avatar
SaKeL
Member
Posts: 742
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [Mod] X Bows [x_bows]

by SaKeL » Post

Bastrabun wrote:
Wed Apr 20, 2022 22:09
This happens when you load an arrow, keep the bow loaded, then stop the server, restart the server and then immediately fire the arrow. We had that, too:

https://gitea.your-land.de/your-land/bu ... ssues/1251
Could you share the fix?

User avatar
SaKeL
Member
Posts: 742
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [Mod] X Bows [x_bows]

by SaKeL » Post

ronoaldo wrote:
Fri Sep 10, 2021 04:34
I can confirm that changing that particular line to zero fixes the interaction with the binoculars (zoom).
Thank you..will fix it in the mod

Bastrabun
Member
Posts: 210
Joined: Mon Nov 04, 2019 19:48

Re: [Mod] X Bows [x_bows]

by Bastrabun » Post

SaKeL wrote:
Thu Oct 06, 2022 04:27
Bastrabun wrote:
Wed Apr 20, 2022 22:09
This happens when you load an arrow, keep the bow loaded, then stop the server, restart the server and then immediately fire the arrow. We had that, too:

https://gitea.your-land.de/your-land/bu ... ssues/1251
Could you share the fix?
Certainly, though I must admit it's a dumbfix.

In function x_bows.shoot(itemstack, user, pointed_thing) there is around line 312:

Code: Select all

	if strength_multiplier > _tool_capabilities.full_punch_interval then
		strength_multiplier = 1
	end
which we changed to

Code: Select all

	if strength_multiplier < 0 or strength_multiplier > _tool_capabilities.full_punch_interval then
		strength_multiplier = 1
	end
Whatever I say is CC0

User avatar
SaKeL
Member
Posts: 742
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [Mod] X Bows [x_bows]

by SaKeL » Post

Bastrabun wrote:
Thu Oct 06, 2022 20:49
SaKeL wrote:
Thu Oct 06, 2022 04:27
Bastrabun wrote:
Wed Apr 20, 2022 22:09
This happens when you load an arrow, keep the bow loaded, then stop the server, restart the server and then immediately fire the arrow. We had that, too:

https://gitea.your-land.de/your-land/bu ... ssues/1251
Could you share the fix?
Certainly, though I must admit it's a dumbfix.

In function x_bows.shoot(itemstack, user, pointed_thing) there is around line 312:

Code: Select all

	if strength_multiplier > _tool_capabilities.full_punch_interval then
		strength_multiplier = 1
	end
which we changed to

Code: Select all

	if strength_multiplier < 0 or strength_multiplier > _tool_capabilities.full_punch_interval then
		strength_multiplier = 1
	end
Thanks, thats where I was looking at but could not reproduce the issue. If I hardcoded the strength_multiplies to negative value it was just shooting in the opposite direction but no server crash. Just added feature where the bow will get unloaded (metadata wiped) when user login or change hotbar selection. Will test it a bit more on local server and push it I think.

User avatar
SaKeL
Member
Posts: 742
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [Mod] X Bows [x_bows]

by SaKeL » Post

Update

* add player_monoids support
* fix invisible arrows
* check for arrow entities when removing attached objects
* reset fov correctly (to 0)
* discharge bow when not in use
* return arrow after discharging (not in creative)
* add instruction on how to use the bow

User avatar
SaKeL
Member
Posts: 742
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [Mod] X Bows [x_bows]

by SaKeL » Post

Update

* bow will take arrow from 1st found stack (instead of last one)
* add quiver
* add quiver HUD
* add quiver features: faster arrows, more damage arrows
* change nodebox arrows to mesh arrows
* punching arrow sounds

User avatar
SaKeL
Member
Posts: 742
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [Mod] X Bows [x_bows]

by SaKeL » Post

Update

* refactored code by introducing more OOP approach and classes
* created X Bows API for creating custom shooters and projectiles
* minor bug fixes
* removed experimental poison arrow (this will be available in separate MOD using X Bows API, see: viewtopic.php?f=9&t=28792&p=416662)
* bows can have "allowed ammunition" - indicating what ammo can be used for weapon
* API documentation is currently in form of `type` file, e.g. https://bitbucket.org/minetest_gamers/x ... s.type.lua
* arrow spins while flying
* arrow wiggles when hit node

User avatar
SaKeL
Member
Posts: 742
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [Mod] X Bows [x_bows]

by SaKeL » Post

Update

* smoother wiggle

Image
Attachments
Kapture 2022-10-24 at 10.58.46-crop.gif
Kapture 2022-10-24 at 10.58.46-crop.gif (773.83 KiB) Viewed 2627 times

User avatar
duckgo
Member
Posts: 205
Joined: Sun Sep 20, 2020 08:01
In-game: duckgo
Contact:

Re: [Mod] X Bows [x_bows]

by duckgo » Post

Hello , there is a crash in the game , when are you going to remove the arrow from the " target " ..

AsyncErr: Lua: Runtime error from mod 'x_bows' in callback
luaentity_Punch(): /home/duckgo/.minetest/mods/x_bows/api.lua:1313:
attempt to index field 'dig' (a nil value)
stack traceback:
/home/duckgo/.minetest/mods/x_bows/api.lua:1313: in function
</home/duckgo/.minetest/mods/x_bows/api.lua:1310>

User avatar
SaKeL
Member
Posts: 742
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [Mod] X Bows [x_bows]

by SaKeL » Post

duckgo wrote:
Thu Oct 27, 2022 02:37
Hello , there is a crash in the game , when are you going to remove the arrow from the " target " ..

AsyncErr: Lua: Runtime error from mod 'x_bows' in callback
luaentity_Punch(): /home/duckgo/.minetest/mods/x_bows/api.lua:1313:
attempt to index field 'dig' (a nil value)
stack traceback:
/home/duckgo/.minetest/mods/x_bows/api.lua:1313: in function
</home/duckgo/.minetest/mods/x_bows/api.lua:1310>
Seems like you dont have default mod enabled. I have added some extra checks for that. New version v2.2.2 on Content DB (or git) should fix that. Thanks for letting me know <3

User avatar
duckgo
Member
Posts: 205
Joined: Sun Sep 20, 2020 08:01
In-game: duckgo
Contact:

Re: [Mod] X Bows [x_bows]

by duckgo » Post

SaKeL wrote:
Thu Oct 27, 2022 04:02
duckgo wrote:
Thu Oct 27, 2022 02:37
Hello , there is a crash in the game , when are you going to remove the arrow from the " target " ..

AsyncErr: Lua: Runtime error from mod 'x_bows' in callback
luaentity_Punch(): /home/duckgo/.minetest/mods/x_bows/api.lua:1313:
attempt to index field 'dig' (a nil value)
stack traceback:
/home/duckgo/.minetest/mods/x_bows/api.lua:1313: in function
</home/duckgo/.minetest/mods/x_bows/api.lua:1310>
Seems like you dont have default mod enabled. I have added some extra checks for that. New version v2.2.2 on Content DB (or git) should fix that. Thanks for letting me know <3

😁👍 thank you

User avatar
SaKeL
Member
Posts: 742
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [Mod] X Bows [x_bows]

by SaKeL » Post

Update

* new arrows and quiver inventory slots (sfinv, unified_inventory, i3 supported so far) - you have to have these filled with arrows otherwise the bow will not load (player main inventory doesn't count)
* new quiver 3d shown in 3rd person view (3d armor, and some skins MODs supported - see optional dependencies)
* HUD shows also arrows from new arrow inventory when load/shoot bow as well as when there is no ammo
* all content is translatable
* added Slovak translations
Attachments
screenshot.5.png
screenshot.5.png (330.57 KiB) Viewed 2246 times
screenshot.4.png
screenshot.4.png (136.62 KiB) Viewed 2246 times

User avatar
SaKeL
Member
Posts: 742
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [Mod] X Bows [x_bows]

by SaKeL » Post

Update

* don't punch close nodes/objects when shooting
* better arrow intersection point calculations - arrow will not fly through first few nodes/objects when shooting from close distance before attaching
* better attached scale calculation - huge/tiny arrows when attached to scaled models will show correct sized arrow
* better attached position calculation - attached arrows to mobs/players have correct attached position and not flying in the air or inside the objects
* added node impact particles when arrow hits the node

You have to update `x_bows_extras` also when updating to this new version.

Niden
Member
Posts: 26
Joined: Wed Apr 29, 2020 23:37
GitHub: Niden1
In-game: Niden
Location: Pacific Ocean

Re: [Mod] X Bows [x_bows]

by Niden » Post

SaKeL wrote:
Thu Oct 27, 2022 04:02
duckgo wrote:
Thu Oct 27, 2022 02:37
Hello , there is a crash in the game , when are you going to remove the arrow from the " target " ..

AsyncErr: Lua: Runtime error from mod 'x_bows' in callback
luaentity_Punch(): /home/duckgo/.minetest/mods/x_bows/api.lua:1313:
attempt to index field 'dig' (a nil value)
stack traceback:
/home/duckgo/.minetest/mods/x_bows/api.lua:1313: in function
</home/duckgo/.minetest/mods/x_bows/api.lua:1310>
Seems like you dont have default mod enabled. I have added some extra checks for that. New version v2.2.2 on Content DB (or git) should fix that. Thanks for letting me know <3
Hi, I updated to the latest version of x_bows which is available in ContentDB, I didn't use x_bows_extras for my server and got the same error (I use Minetest Game)

Code: Select all

2022-10-30 19:14:28: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'x_bows' in callback luaentity_Punch(): /home/container/bin/../mods/x_bows/api.lua:1373: attempt to index field 'dig' (a nil value)
2022-10-30 19:14:28: ERROR[Main]: stack traceback:
2022-10-30 19:14:28: ERROR[Main]: 	/minetest/bin/../mods/x_bows/api.lua:1373: in function </minetest/bin/../mods/x_bows/api.lua:1369>
2022-10-30 19:14:28: ERROR[Main]: 	(tail call): ?

User avatar
SaKeL
Member
Posts: 742
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [Mod] X Bows [x_bows]

by SaKeL » Post

@Niden latest v3.1.1 should fix that for you, let me know if that works for you...

User avatar
SaKeL
Member
Posts: 742
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [Mod] X Bows [x_bows]

by SaKeL » Post

Update

* optionally show damage numbers done to player/object - disabled by default, can be enabled in minetest mod settings. Numbers are rounded/approximate.
Attachments
x_bows_show_damage.png
x_bows_show_damage.png (65.31 KiB) Viewed 1985 times

Niden
Member
Posts: 26
Joined: Wed Apr 29, 2020 23:37
GitHub: Niden1
In-game: Niden
Location: Pacific Ocean

Re: [Mod] X Bows [x_bows]

by Niden » Post

SaKeL wrote:
Sun Oct 30, 2022 23:02
@Niden latest v3.1.1 should fix that for you, let me know if that works for you...
Hello. Everything works fine except the Quiver textures. Is there a way to disable it?
Spoiler
screenshot_20221031_200336.png
screenshot_20221031_200336.png (315.81 KiB) Viewed 1899 times
Spoiler
screenshot_20221031_195940.png
screenshot_20221031_195940.png (418.59 KiB) Viewed 1899 times

User avatar
SaKeL
Member
Posts: 742
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [Mod] X Bows [x_bows]

by SaKeL » Post

You cannot disable the quiver textures but i can add it in later release. I dont see from the screenshots the back or the character model. What mods are you using?

Niden
Member
Posts: 26
Joined: Wed Apr 29, 2020 23:37
GitHub: Niden1
In-game: Niden
Location: Pacific Ocean

Re: [Mod] X Bows [x_bows]

by Niden » Post

SaKeL wrote:
Tue Nov 01, 2022 00:15
You cannot disable the quiver textures but i can add it in later release. I dont see from the screenshots the back or the character model. What mods are you using?
If you mean skin mod I use skinsdb
Spoiler
screenshot_20221031_213915.png
screenshot_20221031_213915.png (94.56 KiB) Viewed 1876 times
Spoiler
screenshot_20221031_214837.png
screenshot_20221031_214837.png (37.58 KiB) Viewed 1875 times

User avatar
SaKeL
Member
Posts: 742
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [Mod] X Bows [x_bows]

by SaKeL » Post

@Niden I see..thanks for the info. skinsdb support would have to be added for this (will add it on my list) as of now I have added setting to disable 3d quiver (latest release in ContentDB)

Post Reply

Who is online

Users browsing this forum: Nininik and 15 guests