[MOD] cannons with a lot of features! [2.5] [cannons]
cannons is a mod for the game minetest written by Kingarthurs Team
(Semmett9, eythen, and addi)
if you have some muni and some gunpowder in the cannon
you can shot the cannon if you punch it with a torch.
the cannonball will damage the other players.
if it wears armor the damage will be calculated.
at the moment there are 5 diffrent types of cannonballs
and 2 balls that can be dissabled in settings.txt (for a run on a server to avoid griefing):
configure cannons
create a file caled cannons.conf in your world dir.
add the folowing lines to it:
now you can change it. eg. if you want to disable fire then cange enable_fire = "true" to enable_fire = "false"
thats all :-)
Dependencies
minimal minetest = 0.4.8
NEW FEATURES FOR VERSION 2.1
optional features:
get cannons
relases are in the Downloads tab)
its also aviable as a git repo:
Craft Rezieps
Bucket with salt:

Salt (shapeless):

Gunpowder (schapeless):

cannon & bronce cannon:

Wooden stand:

Stone Stand:

## Screenshots



Create your own Cannonball!
Have fun! :-)
License:
LGPLv3
Credits:
Evergreen for the Salt texture
Semmett9 for realy much
eythen for some more or less stupid ideas
and to me ;-P for writing the whole topic
(Semmett9, eythen, and addi)
if you have some muni and some gunpowder in the cannon
you can shot the cannon if you punch it with a torch.
the cannonball will damage the other players.
if it wears armor the damage will be calculated.
at the moment there are 5 diffrent types of cannonballs
- wooden ball: small range, less damage
- stone ball: more range, less damage
- iron ball:huge range, huge damage
and 2 balls that can be dissabled in settings.txt (for a run on a server to avoid griefing):
- exploding ball: this destroyes all nodes in a radius of 1 (can be dissabled by setting the cannons.enable_explosion = false)
- fire ball: if it hits a node wich is able to burn it set it burn. (can be dissabled by setting the cannons.enable_fire = false)
configure cannons
create a file caled cannons.conf in your world dir.
add the folowing lines to it:
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
enable_explosion = "true"
enable_fire = "true"
now you can change it. eg. if you want to disable fire then cange enable_fire = "true" to enable_fire = "false"
thats all :-)
Dependencies
- default
- bucket
- fire(optional)
minimal minetest = 0.4.8
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)
- real 3d sound effect
- added new sounds
- particles (thanks to hybrid dog)
- mesecons support(optional)
- locks mod support (optional)
- moreores support (optional)
optional features:
+
locked shareable cannon
+
mesecons supported cannons
+
mithril cannon and cannonball
get cannons
relases are in the Downloads tab)
its also aviable as a git repo:
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
$ git clone https://bitbucket.org/kingarthursteam/cannons.git
Craft Rezieps
Bucket with salt:

Salt (shapeless):

Gunpowder (schapeless):

cannon & bronce cannon:

Wooden stand:

Stone Stand:

## Screenshots



Create your own Cannonball!
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
local ball_wood={
physical = false,
timer=0,
textures = {"cannons_wood_bullet.png"},
lastpos={},
damage=20,
range=1,
gravity=10,
velocity=40,
name="cannons:wood_bullet",
collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25},
on_player_hit = function(self,pos,player)
local playername = player:get_player_name()
player:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups={fleshy=self.damage},
}, nil)
self.object:remove()
minetest.chat_send_all(playername .." tried to catch a cannonball")
end,
on_mob_hit = function(self,pos,mob)
mob:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups={fleshy=self.damage},
}, nil)
self.object:remove()
end,
on_node_hit = function(self,pos,node)
if node.name == "default:dirt_with_grass" then
minetest.env:set_node({x=pos.x, y=pos.y, z=pos.z},{name="default:dirt"})
minetest.sound_play("cannons_hit",
{pos = pos, gain = 1.0, max_hear_distance = 32,})
self.object:remove()
elseif node.name == "default:water_source" then
minetest.sound_play("cannons_splash",
{pos = pos, gain = 1.0, max_hear_distance = 32,})
self.object:remove()
else
minetest.sound_play("cannons_hit",
{pos = pos, gain = 1.0, max_hear_distance = 32,})
self.object:remove()
end
end,
}
cannons.register_muni("cannons:ball_wood",ball_wood)
License:
LGPLv3
Credits:
Evergreen for the Salt texture
Semmett9 for realy much
eythen for some more or less stupid ideas
and to me ;-P for writing the whole topic