[MOD] cannons with a lot of features! [2.5] [cannons]

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

Re: [MOD] cannons with a lot of NEW features! [2.0] [cannons

by addi » Sat May 17, 2014 05:11

ok ur right :) but not all cannonballs can stacked up to 99 the mithrill can only stacked to 9.
dgm5555 wrote:Well there was grapeshot and cannister shot, so yes cannons *can* shoot multiple balls (though I presumed the stack didn't refer to those). However in my defence I've never seen a cannon you could load with 99 balls, so an entirely unknown (perhaps just to me) "semi-automatic cannon" has been modelled - check out the magazine on that baby!!! So from real-world experience it would be reasonable to think that the cannon would be using balls from a stack (though admittedly these would usually be placed next to the cannon for firing or in the hold for storage rather than actually 'attached' to the cannon :-p

this is because minetest, does not support multiple textures to a single node, so a "singlenode" cannon would look realy ugly.
dgm5555 wrote:PS On that note (just for my curiosity) why did you create your cannon as a kind of turret and in two parts - I've never seen anything similar for a 'full-sized' cannon (as opposed to a more modern turret gun, or one of the smaller portable cannon that were developed), and would have thought the recoil would knock it over if it was built. Not that I particularly mind, it just seems a bit strange to have to dig a hole in the ground or the deck to sink the frame (not a carriage as no wheels) of the cannon into (to maintain a more realistic low centre of gravity), then have to attach the cannon barrel separately.

thats also a reason, that i used the 2 parts cannon
dgm5555 wrote:PPS I guess this ruins my next non-reality suggestion for a fireworks version - I'd really like to be able to trigger my ship to fire all cannons at once (as you've allowed with mesecons), but instead of cannon balls it fires an exploding ball with fireworks (like an average fireworks rocket). [Actually don't worry, someones allready done fireworks, so I'll probably just modify the fireworks mod viewtopic.php?id=3473to to have a display around my ship]

XD /me likes that idea
maybe that could be an easteregg in the next version.
dgm5555 wrote:PPPS, where do I find the optional bucket and fire mods, and what are they used for?

the buket and the fire mod are included in minetest_game. the bucket is need to create salt wich is used for gunpowder, and the fire is need for the burning balls
i dont know, maybe in another game there is missing the bucket or fire so its in dependencies
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

Re: [MOD] cannons with a lot of NEW features! [2.1] [cannons

by addi » Sun Jul 27, 2014 09:26

Small Update



NEW FEATURES FOR VERSION 2.1
  • changed craft reziep for steel ball, because it conflicted with another mod
  • the config can made now in world dir (cannons.conf)
Download is here: http://dev.king-arthur.eu/cannons/downloads

also a lot of thanks for over 400 Downloads!
 

lotek
Member
 
Posts: 22
Joined: Mon Jun 02, 2014 20:21
GitHub: LotekHeavy
IRC: lotek
In-game: lotek

Re: [MOD] cannons with a lot of NEW features! [2.1] [cannons

by lotek » Sun Jul 27, 2014 12:19

does this mod is compatible with the latest minetest (e.g. 0.4.10). In my case everything works, but no damage on players or the environment happens.
----
Mine Heavy
http://mine.heavy.ch
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

Re: [MOD] cannons with a lot of NEW features! [2.1] [cannons

by addi » Sun Jul 27, 2014 12:54

lotek wrote:does this mod is compatible with the latest minetest (e.g. 0.4.10). In my case everything works, but no damage on players or the environment happens.

yes of course. i just tried all out and it works realy fine, does this only happen with a special cannonball?
and it does not work if the other player is too close to the cannon. then the ball will fly through it.

damage to the environment does only take the exploding or the fire cannonball all others only damage players and mobs
 

atam7
New member
 
Posts: 6
Joined: Sun Aug 03, 2014 22:29
In-game: atam7

Re: [MOD] cannons with a lot of NEW features! [2.1] [cannons

by atam7 » Sun Aug 03, 2014 22:31

you accidently named the bronze cannon "bronze_canon" in the items.lua folder.
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

Re: [MOD] cannons with a lot of NEW features! [2.1] [cannons

by addi » Sat Nov 29, 2014 14:24

i just want to say thanks for more than 600 downloads!

 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: [MOD] cannons with a lot of NEW features! [2.1] [cannons

by Krock » Sat Nov 29, 2014 14:37

addi wrote:

i just want to say thanks for more than 600 downloads!


No problem, buddy; It's a great mod!

Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

Re: [MOD] cannons with a lot of NEW features! [2.1] [cannons

by addi » Sat Nov 29, 2014 15:34

i was just surprised, i thougt nobody is using it.
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

Re: [MOD] cannons with a lot of NEW features! [2.1] [cannons

by philipbenr » Sat Nov 29, 2014 20:58

It is great, and I think that tit should be used more, if at all possible.
 

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

Re: [MOD] cannons with a lot of NEW features! [2.1] [cannons

by Don » Sun Nov 30, 2014 13:22

addi wrote:i was just surprised, i thougt nobody is using it.

I have it installed on my server. I don't have damage enabled. We like to use it for the looks.
In single player I do sometimes play with it to destroy stuff
Thanks for the great mod.
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
FreeLikeGNU
Member
 
Posts: 119
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: [MOD] cannons with a lot of NEW features! [2.1] [cannons

by FreeLikeGNU » Fri Dec 05, 2014 01:57

please fix your git clone link in your original post to:
git clone https://bitbucket.org/kingarthursteam/cannons.git

thanks!
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

Re: [MOD] cannons with a lot of NEW features! [2.1] [cannons

by addi » Sat Dec 06, 2014 05:55

FreeLikeGNU wrote:please fix your git clone link in your original post to:
git clone https://bitbucket.org/kingarthursteam/cannons.git

thanks!

thanks for reporting, fixed
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: [MOD] cannons with a lot of NEW features! [2.1] [cannons

by Krock » Sun Dec 07, 2014 09:32

When shooting with an explosive cannon bullet (normal cannon, on a stone mainstay)
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
10:31:00: ERROR[main]: ServerError: E:\Programme\minetest\bin\..\mods\cannons/cannonballs.lua:32: at
tempt to index field 'tiles' (a nil value)
10:31:00: ERROR[main]: stack traceback:
10:31:00: ERROR[main]:  E:\Programme\minetest\bin\..\mods\cannons/cannonballs.lua:32: in function 'o
n_node_hit'
10:31:00: ERROR[main]:  E:\Programme\minetest\bin\..\mods\cannons/functions.lua:263: in function <E:
\Programme\minetest\bin\..\mods\cannons/functions.lua:243>
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

Re: [MOD] cannons with a lot of NEW features! [2.1] [cannons

by addi » Sun Dec 07, 2014 10:27

Krock wrote:When shooting with an explosive cannon bullet (normal cannon, on a stone mainstay)
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
10:31:00: ERROR[main]: ServerError: E:\Programme\minetest\bin\..\mods\cannons/cannonballs.lua:32: at
tempt to index field 'tiles' (a nil value)
10:31:00: ERROR[main]: stack traceback:
10:31:00: ERROR[main]:  E:\Programme\minetest\bin\..\mods\cannons/cannonballs.lua:32: in function 'o
n_node_hit'
10:31:00: ERROR[main]:  E:\Programme\minetest\bin\..\mods\cannons/functions.lua:263: in function <E:
\Programme\minetest\bin\..\mods\cannons/functions.lua:243>

it seems you hit a node wich used tile_images instead of tiles. its fixed now in version 2.1.1
 

bobomb
Member
 
Posts: 101
Joined: Sat May 23, 2015 20:28
GitHub: bobombolo
IRC: bobomb

Re: [MOD] cannons with a lot of NEW features! [2.1] [cannons

by bobomb » Sat May 23, 2015 20:31

I wonder if this mod could become a Scorched Earth mod. It would be nice to be able to enter the compass angle, the vertical angle, and the power into the cannon in order to make this more of an artillery simulator. And an ICBM shot. haha.
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

Re: [MOD] cannons with a lot of NEW features! [2.1] [cannons

by addi » Sat May 23, 2015 20:38

bobomb wrote:I wonder if this mod could become a Scorched Earth mod. It would be nice to be able to enter the compass angle, the vertical angle, and the power into the cannon in order to make this more of an artillery simulator. And an ICBM shot. haha.

This would be too modern. Ill not add such a feature to this mod. But if you want you can mod my mod to add that.
 

blert2112
Member
 
Posts: 244
Joined: Sat Apr 25, 2015 04:05
GitHub: blert2112

Re: [MOD] cannons with a lot of NEW features! [2.1] [cannons

by blert2112 » Mon May 25, 2015 16:04

I added in a few bits of code to make the ball stacks slightly more than decorative.
    - r-click ball stack with empty hand to get one ball of same material
    - r-click with a ball of the same material to add it back to the stack
    - stack max balls = 4
    - take four balls and the stack is removed from the world
add to functions.lua
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
function cannons.on_construct_ball_stack(pos)
   local node = minetest.get_node_or_nil(pos)
   local material = string.split(node.name, "_")[2]
   local meta = minetest.get_meta(pos)
   meta:set_int("usecount", 0)
   meta:set_string("material", material)
end

function cannons.on_rightclick_ball_stack(pos, node, player, itemstack)
   if not player or not player:is_player() then
      return
   end
   local meta = minetest.get_meta(pos)
   local count = meta:get_int("usecount")
   local material = meta:get_string("material")
   if itemstack:is_empty() then
      player:set_wielded_item(itemstack:add_item("cannons:ball_"..material))
      count = count + 1
   else
      if (itemstack:get_name() == "cannons:ball_"..material) and (count > 0) then
         count = count - 1
         itemstack:take_item(1)
      end
   end
   if count == 4 then
      minetest.remove_node(pos)
   else
      meta:set_int("usecount", count)
   end
end

add to each register_node for the stacks
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
   on_construct = function(pos)
      cannons.on_construct_ball_stack(pos)
   end,
   on_rightclick = function(pos, node, player, itemstack, pointed_thing)
      cannons.on_rightclick_ball_stack(pos, node, player, itemstack)
   end

I also thought about modifying the node boxes so that, if you take a ball from the stack, the visual will remove the ball too.
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

Re: [MOD] cannons with a lot of NEW features! [2.1] [cannons

by addi » Tue May 26, 2015 06:10

great idea :)
Ill apply it to the mod, if you agree.
btw: this code can be shortened and optimized:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
       on_construct = function(pos)
          cannons.on_construct_ball_stack(pos)
       end,
       on_rightclick = function(pos, node, player, itemstack, pointed_thing)
          cannons.on_rightclick_ball_stack(pos, node, player, itemstack)
       end

change to this:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all

       on_construct 
= cannons.on_construct_ball_stack,
       on_rightclick = cannons.on_rightclick_ball_stack

;-)
 

blert2112
Member
 
Posts: 244
Joined: Sat Apr 25, 2015 04:05
GitHub: blert2112

Re: [MOD] cannons with a lot of NEW features! [2.1] [cannons

by blert2112 » Wed May 27, 2015 00:05

Please do!
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

Update to version 2.5:

by addi » Sat Jun 13, 2015 14:10

Update to version 2.5:

New Features:
  • Cannonball stack is not longer decoration only.
    place a cannonball on another (right click) will create a stack of it.
    left click a stack to get a cannonball.
  • Supports TNT now!
    If the TNT mod is enabled (mostly on singleplayer) you can use tnt gunpowder as gunpowder, and you can shoot tnt blocks now!
    Warning: Dont shoot too fast or your cannon will explode ;-P
  • Nice voxellike meshnodes now.
    get rid of this ugly 2-part cannonstands. Old cannonstands will be converted.
  • Uses "default" formspec style now to fit into Mintest Game.
Bug fixes:
  • fixed infinite stacks
  • fixed cannonstand craftreziep
  • converted sound files from stereo to mono to make OpenAl happy
Download:
Version 2.5 [13.06.2015]
other downloads
Last edited by addi on Mon Jun 29, 2015 06:45, edited 1 time in total.
 

User avatar
Tom
Member
 
Posts: 49
Joined: Sat Dec 31, 2011 15:42
IRC: Tom-s

Re: [MOD] cannons with a lot of features! [2.5] [cannons]

by Tom » Sat Jun 27, 2015 12:56

Thank you! Your mod is awesome Addi!
 

Diamond knight
Member
 
Posts: 262
Joined: Sun Apr 19, 2015 19:50
In-game: Diamondknight or diamond_knight

Re: [MOD] cannons with a lot of features! [2.5] [cannons]

by Diamond knight » Sat Jun 27, 2015 14:42

must download tnt update!!!!!!!!!!!!!!!

the tnt will be sooo much sithy fun!!!!!!!!!!!!!!!!!!!!

and btw what is the difference between the 3 cannons besides looks and recipies?

are some more durable than others?
I can never get enough MESE!!!!!!!!!

my subgame: https://forum.minetest.net/viewtopic.php?f=50&t=11901
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: [MOD] cannons with a lot of features! [2.5] [cannons]

by Hybrid Dog » Sat Jun 27, 2015 15:29

Could you add a digiline lit controller, which can be used to make a cannon shoot by sending a digiline signal (or mesecons)?
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

Re: [MOD] cannons with a lot of features! [2.5] [cannons]

by addi » Mon Jun 29, 2015 06:57

sorry for late response. for unknown reason I don't get Email-notifications any more.

@Tom: thanks :)

@ Diamond knight: its just an optical feature. it does nothing change with durability

@ Hybrid Dog: The cannons already shoot if they get a mesecons signal. But they shoot to the last direction they shoot before. May I add digilines signal to change direction (vector).
 

dannyplaysminetest
Member
 
Posts: 37
Joined: Sun Jun 28, 2015 19:20
In-game: Danny

Re: [MOD] cannons with a lot of features! [2.5] [cannons]

by dannyplaysminetest » Mon Jun 29, 2015 18:29

Thanks for this cool Mod the Cannons look awesome in front of my Fortified Castle and they wil look epic on Ships. ^_^
 

bbaez
Member
 
Posts: 50
Joined: Wed Jul 09, 2014 15:24

Re: [MOD] cannons with a lot of features! [2.5] [cannons]

by bbaez » Sun Jul 05, 2015 17:45

Love the mod! However, I got the following with the latest posted revision:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
07:09:46: ACTION[ServerThread]: alialiali6 right-clicks object 8806: LuaEntitySA   O at (-69,2.55,-102)
07:09:51: ACTION[ServerThread]: FARP12 damaged by 8 hp at (-2.376,1.5,-143.055)
07:09:52: ACTION[ServerThread]: FARP12 damaged by 8 hp at (-2.319,1.666,-142.794   )
07:09:56: ERROR[main]: ERROR: An unhandled exception occurred: ...est-0.4.12-neu   romancer/bin/../mods/cannons/functions.lua:163: attempt to index a nil value
07:09:56: ERROR[main]: stack traceback:
07:09:56: ERROR[main]:  ...est-0.4.12-neuromancer/bin/../mods/cannons/functions.   lua:163: in function 'on_rightclick'
07:09:56: ERROR[main]:  ...minetest-0.4.12-neuromancer/bin/../builtin/game/item.   lua:326: in function <...minetest-0.4.12-neuromancer/bin/../builtin/game/item.lu   a:319>
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

Re: [MOD] cannons with a lot of features! [2.5] [cannons]

by addi » Mon Jul 06, 2015 09:30

Thanks for reporting.
Fixed in version 2.5.1
Download .zip version 2.5.1 638.4 KB 06.07.2015
download other versions
 

bbaez
Member
 
Posts: 50
Joined: Wed Jul 09, 2014 15:24

Re: [MOD] cannons with a lot of features! [2.5] [cannons]

by bbaez » Mon Jul 06, 2015 21:11

Thanks for the quick turn around. I found another one though :)

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
13:10:41: ACTION[ServerThread]: creeper_HD digs streets:asphalt_sideline at (86,3,71)
13:10:42: ACTION[ServerThread]: creeper_HD digs streets:asphalt_dashed_line at (85,3,64)
13:10:45: ACTION[ServerThread]: creeper_HD right-clicks object 2040: LuaEntitySAO at (84,3.75,59)
13:11:19: ACTION[ServerThread]: creeper_HD right-clicks object 2040: LuaEntitySAO at (85.4657,2.75,51.9)
13:11:22: ACTION[ServerThread]: creeper_HD places node cannons:wood_stand_with_cannon_steel at (85,4,47)
13:11:22: ACTION[ServerThread]: facedir: 2
13:11:22: WARNING: Undeclared global variable "itemstack" accessed at ...est-0.4.12-neuromancer/bin/../mods/cannons/functions.lua:148
13:11:22: ERROR[main]: ERROR: An unhandled exception occurred: error in error handling
13:11:22: ERROR[main]: stack traceback:
13:11:22: ERROR[main]:  [C]: in function 'add_node'
13:11:22: ERROR[main]:  ...minetest-0.4.12-neuromancer/bin/../builtin/game/item.lua:276: in function 'old_item_place_node'
13:11:22: ERROR[main]:  ...2-neuromancer/bin/../mods/node_owner/node_owner/init.lua:31: in function <...2-neuromancer/bin/../mods/node_owner/node_owner/init.lua:17>


Updated with another crash trace. I added this because of the privs warning encountered for node_owner. Just pointing it out since the server is public and I use node_owner to help with vandalizing :)

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
14:32:42: ACTION[ServerThread]: swagger digs cannons:cannon_steel at (-6,3,-140)
14:32:42: ACTION[ServerThread]: swagger digs default:sand at (-6,2,-141)
14:32:54: ACTION[ServerThread]: swagger digs cannons:ship_stand at (-8,4,-141)
14:33:14: WARNING: Undeclared global variable "privs" accessed at ...2-neuromancer/bin/../mods/node_owner/node_owner/init.lua:23
14:33:14: ACTION[ServerThread]: swagger places node cannons:cannon_steel at (-7,6,-128)
14:33:14: ACTION[ServerThread]: facedir: 1
14:33:14: WARNING: Undeclared global variable "itemstack" accessed at ...est-0.4.12-neuromancer/bin/../mods/cannons/functions.lua:148
14:33:15: ERROR[main]: ERROR: An unhandled exception occurred: error in error handling
14:33:15: ERROR[main]: stack traceback:
14:33:15: ERROR[main]:  [C]: in function 'add_node'
14:33:15: ERROR[main]:  ...minetest-0.4.12-neuromancer/bin/../builtin/game/item.lua:276: in function 'old_item_place_node'
14:33:15: ERROR[main]:  ...2-neuromancer/bin/../mods/node_owner/node_owner/init.lua:31: in function <...2-neuromancer/bin/../mods/node_owner/node_owner/init.lua:17>
 

bbaez
Member
 
Posts: 50
Joined: Wed Jul 09, 2014 15:24

Re: [MOD] cannons with a lot of features! [2.5] [cannons]

by bbaez » Tue Jul 07, 2015 18:16

I switched out node_owner for areas and markers mod. That should resolve the errors I posted above. Didn't realize node_owner was deprecated.
 

bbaez
Member
 
Posts: 50
Joined: Wed Jul 09, 2014 15:24

Re: [MOD] cannons with a lot of features! [2.5] [cannons]

by bbaez » Tue Jul 07, 2015 20:39

Hi,

Still getting the same type of crash.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
12:33:29: ACTION[ServerThread]: sexygirl places node cannons:cannon_mithril at (94,4,41)
12:33:29: ACTION[ServerThread]: facedir: 0
12:33:29: WARNING: Undeclared global variable "itemstack" accessed at ...est-0.4.12-neuromancer/bin/../mods/cannons/functions.lua:148
12:33:29: ERROR[main]: ERROR: An unhandled exception occurred: error in error handling
12:33:29: ERROR[main]: stack traceback:
12:33:29: ERROR[main]:  [C]: in function 'add_node'
12:33:29: ERROR[main]:  ...minetest-0.4.12-neuromancer/bin/../builtin/game/item.lua:276: in function <...minetest-0.4.12-neuromancer/bin/../builtin/game/item.lua:191>
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 17 guests

cron