[MOD] cannons with a lot of features! [2.5] [cannons]
- GreenXenith
- Member
- Posts: 1356
- Joined: Wed Oct 28, 2015 01:26
- GitHub: GreenXenith
- Location: UTC-8:00
- Contact:
Re: [MOD] cannons with a lot of features! [2.5] [cannons]
Great mod!
2 things:
1) If I place a cannon ball (confirmed single ball, not sure about stacks of 2-5) and punch it, the game crashes "functions.lua:373: attempt to compare number with nil"
2) None of the ammo (including the apple) hurt mobs/players, though they should?
2 things:
1) If I place a cannon ball (confirmed single ball, not sure about stacks of 2-5) and punch it, the game crashes "functions.lua:373: attempt to compare number with nil"
2) None of the ammo (including the apple) hurt mobs/players, though they should?
YouTube | Mods | Patreon | Minetest Discord @greenxenith
You should not be able to read this message.
You should not be able to read this message.
- addi
- Member
- Posts: 666
- Joined: Thu Sep 20, 2012 03:16
- GitHub: adrido
- Location: Black-Forest, Germany
Re: [MOD] cannons with a lot of features! [2.5] [cannons]
hmm sorry, but I cant reproduce your issues.
to 1) does it only happen wielding a special item? What lua version do you use? Maybe does another mod overwrite lua's 'tonumber()' function? What other mods do you have installed?
I think I probably solved it, could you please test it with the latest version? https://bitbucket.org/kingarthursteam/c ... master.zip
to 2) I tested it with 3d_armor, mobf and mobs_redo and it works well there. Do you use a different mobs/ armor mod? if yes, which one? It might sound a bit stupid, but do you have damage enabled? ;-) The apple's are a "hidden feature" or "easter egg" (you found it :-D ) and they cause negative damage, which means they heal players :-)
Thanks for reporting the issues, but I need more information to be able to help you.
to 1) does it only happen wielding a special item? What lua version do you use? Maybe does another mod overwrite lua's 'tonumber()' function? What other mods do you have installed?
I think I probably solved it, could you please test it with the latest version? https://bitbucket.org/kingarthursteam/c ... master.zip
to 2) I tested it with 3d_armor, mobf and mobs_redo and it works well there. Do you use a different mobs/ armor mod? if yes, which one? It might sound a bit stupid, but do you have damage enabled? ;-) The apple's are a "hidden feature" or "easter egg" (you found it :-D ) and they cause negative damage, which means they heal players :-)
Thanks for reporting the issues, but I need more information to be able to help you.
- GreenXenith
- Member
- Posts: 1356
- Joined: Wed Oct 28, 2015 01:26
- GitHub: GreenXenith
- Location: UTC-8:00
- Contact:
Re: [MOD] cannons with a lot of features! [2.5] [cannons]
1) Alright. Enabling only the cannon mod fixes this... will have to test with other mods. EDIT: Tested with other mods. It is fixed.addi wrote:to 1) does it only happen wielding a special item? What lua version do you use? Maybe does another mod overwrite lua's 'tonumber()' function? What other mods do you have installed?
I think I probably solved it, could you please test it with the latest version? https://bitbucket.org/kingarthursteam/c ... master.zip
to 2) I tested it with 3d_armor, mobf and mobs_redo and it works well there. Do you use a different mobs/ armor mod? if yes, which one? It might sound a bit stupid, but do you have damage enabled? ;-)
2) Yes, I have damage enabled. Even if I only have this mod enabled, the cannon still does not hurt anyone. As for armor/mobs mods I use, I use 3d_armor and mobs_redo.
YouTube | Mods | Patreon | Minetest Discord @greenxenith
You should not be able to read this message.
You should not be able to read this message.
- GreenXenith
- Member
- Posts: 1356
- Joined: Wed Oct 28, 2015 01:26
- GitHub: GreenXenith
- Location: UTC-8:00
- Contact:
Re: [MOD] cannons with a lot of features! [2.5] [cannons]
Perhaps it is not detecting the player hit-box for some reason? I dunno :P
YouTube | Mods | Patreon | Minetest Discord @greenxenith
You should not be able to read this message.
You should not be able to read this message.
- addi
- Member
- Posts: 666
- Joined: Thu Sep 20, 2012 03:16
- GitHub: adrido
- Location: Black-Forest, Germany
Re: [MOD] cannons with a lot of features! [2.5] [cannons]
Well the cannonball checks every server step for existing objects nearby, which is normally fast enough.A more exactly way way would be if Minetest would provide a api like "get_objects_inside_ray(pos1,pos2)" but it seems I have to write that algorithm by myself. But you might have to wait some months, because i does not have much time, and there are more important things to do.
- Hybrid Dog
- Member
- Posts: 2835
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: [MOD] cannons with a lot of features! [2.5] [cannons]
addi, there's a PR for adding such a function:
https://github.com/minetest/minetest/pull/4421
https://github.com/minetest/minetest/pull/4421
- addi
- Member
- Posts: 666
- Joined: Thu Sep 20, 2012 03:16
- GitHub: adrido
- Location: Black-Forest, Germany
Re: [MOD] cannons with a lot of features! [2.5] [cannons]
yeah, but sadly they does not want to merge it, because its only a server side function, and not available for clientside mods. (server side would be enough for this usecase). :-(
- addi
- Member
- Posts: 666
- Joined: Thu Sep 20, 2012 03:16
- GitHub: adrido
- Location: Black-Forest, Germany
Re: [MOD] cannons with a lot of features! [2.5] [cannons]
In the dev branch I added the new raycast for hit detection. Thanks to all that made it possible!
GreenDiamond, could you please test it, and tell me if it works for you? Of course, you need a recent Minetest version.
Download: https://bitbucket.org/kingarthursteam/c ... et/dev.zip (indev version probably unstable!)
GreenDiamond, could you please test it, and tell me if it works for you? Of course, you need a recent Minetest version.
Download: https://bitbucket.org/kingarthursteam/c ... et/dev.zip (indev version probably unstable!)
- GreenXenith
- Member
- Posts: 1356
- Joined: Wed Oct 28, 2015 01:26
- GitHub: GreenXenith
- Location: UTC-8:00
- Contact:
Re: [MOD] cannons with a lot of features! [2.5] [cannons]
I tried it and it still does not work. Maybe I am missing a setting or something..
Sometimes it says "You hit a mob!" but the player didn't take any damage...
I tried on both 0.4.16-stable and 0.4.16-daily. Neither worked. Damage and PVP is enabled.
Sometimes it says "You hit a mob!" but the player didn't take any damage...
I tried on both 0.4.16-stable and 0.4.16-daily. Neither worked. Damage and PVP is enabled.
YouTube | Mods | Patreon | Minetest Discord @greenxenith
You should not be able to read this message.
You should not be able to read this message.
- addi
- Member
- Posts: 666
- Joined: Thu Sep 20, 2012 03:16
- GitHub: adrido
- Location: Black-Forest, Germany
Re: [MOD] cannons with a lot of features! [2.5] [cannons]
just fixed a typo, but I dont think that its solved. Could you check it anyway?
If it shows the "you hit a mob" message, but the mob does not take any damage, there might be something wrong with the mobs mod.
in mobs_redo could you change the line https://github.com/tenplus1/mobs_redo/b ... .lua#L2092 to something like minetest.log("error", "Mob Damage is".. damage) then you would be able to see if at least the mob notices it, and how much damage it takes
If it shows the "you hit a mob" message, but the mob does not take any damage, there might be something wrong with the mobs mod.
in mobs_redo could you change the line https://github.com/tenplus1/mobs_redo/b ... .lua#L2092 to something like minetest.log("error", "Mob Damage is".. damage) then you would be able to see if at least the mob notices it, and how much damage it takes
- GreenXenith
- Member
- Posts: 1356
- Joined: Wed Oct 28, 2015 01:26
- GitHub: GreenXenith
- Location: UTC-8:00
- Contact:
Re: [MOD] cannons with a lot of features! [2.5] [cannons]
Well, I was aiming at a player entity. After ~10 shots it finally "hit" the player, but the only thing that happened was the "you hit a mob" but the player did not take damage.addi wrote:If it shows the "you hit a mob" message, but the mob does not take any damage, there might be something wrong with the mobs mod.
in mobs_redo could you change the line https://github.com/tenplus1/mobs_redo/b ... .lua#L2092 to something like minetest.log("error", "Mob Damage is".. damage) then you would be able to see if at least the mob notices it, and how much damage it takes
Will test soon.
YouTube | Mods | Patreon | Minetest Discord @greenxenith
You should not be able to read this message.
You should not be able to read this message.
Re: [MOD] cannons with a lot of features! [2.5] [cannons]
I found out in the code that the entity checks only all 0.3 seconds for objects around, i increased it to 0.01 seconds and then i could kill players, the lag ws also not so much
- BrunoMine
- Member
- Posts: 1082
- Joined: Thu Apr 25, 2013 17:29
- GitHub: BrunoMine
- Location: SP-Brasil
- Contact:
Re: [MOD] cannons with a lot of features! [2.5] [cannons]
Very nice.
Cannons should shoot in a more restricted direction (not to shoot backwards, which is very strange).
Cannons should shoot in a more restricted direction (not to shoot backwards, which is very strange).
Who is online
Users browsing this forum: No registered users and 59 guests