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

User avatar
Achilles
Member
 
Posts: 247
Joined: Sun Dec 15, 2013 11:55
Location: Excuse Me???? -_-
In-game: Achilles

by Achilles » Sat Jan 18, 2014 22:47

Nice mod, i really like the idea of cannons in Minetest especially as i was planning to build a huge wall around a town to defend it.

Is there any way of making the cannon automatic so that if anyone other than the person who made it gets in range of the cannon they will be killed- A bit like dispensers in Minecraft.

You could also change the mod so that you could add the name of a client/player who you don't want the cannons to fire at.

Just a couple of hints but otherwise i love the mod, thanks :)
The Ironic Thing About Common Sense Is That It Isn't Very Common
 

User avatar
addi
Member
 
Posts: 659
Joined: Thu Sep 20, 2012 03:16
Location: Black-Forest, Germany
GitHub: adrido

by addi » Sun Jan 19, 2014 02:22

Achilles wrote:Nice mod, i really like the idea of cannons in Minetest especially as i was planning to build a huge wall around a town to defend it.

Is there any way of making the cannon automatic so that if anyone other than the person who made it gets in range of the cannon they will be killed- A bit like dispensers in Minecraft.

You could also change the mod so that you could add the name of a client/player who you don't want the cannons to fire at.

Just a couple of hints but otherwise i love the mod, thanks :)

thanks :)
i dont know what the dispensers mod is doing, but you can combine this with the mesecons mod:
its possible to build some mesecons wires to the cannon and a player detector wich detects the "enemy" and give a impulse to the cannon(s). than the cannon will shot to the last possition they had shot.
 

dgm5555
Member
 
Posts: 245
Joined: Tue Apr 08, 2014 19:45

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

by dgm5555 » Thu May 15, 2014 21:52

Great mod. Few questions
How do you break the cannon?
I take it "muni" is ammunition. It took me a little while to figure out that stacks of cannon balls are not able to be used for ammunition - you have to use a single ball.
 

User avatar
addi
Member
 
Posts: 659
Joined: Thu Sep 20, 2012 03:16
Location: Black-Forest, Germany
GitHub: adrido

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

by addi » Fri May 16, 2014 03:23

you can break (dig) the cannon only if they is empty (no muni and no gunpowder).

have you ever sean a cannon, that shoots a stack of balls? only a single ball can be shooted all other is unreal. stacks only designed to save space in chests or for decoration.
 

dgm5555
Member
 
Posts: 245
Joined: Tue Apr 08, 2014 19:45

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

by dgm5555 » Fri May 16, 2014 17:30

addi wrote:have you ever sean a cannon, that shoots a stack of balls? only a single ball can be shooted all other is unreal. stacks only designed to save space in chests or for decoration.

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

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.

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 https://forum.minetest.net/viewtopic.php?id=3473to to have a display around my ship]

PPPS, where do I find the optional bucket and fire mods, and what are they used for?

LOL
David
 

User avatar
addi
Member
 
Posts: 659
Joined: Thu Sep 20, 2012 03:16
Location: Black-Forest, Germany
GitHub: adrido

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: 659
Joined: Thu Sep 20, 2012 03:16
Location: Black-Forest, Germany
GitHub: adrido

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
Location: Switzerland
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: 659
Joined: Thu Sep 20, 2012 03:16
Location: Black-Forest, Germany
GitHub: adrido

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: 659
Joined: Thu Sep 20, 2012 03:16
Location: Black-Forest, Germany
GitHub: adrido
 

User avatar
Krock
Developer
 
Posts: 4448
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
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!

Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
addi
Member
 
Posts: 659
Joined: Thu Sep 20, 2012 03:16
Location: Black-Forest, Germany
GitHub: adrido
 

User avatar
philipbenr
Member
 
Posts: 1688
Joined: Fri Jun 14, 2013 01:56
Location: United States
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi

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: 1643
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: 125
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU
 

User avatar
addi
Member
 
Posts: 659
Joined: Thu Sep 20, 2012 03:16
Location: Black-Forest, Germany
GitHub: adrido

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
Developer
 
Posts: 4448
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
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)
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>
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
addi
Member
 
Posts: 659
Joined: Thu Sep 20, 2012 03:16
Location: Black-Forest, Germany
GitHub: adrido

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)
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: 115
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: 659
Joined: Thu Sep 20, 2012 03:16
Location: Black-Forest, Germany
GitHub: adrido

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
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
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: 659
Joined: Thu Sep 20, 2012 03:16
Location: Black-Forest, Germany
GitHub: adrido

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:
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:
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
 

User avatar
addi
Member
 
Posts: 659
Joined: Thu Sep 20, 2012 03:16
Location: Black-Forest, Germany
GitHub: adrido

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.
 

PreviousNext

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 6 guests