Animals Modpack 1.4.5

master
sapier 2012-09-19 23:30:14 +02:00
commit ce077208ed
855 changed files with 63782 additions and 0 deletions

View File

@ -0,0 +1,3 @@
default
animalmaterials
mobf

72
animal_big_red/init.lua Normal file
View File

@ -0,0 +1,72 @@
local version = "0.0.7"
big_red_prototype = {
name="big_red",
modname="animal_big_red",
generic = {
description="Big Red",
base_health=30,
kill_result="",
armor_groups= {
fleshy=1,
cracky=1,
deamon=1,
},
envid="on_ground_1",
},
movement = {
default_gen="probab_mov_gen",
min_accel=0.2,
max_accel=0.4,
max_speed=2,
pattern="stop_and_go",
canfly=false,
},
harvest = {
tool="",
tool_consumed=false,
result="",
transforms_to="",
min_delay=-1,
},
catching = nil,
random_drop = nil,
auto_transform = nil,
graphics = {
sprite_scale={x=6,y=6},
sprite_div = {x=1,y=1},
visible_height = 3.2,
visible_width = 1,
},
combat = {
mgen="follow_mov_gen",
angryness=0.95,
starts_attack=true,
sun_sensitive=true,
melee = {
maxdamage=4,
range=2,
speed=2,
},
distance = {
attack="mobf:plasmaball_entity",
range=10,
speed=2,
},
self_destruct = nil,
},
spawning = {
rate=0.01,
density=1000,
algorithm="shadows",
height=4
},
}
--register with animals mod
print ("Adding animal "..big_red_prototype.name)
animals_add_animal(big_red_prototype)
print ("animal_big_red mod version " .. version .. " loaded")

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

View File

@ -0,0 +1,3 @@
default
animalmaterials
mobf

123
animal_chicken/init.lua Normal file
View File

@ -0,0 +1,123 @@
local version = "0.0.8"
local chicken_groups = {
not_in_creative_inventory=1
}
local selectionbox_chicken = {-0.2, -0.25, -0.4, 0.2, 0.25, 0.4}
local modpath = minetest.get_modpath("animal_chicken")
dofile (modpath .. "/model.lua")
chicken_prototype = {
name="chicken",
modname="animal_chicken",
generic = {
description="Chicken",
base_health=5,
kill_result="animalmaterials:feather 1",
armor_groups= {
fleshy=3,
},
envid = "meadow"
},
movement = {
default_gen="probab_mov_gen",
min_accel=0.05,
max_accel=0.1,
max_speed=0.3,
min_speed=0.1,
pattern="stop_and_go",
canfly = false,
},
harvest = nil,
catching = {
tool="animalmaterials:lasso",
consumed=true,
},
random_drop = {
result="animalmaterials:egg",
min_delay=60,
chance=0.2
},
auto_transform = nil,
graphics = {
sprite_scale={x=1,y=1},
sprite_div = {x=6,y=1},
visible_height = 1,
visible_width = 1,
},
graphics_3d = {
visual = "wielditem",
textures = {"animal_chicken:box_chicken"},
collisionbox = selectionbox_chicken,
visual_size= {x=0.6,y=0.6,z=0.6},
},
combat = nil,
spawning = {
rate=0.001,
density=50,
algorithm="willow_mapgen",
height=1
},
}
rooster_prototype = {
name="rooster",
modname="animal_chicken",
generic = {
description="Rooster",
base_health=5,
kill_result="animalmaterials:feather 1",
armor_groups= {
fleshy=3,
},
envid = "meadow"
},
movement = {
default_gen="probab_mov_gen",
min_accel=0.05,
max_accel=0.1,
max_speed=0.3,
min_speed=0.1,
pattern="stop_and_go",
canfly = false,
},
harvest = nil,
catching = {
tool="animalmaterials:lasso",
consumed=true,
},
random_drop = nil,
auto_transform = nil,
graphics = {
sprite_scale={x=1,y=1},
sprite_div = {x=6,y=1},
visible_height = 1,
visible_width = 1,
},
graphics_3d = {
visual = "wielditem",
textures = {"animal_chicken:box_rooster"},
collisionbox = selectionbox_chicken,
visual_size= {x=0.6,y=0.6,z=0.6},
},
combat = nil,
spawning = {
rate=0.001,
density=50,
algorithm="willow_mapgen",
height=1
},
}
--register with animals mod
print ("Adding animal "..chicken_prototype.name)
animals_add_animal(chicken_prototype)
print ("Adding animal "..rooster_prototype.name)
animals_add_animal(rooster_prototype)
print ("animal_chicken mod version " .. version .. " loaded")

106
animal_chicken/model.lua Normal file
View File

@ -0,0 +1,106 @@
function x(val)
return ((val -80) / 160)
end
function z(val)
return ((val -80) / 160)
end
function y(val)
return ((val + 80) / 160)
end
local textures_chicken = {
"animal_chicken_chicken_bottom.png",
"animal_chicken_chicken_top.png",
"animal_chicken_chicken_front.png",
"animal_chicken_chicken_back.png",
"animal_chicken_chicken_left.png",
"animal_chicken_chicken_right.png",
}
local textures_rooster = {
"animal_chicken_chicken_bottom.png",
"animal_chicken_rooster_top.png",
"animal_chicken_chicken_front.png",
"animal_chicken_rooster_back.png",
"animal_chicken_chicken_left.png",
"animal_chicken_chicken_right.png",
}
local nodebox_chicken ={
--body
{x(50),y(-60),z(100),x(110),y(-90),z(60)},
--body lower
{x(60),y(-90),z(90),x(100),y(-100),z(70)},
--tail
{x(40),y(-60),z(90),x(50),y(-80),z(70)},
{x(30),y(-54),z(85),x(40),y(-70),z(75)},
--neck
{x(110),y(-45),z(88),x(120),y(-80),z(72)},
{x(120),y(-40),z(88),x(130),y(-70),z(72)},
{x(130),y(-48),z(83),x(140),y(-54),z(77)},
--feet
{x(78),y(-100),z(88),x(82),y(-110),z(85)},
{x(75),y(-110),z(88),x(85),y(-112),z(85)},
{x(78),y(-100),z(75),x(82),y(-110),z(72)},
{x(75),y(-110),z(75),x(85),y(-112),z(72)},
}
local nodebox_rooster ={
--body
{x(50),y(-60),z(100),x(110),y(-90),z(60)},
--body lower
{x(60),y(-90),z(90),x(100),y(-100),z(70)},
--tail
{x(40),y(-60),z(90),x(50),y(-80),z(70)},
{x(30),y(-54),z(85),x(40),y(-70),z(75)},
--neck
{x(110),y(-45),z(88),x(120),y(-80),z(72)},
{x(120),y(-40),z(88),x(130),y(-70),z(72)},
{x(130),y(-48),z(83),x(140),y(-54),z(77)},
{x(120),y(-35),z(81),x(130),y(-50),z(79)},
{x(115),y(-38),z(81),x(120),y(-50),z(79)},
--feet
{x(78),y(-100),z(88),x(82),y(-110),z(85)},
{x(75),y(-110),z(88),x(85),y(-112),z(85)},
{x(78),y(-100),z(75),x(82),y(-110),z(72)},
{x(75),y(-110),z(75),x(85),y(-112),z(72)},
}
minetest.register_node("animal_chicken:box_chicken", {
tiles = textures_chicken,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = nodebox_chicken
},
groups = chicken_groups
})
minetest.register_node("animal_chicken:box_rooster", {
tiles = textures_rooster,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = nodebox_rooster
},
groups = chicken_groups
})

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

View File

@ -0,0 +1,3 @@
default
animalmaterials
mobf

51
animal_clownfish/init.lua Normal file
View File

@ -0,0 +1,51 @@
local version = "0.0.4"
clownfish_prototype = {
name="clownfish",
modname="animal_clownfish",
generic = {
description="Clownfish",
base_health=5,
kill_result="animalmaterials:scale_golden",
armor_groups= {
fleshy=3,
},
envid = "open_waters"
},
movement = {
default_gen="probab_mov_gen",
min_accel=0.2,
max_accel=0.3,
max_speed=1.5,
pattern="swim_pattern2",
canfly=true,
},
harvest = nil,
catching = {
tool="animalmaterials:net",
consumed=true,
},
random_drop = nil,
auto_transform = nil,
graphics = {
sprite_scale={x=1,y=1},
sprite_div = {x=6,y=1},
visible_height = 1,
visible_width = 1,
},
combat = nil,
spawning = {
rate=0.02,
density=350,
algorithm="in_shallow_water",
height=-1
},
}
--register with animals mod
print ("Adding animal "..clownfish_prototype.name)
animals_add_animal(clownfish_prototype)
print ("animal_clownfish mod version " .. version .. " loaded")

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,13 @@
Sounds from:
From http://commons.wikimedia.org/wiki/Category:Mudchute_Park_and_Farm
By Secretlondon http://commons.wikimedia.org/wiki/User:Secretlondon
Hosted by OpenGameArt.org
Available under GFDL 1.2 or later or CC-BY-SA 3.0 or later
Graphics:
2D rinoux WTFP
3D tonyka WTFP

3
animal_cow/depends.txt Normal file
View File

@ -0,0 +1,3 @@
default
animalmaterials
mobf

155
animal_cow/init.lua Normal file
View File

@ -0,0 +1,155 @@
local version = "0.0.11"
local cow_groups = {
not_in_creative_inventory=1
}
local selectionbox_cow = {-1.5, -1.5, -0.75, 1.5, 0.6, 0.75}
local selectionbox_steer = {-1.5*1.1, -1.5*1.1, -0.75*1.1, 1.5*1.1, 0.6*1.1, 0.75*1.1}
local modpath = minetest.get_modpath("animal_cow")
--include debug trace functions
dofile (modpath .. "/model.lua")
cow_prototype = {
name="cow",
modname="animal_cow",
generic = {
description="Cow",
base_health=40,
kill_result="animalmaterials:meat_raw 5",
armor_groups= {
fleshy=2,
},
groups = cow_groups,
envid = "meadow"
},
movement = {
default_gen="probab_mov_gen",
min_accel=0.05,
max_accel=0.1,
max_speed=0.3,
min_speed=0.025,
pattern="stop_and_go",
canfly=false,
},
harvest = {
tool="animalmaterials:glass",
tool_consumed=true,
result="animalmaterials:milk",
transforms_to="",
min_delay=60,
},
catching = {
tool="animalmaterials:lasso",
consumed=true,
},
random_drop = nil,
auto_transform = nil,
graphics = {
sprite_scale={x=4,y=4},
sprite_div = {x=6,y=1},
visible_height = 2,
},
graphics_3d = {
visual = "wielditem",
textures = {"animal_cow:box_cow"},
collisionbox = selectionbox_cow,
visual_size= {x=2,y=2,z=2},
},
combat = nil,
spawning = {
rate=0.001,
density=200,
algorithm="willow_mapgen",
height=2
},
sound = {
random = {
name="Mudchute_cow_1",
min_delta = 30,
chance = 0.5,
gain = 1,
max_hear_distance = 10,
},
},
}
steer_prototype = {
name="steer",
modname="animal_cow",
generic = {
description="Steer",
base_health=40,
kill_result="animalmaterials:meat_raw 5",
armor_groups= {
fleshy=2,
},
groups = cow_groups,
envid = "meadow"
},
movement = {
default_gen="probab_mov_gen",
min_accel=0.05,
max_accel=0.1,
max_speed=0.3,
min_speed=0.025,
pattern="stop_and_go",
canfly=false,
},
harvest = nil,
catching = {
tool="animalmaterials:lasso",
consumed=true,
},
random_drop = nil,
auto_transform = nil,
graphics = {
sprite_scale={x=4,y=4},
sprite_div = {x=6,y=1},
visible_height = 2,
},
graphics_3d = {
visual = "wielditem",
textures = {"animal_cow:box_steer"},
collisionbox = selectionbox_steer,
visual_size= {x=2.2,y=2.2,z=2.2},
},
combat = nil,
spawning = {
rate=0.001,
density=200,
algorithm="willow_mapgen",
height=2
},
sound = {
random = {
name="Mudchute_cow_1",
min_delta = 30,
chance = 0.5,
gain = 1,
max_hear_distance = 10,
},
},
}
minetest.register_craft({
output = "animalmaterials:glass 5",
recipe = {
{'', "default:glass",''},
{'', "default:glass",''}
}
})
--register with animals mod
print ("Adding animal "..cow_prototype.name)
animals_add_animal(cow_prototype)
print ("Adding animal "..steer_prototype.name)
animals_add_animal(steer_prototype)
print ("animal_cow mod version " .. version .. " loaded")

113
animal_cow/model.lua Normal file
View File

@ -0,0 +1,113 @@
function x(val)
return ((val -80) / 160)
end
function z(val)
return ((val -80) / 160)
end
function y(val)
return ((val + 80) / 160)
end
local textures_cow = {
"animals_cow_bottom.png",
"animals_cow_top.png",
"animals_cow_front.png",
"animals_cow_back.png",
"animals_cow_left.png",
"animals_cow_right.png",
}
local textures_steer = {
"animals_cow_steer_bottom.png",
"animals_cow_top.png",
"animals_cow_front.png",
"animals_cow_back.png",
"animals_cow_left.png",
"animals_cow_right.png",
}
local nodebox_cow ={
--snut
{ x(140), y(-70), z(90), x(160), y(-90), z(70) },
--head
{ x(120), y(-60), z(90), x(140), y(-90), z(70) },
--neck
{ x(110), y(-50), z(110), x(120), y(-90), z(50) },
--body
{ x(10), y(-50), z(110), x(110), y(-110),z(50) },
--tail
{ x(0), y(-50), z(85), x(10), y(-120),z(75) },
--legs
--vl
{ x(90), y(-110), z(110), x(100), y(-160), z(100) },
{ x(80), y(-110), z(110), x(90), y(-130), z(100) },
--vr
{ x(90), y(-110), z(60), x(100), y(-160), z(50) },
{ x(80), y(-110), z(60), x(90), y(-130), z(50) },
--hl
{ x(10), y(-110), z(110), x(20), y(-160), z(100) },
{ x(10), y(-110), z(110), x(30), y(-130), z(100) },
--hr
{ x(10), y(-110), z(60), x(20), y(-160), z(50) },
{ x(10), y(-110), z(60), x(30), y(-130), z(50) },
--udder
{ x(30), y(-110), z(90), x(50), y(-130), z(70) }
}
local nodebox_steer ={
--snut
{ x(140), y(-70), z(90), x(160), y(-90), z(70) },
--head
{ x(120), y(-60), z(90), x(140), y(-90), z(70) },
--neck
{ x(110), y(-50), z(110), x(120), y(-90), z(50) },
--body
{ x(10), y(-50), z(110), x(110), y(-110),z(50) },
--tail
{ x(0), y(-50), z(85), x(10), y(-120),z(75) },
--legs
--vl
{ x(90), y(-110), z(110), x(100), y(-160), z(100) },
{ x(80), y(-110), z(110), x(90), y(-130), z(100) },
--vr
{ x(90), y(-110), z(60), x(100), y(-160), z(50) },
{ x(80), y(-110), z(60), x(90), y(-130), z(50) },
--hl
{ x(10), y(-110), z(110), x(20), y(-160), z(100) },
{ x(10), y(-110), z(110), x(30), y(-130), z(100) },
--hr
{ x(10), y(-110), z(60), x(20), y(-160), z(50) },
{ x(10), y(-110), z(60), x(30), y(-130), z(50) },
}
minetest.register_node("animal_cow:box_cow", {
tiles = textures_cow,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = nodebox_cow
},
groups = cow_groups
})
minetest.register_node("animal_cow:box_steer", {
tiles = textures_steer,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = nodebox_steer
},
groups = cow_groups
})

Binary file not shown.

View File

@ -0,0 +1,14 @@
--cow--
random:
random_1.ogg
hit:
--missing--
die:
--missing--
harvest:
--missing--

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -0,0 +1,2 @@
default
mobf

78
animal_creeper/init.lua Normal file
View File

@ -0,0 +1,78 @@
local version = "0.0.5"
creeper_prototype = {
name="creeper",
modname="animal_creeper",
generic = {
description="Creeper",
base_health=5,
kill_result="",
armor_groups= {
cracky=3,
},
envid="on_ground_1",
},
movement = {
default_gen="probab_mov_gen",
min_accel=0.4,
max_accel=0.6,
max_speed=2,
pattern="stop_and_go",
canfly=false,
},
harvest = nil,
catching = nil,
random_drop = nil,
auto_transform = nil,
graphics = {
sprite_scale={x=4,y=4},
sprite_div = {x=6,y=1},
visible_height = 1.5,
},
combat = {
mgen="follow_mov_gen",
angryness=0.95,
starts_attack=true,
sun_sensitive=true,
melee = {
maxdamage=0,
range=2,
speed=1,
},
distance = nil,
self_destruct = {
damage=15,
range=5,
node_damage_range = 1.5,
delay=5,
},
},
spawning = {
rate=0.02,
density=500,
algorithm="at_night",
height=2
},
sound = {
random = {
name="random_1",
min_delta = 10,
chance = 0.5,
gain = 1,
max_hear_distance = 75,
},
self_destruct = {
name="bomb_explosion",
gain = 2,
max_hear_distance = 150,
},
},
}
--register with animals mod
print ("Adding animal "..creeper_prototype.name)
animals_add_animal(creeper_prototype)
print ("animal_creeper mod version " .. version .. " loaded")

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,14 @@
--creeper--
random:
random_1.ogg
hit:
--missing--
die:
die.ogg
self_destruct:
bomb_explosion.ogg

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

3
animal_deer/depends.txt Normal file
View File

@ -0,0 +1,3 @@
default
animalmaterials
mobf

67
animal_deer/init.lua Normal file
View File

@ -0,0 +1,67 @@
local version = "0.0.6"
local chicken_deer = {
not_in_creative_inventory=1
}
local selectionbox_deer = {-1, -1.5, -1, 1, 1.5, 1}
local modpath = minetest.get_modpath("animal_deer")
dofile (modpath .. "/model.lua")
deer_prototype = {
name="deer",
modname = "animal_deer",
generic = {
description="Deer",
base_health=25,
kill_result="animalmaterials:meat_raw 2",
armor_groups= {
fleshy=3,
},
envid="meadow",
},
movement = {
default_gen="probab_mov_gen",
min_accel=0.2,
max_accel=0.4,
max_speed=2,
pattern="stop_and_go",
canfly=false,
},
harvest = nil,
catching = {
tool="animalmaterials:lasso",
consumed=true,
},
random_drop = nil,
auto_transform = nil,
graphics = {
sprite_scale={x=4,y=4},
sprite_div = {x=6,y=1},
visible_height = 2,
visible_width = 1,
},
graphics_3d = {
visual = "wielditem",
textures = {"animal_deer:box_deer"},
collisionbox = selectionbox_deer,
visual_size= {x=2,y=2,z=2},
},
combat = nil,
spawning = {
rate=0.002,
density=200,
algorithm="forrest_mapgen",
height=2
},
}
--register with animals mod
print ("Adding animal "..deer_prototype.name)
animals_add_animal(deer_prototype)
print ("animal_deer mod version " .. version .. " loaded")

102
animal_deer/model.lua Normal file
View File

@ -0,0 +1,102 @@
function x(val)
return ((val -80) / 160)
end
function z(val)
return ((val -80) / 160)
end
function y(val)
return ((val + 80) / 160)
end
local textures_deer = {
"animal_deer_deer_bottom.png",
"animal_deer_deer_top.png",
"animal_deer_deer_front.png",
"animal_deer_deer_back.png",
"animal_deer_deer_left.png",
"animal_deer_deer_right.png",
}
local nodebox_deer ={
--body
{x(40),y(-60),z(100),x(100),y(-105),z(60)},
--neck+head
{x(95),y(-45),z(90),x(100),y(-60),z(70)},
{x(100),y(-30),z(90),x(110),y(-100),z(70)},
{x(110),y(-30),z(90),x(115),y(-80),z(70)},
{x(115),y(-30),z(90),x(120),y(-70),z(70)},
{x(120),y(-40),z(85),x(130),y(-50),z(75)},
--tail
{x(30),y(-65),z(95),x(40),y(-100),z(65)},
{x(25),y(-80),z(85),x(30),y(-95),z(75)},
--legs
--front right
{x(85),y(-105),z(75),x(100),y(-120),z(65)},
{x(90),y(-120),z(73),x(100),y(-130),z(68)},
{x(95),y(-130),z(73),x(100),y(-155),z(68)},
--front left
{x(85),y(-105),z(95),x(100),y(-120),z(85)},
{x(90),y(-120),z(93),x(100),y(-130),z(88)},
{x(95),y(-130),z(93),x(100),y(-155),z(88)},
--back right
{x(50),y(-105),z(75),x(60),y(-110),z(65)},
{x(45),y(-110),z(73),x(60),y(-115),z(68)},
{x(45),y(-115),z(73),x(55),y(-120),z(68)},
{x(45),y(-115),z(73),x(55),y(-120),z(68)},
{x(45),y(-120),z(73),x(50),y(-155),z(68)},
--back left
{x(30),y(-100),z(95),x(40),y(-110),z(85)},
{x(25),y(-110),z(93),x(40),y(-115),z(88)},
{x(25),y(-115),z(93),x(35),y(-120),z(88)},
{x(25),y(-115),z(93),x(35),y(-120),z(88)},
{x(25),y(-120),z(93),x(30),y(-155),z(88)},
--antlers
--right
{x(105),y(-25),z(77),x(110),y(-30),z(72)},
{x(105),y(-20),z(77),x(110),y(-25),z(40)},
--front
{x(110),y(-10),z(70),x(115),y(-25),z(65)},
{x(110),y(-15),z(60),x(115),y(-25),z(55)},
{x(110),y(-20),z(50),x(115),y(-25),z(45)},
--back
{x(100),y(-5),z(65),x(105),y(-25),z(60)},
{x(100),y(-10),z(55),x(105),y(-25),z(50)},
{x(100),y(-15),z(45),x(105),y(-25),z(40)},
--left
{x(105),y(-25),z(88),x(110),y(-30),z(83)},
{x(105),y(-20),z(120),x(110),y(-25),z(83)},
--front
{x(110),y(-10),z(95),x(115),y(-25),z(90)},
{x(110),y(-15),z(105),x(115),y(-25),z(100)},
{x(110),y(-20),z(115),x(115),y(-25),z(110)},
--back
{x(100),y(-5),z(100),x(105),y(-25),z(95)},
{x(100),y(-10),z(110),x(105),y(-25),z(105)},
{x(100),y(-15),z(120),x(105),y(-25),z(115)},
}
minetest.register_node("animal_deer:box_deer", {
tiles = textures_deer,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = nodebox_deer
},
groups = deer_groups
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

2
animal_dm/depends.txt Normal file
View File

@ -0,0 +1,2 @@
default
mobf

95
animal_dm/init.lua Normal file
View File

@ -0,0 +1,95 @@
local version = "0.0.8"
dm_prototype = {
name="dm",
modname="animal_dm",
generic = {
description="Dungeonmaster (Animals)",
base_health=50,
kill_result="",
armor_groups= {
fleshy=1,
deamon=1,
},
envid="simple_air"
},
movement = {
default_gen="probab_mov_gen",
min_accel=0.2,
max_accel=0.4,
max_speed=2,
pattern="stop_and_go",
canfly=false,
},
harvest = nil,
catching = nil,
random_drop = nil,
auto_transform = nil,
graphics = {
sprite_scale={x=4,y=4},
sprite_div = {x=6,y=1},
visible_height = 2,
},
combat = {
mgen="follow_mov_gen",
angryness=0.99,
starts_attack=true,
sun_sensitive=true,
melee = {
maxdamage=8,
range=5,
speed=1,
},
distance = {
attack="mobf:fireball_entity",
range =15,
speed = 1,
},
self_destruct = nil,
},
spawning = {
rate=0.02,
density=750,
algorithm="shadows",
height=3
},
sound = {
random = {
name="random_1",
min_delta = 30,
chance = 0.5,
gain = 1,
max_hear_distance = 15,
},
distance = {
name="fireball",
gain = 1,
max_hear_distance = 10,
},
die = {
name="die",
gain = 1,
max_hear_distance = 15,
},
melee = {
name="hit",
gain = 1,
max_hear_distance = 5,
},
},
}
dm_debug = function (msg)
--minetest.log("action", "mobs: "..msg)
--minetest.chat_send_all("mobs: "..msg)
end
local modpath = minetest.get_modpath("animal_dm")
dofile (modpath .. "/vault.lua")
--register with animals mod
print ("Adding animal "..dm_prototype.name)
animals_add_animal(dm_prototype)
print ("animal_dm mod version " .. version .. " loaded")

BIN
animal_dm/sounds/die.ogg Normal file

Binary file not shown.

Binary file not shown.

BIN
animal_dm/sounds/hit.ogg Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,16 @@
--dm--
random:
random_1.ogg
hit:
hit.ogg
die:
die.ogg
melee:
hit.ogg
distance:
fireball.ogg

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

524
animal_dm/vault.lua Normal file
View File

@ -0,0 +1,524 @@
--(c) Celeron55
local vault = {}
function vault.cmp(v, w)
return (
v.x == w.x and
v.y == w.y and
v.z == w.z
)
end
function vault.add(v, w)
return {
x = v.x + w.x,
y = v.y + w.y,
z = v.z + w.z,
}
end
function vault.sub(v, w)
return {
x = v.x - w.x,
y = v.y - w.y,
z = v.z - w.z,
}
end
vault.make_vault_part = function(p, part, seed)
local ns = nil
local top_y = 2
local mob = nil
--choose what to do at position
if part == 'w' then
ns = {
{name='default:cobble'},
{name='default:cobble'},
{name='default:cobble'},
{name='default:cobble'},
}
elseif part == 'W' then
top_y = 3
ns = {
{name='default:cobble'},
{name='default:cobble'},
{name='default:cobble'},
{name='default:cobble'},
{name='default:cobble'},
{name='default:cobble'},
}
elseif part == 'c' then
ns = {
{name='default:cobble'},
{name='air'},
{name='air'},
{name='default:cobble'},
}
elseif part == 'T' then
ns = {
{name='default:cobble'},
{name='default:torch'},
{name='air'},
{name='default:cobble'},
}
elseif part == 'f' then
ns = {
{name='air'},
{name='air'},
{name='air'},
{name='default:cobble'},
}
elseif part == 'l' then
top_y = 3
ns = {
{name='default:cobble'},
{name='air'},
{name='air'},
{name='air'},
{name='air'},
{name='default:lava_source'},
}
elseif part == 'm' then
top_y = 3
ns = {
{name='default:cobble'},
{name='air'},
{name='air'},
{name='air'},
{name='default:cobble'},
}
mob = "animal_dm:dm"
elseif part == 'C' then
top_y = 3
ns = {
{name='default:cobble'},
{name='air'},
{name='air'},
{name='air'},
{name='default:cobble'},
}
elseif part == 'S' then
top_y = 3
ns = {
{name='default:cobble'},
{name='air'},
{name='default:bookshelf'},
{name='default:bookshelf'},
{name='default:cobble'},
}
elseif part == 'd' then
ns = {
{name='default:cobble'},
{name='air'},
{name='air'},
{name='default:cobble'},
}
elseif part == 'a' then
ns = {
nil,
{name='air'},
{name='air'},
nil,
}
elseif part == 'A' then
ns = {
nil,
{name='air'},
{name='air'},
{name='air'},
{name='default:cobble'},
}
elseif part == 't' then
local invcontent = {}
local pr = PseudoRandom(seed)
if pr:next(1,4) == 1 then
table.insert(invcontent, 'default:apple '..tostring(pr:next(1,5)))
end
if pr:next(1,3) == 1 then
table.insert(invcontent, 'bucket:bucket_empty 1')
end
if pr:next(1,4) == 1 then
table.insert(invcontent, 'bucket:bucket_lava 1')
end
if pr:next(1,20) == 1 then
table.insert(invcontent, 'bucket:bucket_water 1')
end
if pr:next(1,34) == 1 then
table.insert(invcontent, 'bucket:nyancat 1')
table.insert(invcontent, 'bucket:nyancat_rainbow '..tostring(pr:next(1,6)))
end
if pr:next(1,2) == 1 then
table.insert(invcontent, 'default:gravel '..tostring(pr:next(1,10)))
end
if pr:next(1,3) == 1 then
table.insert(invcontent, 'default:bookshelf '..tostring(pr:next(1,2)))
end
if pr:next(1,8) == 1 then
table.insert(invcontent, 'default:cactus '..tostring(pr:next(1,2)))
end
if pr:next(1,4) == 1 then
table.insert(invcontent, 'default:rail '..tostring(pr:next(1,10)))
end
if pr:next(1,5) == 1 then
table.insert(invcontent, 'default:ladder '..tostring(pr:next(1,9)))
end
if pr:next(1,3) == 1 then
table.insert(invcontent, 'default:sign_wall 1')
end
if pr:next(1,6) == 1 then
table.insert(invcontent, 'default:steelblock '..tostring(pr:next(1,6)))
end
ns = {
{name='default:cobble'},
{name='air'},
{name='default:chest', inv=invcontent},
{name='default:cobble'},
}
else
return
end
--for all nodes in definition
for i=1,#ns do
local dy = top_y + 1 - i
local p2 = {x=p.x,y=p.y+dy,z=p.z}
--get node at position
local oldn = minetest.env:get_node(p2)
local n = ns[i]
--don't do anything if no new node is specified or
--old node is air
if n and oldn.name ~= "air" then
--possibly add mossy if it's a cobble node
if n.name == 'default:cobble' then
local perlin = minetest.env:get_perlin(123, 2, 0.8, 2.0)
if perlin:get3d(p2) >= 0.0 then
n.name = 'default:mossycobble'
end
end
--set node
--dm_debug("pos: " .. minetest.pos_to_string(p2) .. " replacing " .. oldn.name .. " by " .. n.name)
minetest.env:set_node(p2, ns[i])
--special handling for chests
if n.inv then
dm_debug("adding chest at " .. minetest.pos_to_string(p2) )
local meta = minetest.env:get_meta(p2)
local inv = meta:get_inventory()
for _,itemstring in ipairs(n.inv) do
inv:add_item('main', itemstring)
end
end
else
--dm_debug("pos: " .. minetest.pos_to_string(p) .. " not replacing " .. oldn.name)
end
end
if mob then
--dm_debug("adding dm at " .. minetest.pos_to_string({x=p.x,y=p.y+1,z=p.z}) )
local newobject = minetest.env:add_entity({x=p.x,y=p.y+1,z=p.z}, mob)
local newentity = mobf_find_entity(newobject)
if newentity and
newentity.dynamic_data and
newentity.dynamic_data.spawning then
newentity.dynamic_data.spawning.player_spawned = playerspawned
newentity.dynamic_data.spawning.spawner = "vault"
end
end
end
vault.generate_vault = function(vault_def, p, dir, seed)
local dim_z = #vault_def
assert(dim_z > 0)
local dim_x = #vault_def[1]
--don't generate vault if entrance dir not z +1
if not vault.cmp(dir, {x=0,y=0,z=1}) then
--dm_debug("entrance direction wrong: " .. minetest.pos_to_string(p))
return
else
dm_debug("generating vault at: " .. minetest.pos_to_string(p))
end
--print("Making vault at "..minetest.pos_to_string(p))
if dim_x >= 14 then
--dm_debug("Making large vault at "..minetest.pos_to_string(p))
else
--dm_debug("Making vault at "..minetest.pos_to_string(p))
end
-- Find door in definition
local def_door_p = nil
for dx=1,dim_x do
for dz=1,dim_z do
if vault_def[dim_z+1-dz][dx] == 'd' then
def_door_p = {x=dx,y=0,z=dz}
end
if def_door_p then break end
end
if def_door_p then break end
end
--print("Vault door found at "..minetest.pos_to_string(def_door_p).." in definition")
assert(def_door_p)
local randseed = seed
for dx=1,dim_x do
for dz=1,dim_z do
local p2 = vault.add(vault.sub(p, def_door_p), {x=dx, y=0, z=dz})
local part = vault_def[dim_z+1-dz][dx]
--dm_debug("Making vault part "..dump(part).." at "..minetest.pos_to_string(p2))
vault.make_vault_part(p2, part, randseed)
randseed = randseed + 1
end
end
end
-- Definition is for Z=up, X=right, dir={x=0,y=0,z=1}
vault.vault_defs = {
---[[
{
{'w','w','w','w','w','w','w','w','w','w'},
{'w','c','c','c','c','c','C','C','c','w'},
{'w','c','C','c','c','c','C','C','m','w'},
{'w','C','C','C','w','w','C','C','c','w'},
{'w','C','C','C','w','w','C','C','c','w'},
{'w','T','C','c','w','w','C','w','w','w'},
{'w','c','t','c','w','w','C','w','n','n'},
{'w','w','w','w','w','w','C','w','n','n'},
{'n','n','n','n','n','w','d','w','n','n'},
{'n','n','n','n','n','n','A','n','n','n'},
},
--]]
---[[
{
{'w','w','w','w','w','w','w','w'},
{'w','c','c','c','m','C','c','w'},
{'w','C','c','c','C','C','c','w'},
{'w','C','w','w','C','C','c','w'},
{'w','C','t','w','C','C','c','w'},
{'w','C','t','w','C','w','d','w'},
{'w','T','w','w','C','w','A','n'},
{'w','c','C','C','C','w','n','n'},
{'n','n','n','w','w','w','n','n'},
},
--]]
---[[
{
{'W','W','W','W','W','W','W','W','W','W','W','W','W','W','W','W'},
{'W','l','l','l','l','l','l','t','t','l','l','l','l','l','l','W'},
{'W','l','l','l','l','l','l','f','f','l','l','l','l','l','l','W'},
{'W','l','l','l','l','l','l','f','f','l','l','l','l','l','l','W'},
{'W','m','l','l','l','l','l','f','f','l','l','l','l','l','m','W'},
{'W','c','l','l','l','l','l','f','f','l','l','l','l','l','c','W'},
{'W','c','l','l','l','l','l','f','f','l','l','l','l','l','c','W'},
{'W','c','l','l','l','l','l','f','f','l','l','l','l','l','c','W'},
{'W','m','l','l','l','l','l','f','f','l','l','l','l','l','m','W'},
{'W','l','l','l','l','l','l','f','f','l','l','l','l','l','l','W'},
{'W','l','l','l','l','l','l','f','f','l','l','l','l','l','l','W'},
{'W','l','l','l','l','l','l','f','f','l','l','l','l','l','l','W'},
{'W','W','W','W','W','W','W','W','d','W','W','W','W','W','W','W'},
{'n','n','n','n','n','n','n','n','A','n','n','n','n','n','n','n'},
},
--]]
---[[
{
{'W','W','W','W','W','W','W','W','W','W','W','W','W','W','W','W'},
{'W','f','f','f','f','l','l','t','l','l','l','l','l','l','l','W'},
{'W','f','l','l','l','l','l','f','l','l','l','l','l','l','l','W'},
{'W','f','l','l','f','l','l','l','l','l','l','l','l','l','l','W'},
{'W','f','l','l','l','l','l','l','f','l','f','f','l','l','m','W'},
{'W','f','l','l','l','l','f','l','l','l','l','l','f','l','c','W'},
{'W','f','f','l','l','l','l','l','l','l','l','l','f','l','c','W'},
{'W','c','f','l','l','l','l','l','l','l','l','l','f','l','c','W'},
{'W','m','f','l','l','l','l','l','l','l','l','l','f','l','m','W'},
{'W','l','f','l','l','l','l','f','f','l','f','f','f','l','l','W'},
{'W','l','t','l','l','l','l','f','f','l','l','l','l','l','l','W'},
{'W','l','l','l','l','l','l','f','f','l','l','l','l','l','l','W'},
{'W','W','W','W','W','W','W','W','d','W','W','W','W','W','W','W'},
{'n','n','n','n','n','n','n','n','A','n','n','n','n','n','n','n'},
},
--]]
---[[
{
{'n','n','n','n','n','n','n','n','n','n','n','n','w','w','w','w','n','n','n','n'},
{'n','n','n','n','n','n','n','n','w','w','w','w','w','c','c','w','w','w','w','n'},
{'n','n','n','n','n','n','n','w','w','c','c','c','c','c','c','c','c','w','w','n'},
{'n','n','n','n','n','n','w','w','c','c','c','c','c','c','c','c','c','c','W','W'},
{'n','n','n','n','n','n','w','t','c','C','C','m','c','c','C','C','m','c','c','W'},
{'n','n','n','n','n','n','w','t','c','C','C','c','c','c','C','C','c','c','c','W'},
{'n','n','n','n','n','n','w','w','c','c','c','c','c','c','c','c','c','c','c','W'},
{'n','n','n','n','n','n','n','w','w','c','c','c','C','C','C','C','C','C','C','W'},
{'n','n','n','n','n','n','n','n','w','w','c','c','l','l','l','l','l','l','l','W'},
{'n','n','n','n','n','n','n','n','W','W','l','l','l','l','l','l','l','l','l','W'},
{'w','w','w','w','W','W','W','W','W','l','l','l','l','l','l','l','l','l','l','W'},
{'w','w','c','c','C','S','S','C','C','l','l','l','l','l','l','l','l','l','l','W'},
{'w','c','c','c','C','C','C','C','l','l','l','l','l','l','l','l','l','l','l','W'},
{'w','c','c','C','C','C','C','C','l','l','l','l','m','C','l','l','l','l','l','W'},
{'w','c','c','C','C','C','C','C','l','l','l','l','C','t','l','l','l','l','l','W'},
{'w','c','c','C','C','l','l','l','l','l','l','l','l','l','l','l','l','l','l','W'},
{'w','c','C','C','l','l','l','l','l','l','l','l','l','l','l','l','l','l','l','W'},
{'w','W','C','C','l','l','l','l','l','l','l','l','l','l','l','l','l','l','W','W'},
{'n','W','d','W','W','W','W','W','W','W','W','W','W','W','W','W','W','W','W','n'},
{'n','n','A','n','n','n','n','n','n','n','n','n','n','n','n','n','n','n','n','n'},
},
--]]
}
function vault.node_is_solid(n)
return (n and n.name and minetest.registered_nodes[n.name] and
minetest.registered_nodes[n.name].walkable)
end
vault.generate_random_vault = function(p, dir, seed)
--random select of vault template
local pr = PseudoRandom(seed+9322)
local vault_def = vault.vault_defs[pr:next(1, #vault.vault_defs)]
--generate vault by template
vault.generate_vault(vault_def, p, dir, seed)
end
minetest.register_on_generated(function(minp, maxp, seed)
--abort in case of above sea level
if minp.y > 3 then
return
end
--calculate area of generated chunk
local area = (maxp.x-minp.x+1)*(maxp.z-minp.z+1)
--initialize dungeon level with 2
local dungeon_level_y = 2
--get random dungeon level within generated chunk
if maxp.y < 2 then
local pr = PseudoRandom(seed+932)
dungeon_level_y = pr:next(minp.y, maxp.y)
end
--initialize check values
local is_empty = false
local light = nil
local last_empty = false
local last_light = nil
local possible_entrances = {}
local d = 4
--loop through chunk using d frames in x direction
for x=minp.x/d+1,maxp.x/d-1 do
--set to unknown on start of x-loop (why?)
local last_node_known = false
--loop through cunk in z direction
for z=minp.z+1,maxp.z-1 do
--get information of current node to check
local p = {x=x*d, y=dungeon_level_y, z=z}
local n = minetest.env:get_node(p)
--save values from last loop
last_empty = is_empty
last_light = light
--get new values
is_empty = not vault.node_is_solid(n)
light = minetest.env:get_node_light(p, 0.5)
--if last node was known
if last_node_known then
--initialize values
local useful_light = nil
--save values
if is_empty then
useful_light = light
else
useful_light = last_light
end
--if current node isn't solid,
--last was solid and we're not at daylight
if is_empty and not last_empty and useful_light < 15 then
--calculate ??? positions next to current pos
local p1 = vault.add(p, {x=0, y=0, z=-1})
local p2 = vault.add(p1, {x=0, y=2, z=-1})
local p3 = vault.add(p1, {x=0, y=2, z=-8})
local p4 = vault.add(p1, {x=-3, y=1, z=-2})
local p5 = vault.add(p1, {x=3, y=1, z=-2})
--if all nodes are solid
if vault.node_is_solid(minetest.env:get_node(p2)) and
vault.node_is_solid(minetest.env:get_node(p3)) and
vault.node_is_solid(minetest.env:get_node(p4)) and
vault.node_is_solid(minetest.env:get_node(p5))
then
local entrance = {
p = p1,
dir = {x=0, y=0, z=-1},
}
--add to entrance table with direction z = -1
table.insert(possible_entrances, entrance)
end
end
--if current node isn't solid,
--last was solid and we're not at daylight
if last_empty and not is_empty and useful_light < 15 then
local p1 = vault.add(p, {x=0, y=0, z=0})
local p2 = vault.add(p1, {x=0, y=2, z=1})
local p3 = vault.add(p1, {x=0, y=2, z=8})
local p4 = vault.add(p1, {x=-3, y=1, z=2})
local p5 = vault.add(p1, {x=3, y=1, z=2})
--if all nodes are solid
if vault.node_is_solid(minetest.env:get_node(p2)) and
vault.node_is_solid(minetest.env:get_node(p3)) and
vault.node_is_solid(minetest.env:get_node(p4)) and
vault.node_is_solid(minetest.env:get_node(p5))
then
local entrance = {
p = p1,
dir = {x=0, y=0, z=1},
}
--add to entrance table with direction z = 1
table.insert(possible_entrances, entrance)
end
end
end
last_node_known = true
end
end
--for _,entrance in ipairs(possible_entrances) do
-- dm_debug("Possible entrance: "..dump(entrance))
--end
--calculate number of entrances to generate per area
local num_entrances_to_generate = area/200
--check if there are enough possible entrances
if num_entrances_to_generate > #possible_entrances then
num_entrances_to_generate = #possible_entrances
end
local pr = PseudoRandom(seed+9452)
--generate vault for max number of entraces to generate at random
--selected possible entrances
for entrances_generate_i=1,num_entrances_to_generate do
local entrance_i = pr:next(1, #possible_entrances)
local entrance = possible_entrances[entrance_i]
--dm_debug("Entrance: "..dump(entrance))
vault.generate_random_vault(entrance.p, entrance.dir, seed)
end
end)

View File

@ -0,0 +1,3 @@
default
animalmaterials
mobf

View File

@ -0,0 +1,64 @@
local version = "0.0.6"
local selectionbox_fish_blue_white = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
local modpath = minetest.get_modpath("animal_fish_blue_white")
--include debug trace functions
dofile (modpath .. "/model.lua")
fish_blue_white_prototype = {
name="fish_blue_white",
modname="animal_fish_blue_white",
generic = {
description="Blue white fish",
base_health=5,
kill_result="",
armor_groups= {
fleshy=3,
},
envid="shallow_waters",
},
movement = {
default_gen="probab_mov_gen",
min_accel=0.1,
max_accel=0.3,
max_speed=1.1,
pattern="swim_pattern1",
canfly=true,
},
harvest = nil,
catching = {
tool="animalmaterials:net",
consumed=true,
},
random_drop = nil,
auto_transform = nil,
graphics_3d = {
visual = "wielditem",
textures = {"animal_fish_blue_white:box_fish_blue_white"},
collisionbox = selectionbox_fish_blue_white,
visual_size= {x=0.666,y=0.666,z=0.666},
},
graphics = {
sprite_scale={x=2,y=1},
sprite_div = {x=1,y=1},
visible_height = 1,
visible_width = 1,
},
combat = nil,
spawning = {
rate=0.02,
density=150,
algorithm="in_shallow_water",
height=-1
},
}
--register with animals mod
print ("Adding animal "..fish_blue_white_prototype.name)
animals_add_animal(fish_blue_white_prototype)
print ("animal_fish_blue_white mod version " .. version .. " loaded")

View File

@ -0,0 +1,57 @@
function x(val)
return ((val -80) / 160)
end
function z(val)
return ((val -80) / 160)
end
function y(val)
return ((val + 80) / 160)
end
local textures_fish_blue_white = {
"animal_fish_blue_white_bottom.png",
"animal_fish_blue_white_top.png",
"animal_fish_blue_white_front.png",
"animal_fish_blue_white_back.png",
"animal_fish_blue_white_right.png",
"animal_fish_blue_white_left.png",
}
local nodebox_fish_blue_white = {
--head
{ x(120), y(-70), z(85), x(130), y(-80), z(75)},
{ x(110), y(-60), z(85), x(120), y(-90), z(75)},
--body
{ x(35), y(-50), z(90), x(110), y(-100), z(70)},
--fins
--left
{ x(90), y(-95), z(70), x(100), y(-110),z(65)},
{ x(85), y(-95), z(70), x(90), y(-105),z(65)},
--right
{ x(90), y(-95), z(95), x(100), y(-110),z(90)},
{ x(85), y(-95), z(95), x(90), y(-105),z(90)},
--backfin
{ x(30), y(-55), z(85), x(35), y(-95),z(75)},
{ x(25), y(-60), z(85), x(30), y(-90),z(75)},
{ x(15), y(-55), z(85), x(25), y(-95),z(75)},
{ x(10), y(-50), z(85), x(15), y(-100),z(75)},
{ x(0), y(-50), z(85), x(10), y(-65),z(75)},
{ x(0), y(-85), z(85), x(10), y(-100),z(75)},
}
minetest.register_node("animal_fish_blue_white:box_fish_blue_white", {
tiles = textures_fish_blue_white,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = nodebox_fish_blue_white
},
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

3
animal_gull/depends.txt Normal file
View File

@ -0,0 +1,3 @@
default
animalmaterials
mobf

64
animal_gull/init.lua Normal file
View File

@ -0,0 +1,64 @@
local version = "0.0.7"
local gull_groups = {
not_in_creative_inventory=1
}
local selectionbox_gull = {-1, -0.3, -1, 1, 0.3, 1}
local modpath = minetest.get_modpath("animal_gull")
dofile (modpath .. "/model.lua")
gull_prototype = {
name="gull",
modname="animal_gull",
generic = {
description="Gull",
base_health=5,
kill_result="",
armor_groups= {
fleshy=3,
},
envid="flight_1",
},
movement = {
default_gen="probab_mov_gen",
min_accel=0.5,
max_accel=1,
max_speed=4,
pattern="flight_pattern1",
canfly=true,
},
harvest = nil,
catching = nil,
random_drop = nil,
auto_transform = nil,
graphics_3d = {
visual = "wielditem",
textures = {"animal_gull:box_gull"},
collisionbox = selectionbox_gull,
visual_size= {x=2,y=2,z=2},
},
graphics = {
sprite_scale={x=2,y=2},
sprite_div = {x=6,y=1},
visible_height = 1,
visible_width = 1,
},
combat = nil,
spawning = {
rate=0.02,
density=500,
algorithm="in_air1",
height=-1
},
}
--register with animals mod
print ("Adding animal "..gull_prototype.name)
animals_add_animal(gull_prototype)
print ("animal_gull mod version " .. version .. " loaded")

70
animal_gull/model.lua Normal file
View File

@ -0,0 +1,70 @@
function x(val)
return ((val -80) / 160)
end
function z(val)
return ((val -80) / 160)
end
function y(val)
return ((val + 80) / 160)
end
local textures_gull = {
"animal_gull_gull_bottom.png",
"animal_gull_gull_top.png",
"animal_gull_gull_front.png",
"animal_gull_gull_back.png",
"animal_gull_gull_left.png",
"animal_gull_gull_right.png",
}
local nodebox_gull ={
--left wing
{x(75),y(-75),z(30),x(80),y(-77),z(25)},
{x(77),y(-75),z(35),x(85),y(-77),z(30)},
{x(80),y(-75),z(40),x(90),y(-77),z(35)},
{x(80),y(-75),z(45),x(95),y(-77),z(40)},
{x(83),y(-75),z(55),x(100),y(-77),z(45)},
{x(80),y(-75),z(60),x(97),y(-77),z(55)},
{x(80),y(-75),z(73),x(95),y(-77),z(60)},
--right wing
{x(80),y(-75),z(100),x(95),y(-77),z(87)},
{x(80),y(-75),z(105),x(97),y(-77),z(100)},
{x(83),y(-75),z(115),x(100),y(-77),z(105)},
{x(80),y(-75),z(120),x(95),y(-77),z(115)},
{x(80),y(-75),z(125),x(90),y(-77),z(120)},
{x(77),y(-75),z(130),x(85),y(-77),z(125)},
{x(75),y(-75),z(135),x(80),y(-77),z(130)},
--tail
{x(65),y(-77),z(85),x(70),y(-85),z(75)},
{x(60),y(-77),z(87),x(65),y(-81),z(73)},
{x(55),y(-78),z(90),x(60),y(-81),z(70)},
{x(50),y(-78),z(93),x(55),y(-80),z(67)},
{x(47),y(-78),z(90),x(50),y(-80),z(70)},
{x(45),y(-78),z(83),x(47),y(-80),z(77)},
--head
{x(100),y(-75),z(85),x(105),y(-85),z(75)},
{x(105),y(-75),z(83),x(110),y(-80),z(77)},
{x(110),y(-77),z(81),x(114),y(-79),z(79)},
--body
{x(70),y(-75),z(87),x(100),y(-85),z(73)},
}
minetest.register_node("animal_gull:box_gull", {
tiles = textures_gull,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = nodebox_gull
},
groups = gull_groups
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

3
animal_rat/depends.txt Normal file
View File

@ -0,0 +1,3 @@
default
animalmaterials
mobf

64
animal_rat/init.lua Normal file
View File

@ -0,0 +1,64 @@
local version = "0.0.6"
local selectionbox_rat = {-0.35, -0.0625, -0.0625, 0.35, 0.125, 0.0625}
local modpath = minetest.get_modpath("animal_rat")
--include debug trace functions
dofile (modpath .. "/model.lua")
rat_prototype = {
name="rat",
modname="animal_rat",
generic = {
description="Rat (Animals)",
base_health=2,
kill_result="",
armor_groups= {
fleshy=3,
},
envid="on_ground_1",
},
movement = {
default_gen="probab_mov_gen",
min_accel=0.4,
max_accel=0.6,
max_speed=2,
pattern="run_and_jump_low",
canfly=false,
},
harvest = nil,
catching = {
tool="animalmaterials:net",
consumed=true,
},
random_drop = nil,
auto_transform = nil,
graphics_3d = {
visual = "wielditem",
textures = {"animal_rat:box_rat"},
collisionbox = selectionbox_rat,
visual_size= {x=0.666,y=0.666,z=0.666},
},
graphics = {
sprite_scale={x=1,y=1},
sprite_div = {x=6,y=1},
visible_height = 1,
visible_width = 1,
},
combat = nil,
spawning = {
rate=0.02,
density=250,
algorithm="forrest_mapgen",
height=1
},
}
--register with animals mod
print ("Adding animal "..rat_prototype.name)
animals_add_animal(rat_prototype)
print ("animal_rat mod version " .. version .. " loaded")

55
animal_rat/model.lua Normal file
View File

@ -0,0 +1,55 @@
function x(val)
return ((val -80) / 160)
end
function z(val)
return ((val -80) / 160)
end
function y(val)
return ((val + 80) / 160)
end
local textures_rat = {
"animal_rat_bottom.png",
"animal_rat_top.png",
"animal_rat_front.png",
"animal_rat_back.png",
"animal_rat_right.png",
"animal_rat_left.png",
}
local nodebox_rat = {
--head
{x(120), y(-70), z(85), x(130), y(-80), z(75) },
--body
{x(60), y(-65), z(90), x(120), y(-80),z(70)},
--tail
{x(30), y(-77.5), z(81.25), x(60), y(-80), z(78.75)},
--legs
--vr
{ x(110), y(-80), z(87.5), x(115), y(-90), z(85)},
--vl
{ x(110), y(-80), z(75), x(115), y(-90), z(72.5)},
--hr
{ x(65), y(-80), z(87.5), x(70), y(-90), z(85)},
--hl
{ x(65), y(-80), z(75), x(70), y(-90), z(72.5)},
}
minetest.register_node("animal_rat:box_rat", {
tiles = textures_rat,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = nodebox_rat
},
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Some files were not shown because too many files have changed in this diff Show More