1 --this is where mobs are defined
3 --this is going to be used to set an active mob limit
7 local path = minetest.get_modpath(minetest.get_current_modname())
9 dofile(path.."/spawning.lua")
10 dofile(path.."/api/api_hook.lua")
11 dofile(path.."/items.lua")
12 dofile(path.."/chatcommands.lua")
19 collide_with_objects = false,
20 collisionbox = {-0.37, 0, -0.37, 0.37, 0.5, 0.37},
22 visual_size = {x = 3, y = 3},
25 --blank out the first two to create adult pig
29 --these are used to anchor a point to the head position
30 debug_head_pos = true,
31 head_directional_offset = 0.5, --used in vector.multiply(minetest.yaw_to_dir(body_yaw),head_offset)
32 head_height_offset = 0.8, --added to the base y position
33 head_rotation_offset = math.pi,
34 --use this to correct the head position initially because it becomes severly offset - look at your blender model to get this perfect
35 head_position_correction = vector.new(0,3,-0.5),
40 automatic_face_movement_dir = 90,
41 automatic_face_movement_max_rotation_per_sec = 300,
42 makes_footstep_sound = false,
44 gravity = {x = 0, y = -9.81, z = 0},
45 movement_type = "walk",
51 item_drop = "mob:raw_porkchop",
52 standing_frame = {x=0,y=0},
53 moving_frame = {x=0,y=40},
54 animation_multiplier = 20,
60 die_sound = "pig_die",
62 attack_type = "punch",
63 --explosion_radius = 4, -- how far away the mob has to be to initialize the explosion
64 --explosion_power = 7, -- how big the explosion has to be
65 --explosion_time = 3, -- how long it takes for a mob to explode
76 collide_with_objects = false,
77 collisionbox = {-0.37, -0.4, -0.37, 0.37, 0.5, 0.37},
79 visual_size = {x = 3, y = 3},
82 --if you're wondering what mob this is, it's a chicken
83 "chicken.png","chicken.png","chicken.png","chicken.png","chicken.png","chicken.png","chicken.png","chicken.png","chicken.png","chicken.png","chicken.png","chicken.png","chicken.png","chicken.png"
87 automatic_face_movement_dir = -90.0,
88 automatic_face_movement_max_rotation_per_sec = 300,
89 makes_footstep_sound = false,
91 gravity = {x = 0, y = -9.81, z = 0},
92 movement_type = "walk",
98 item_drop = "mob:raw_porkchop",
99 standing_frame = {x=0,y=0},
100 moving_frame = {x=5,y=15},
101 animation_multiplier = 5,
104 has_head = true, --remove this when mesh based head rotation is implemented
105 head_visual = "mesh",
106 head_visual_size = {x = 1.1, y = 1.1},
107 head_mesh = "pig_head.x",
108 head_textures ={"head.png","nose.png"},
109 head_mount = vector.new(0,1.2,1.9),
111 death_rotation = "z",
114 die_sound = "pig_die",
116 attack_type = "punch",
117 --explosion_radius = 4, -- how far away the mob has to be to initialize the explosion
118 --explosion_power = 7, -- how big the explosion has to be
119 --explosion_time = 3, -- how long it takes for a mob to explode
128 collide_with_objects = false,
129 collisionbox = {-0.37, -0.4, -0.37, 0.37, 0.5, 0.37},
131 visual_size = {x = 3, y = 3},
134 "slimecore.png","slimeeye.png","slimeeye.png","slimeeye.png","slimeoutside.png"
138 automatic_face_movement_dir = 180,
139 automatic_face_movement_max_rotation_per_sec = 300,
140 makes_footstep_sound = false,
142 gravity = {x = 0, y = -9.81, z = 0},
143 movement_type = "jump",
148 item_drop = "mob:slimeball",
150 standing_frame = {x=0,y=0},
151 moving_frame = {x=0,y=0},
152 animation_multiplier = 5,
154 has_head = false, --remove this when mesh based head rotation is implemented
156 death_rotation = "x",
158 hurt_sound = "slime_die",
159 die_sound = "slime_die",
161 attack_type = "punch",
163 die_in_light_level = 12,
170 mobname = "flying_pig",
172 collide_with_objects = false,
173 collisionbox = {-0.37, -0.4, -0.37, 0.37, 0.5, 0.37},
175 visual_size = {x = 3, y = 3},
178 "flying_pig_body.png","flying_pig_leg.png","flying_pig_leg.png","flying_pig_leg.png","flying_pig_leg.png"
182 automatic_face_movement_dir = -90.0,
183 automatic_face_movement_max_rotation_per_sec = 300,
184 makes_footstep_sound = false,
186 gravity = {x = 0, y = -1, z = 0},
187 movement_type = "jump",
192 item_drop = "main:gold",
196 standing_frame = {x=0,y=0},
197 moving_frame = {x=5,y=15},
198 animation_multiplier = 5,
201 has_head = true, --remove this when mesh based head rotation is implemented
202 head_visual = "mesh",
203 head_visual_size = {x = 1.1, y = 1.1},
204 head_mesh = "pig_head.x",
205 head_textures ={"flying_pig_head.png","flying_pig_nose.png"},
206 head_mount = vector.new(0,1.2,1.9),
208 death_rotation = "z",
211 die_sound = "pig_die",
213 attack_type = "projectile",
214 projectile_timer_cooldown = 5,
215 projectile_type = "tnt:tnt",
217 --explosion_radius = 4, -- how far away the mob has to be to initialize the explosion
218 --explosion_power = 7, -- how big the explosion has to be
219 --explosion_time = 3, -- how long it takes for a mob to explode
229 collide_with_objects = false,
230 collisionbox = {-0.37, -0.4, -0.37, 0.37, 0.5, 0.37},
232 visual_size = {x = 3, y = 3},
235 "creepig_body.png","creepig_leg.png","creepig_leg.png","creepig_leg.png","creepig_leg.png"
239 automatic_face_movement_dir = -90.0,
240 automatic_face_movement_max_rotation_per_sec = 300,
241 makes_footstep_sound = false,
243 gravity = {x = 0, y = -9.81, z = 0},
244 movement_type = "walk",
249 item_drop = "mob:cooked_porkchop",
251 standing_frame = {x=0,y=0},
252 moving_frame = {x=5,y=15},
253 animation_multiplier = 5,
256 has_head = true, --remove this when mesh based head rotation is implemented
257 head_visual = "mesh",
258 head_visual_size = {x = 1.1, y = 1.1},
259 head_mesh = "pig_head.x",
260 head_textures ={"creepig_head.png","creepig_nose.png"},
261 head_mount = vector.new(0,1.2,1.9),
263 death_rotation = "z",
266 die_sound = "pig_die",
268 attack_type = "explode",
269 --projectile_timer_cooldown = 5,
270 --projectile_type = "tnt:tnt",
272 explosion_radius = 2, -- how far away the mob has to be to initialize the explosion
273 explosion_power = 7, -- how big the explosion has to be
274 explosion_time = 5, -- how long it takes for a mob to explode
277 die_in_light_level = 12,
285 mobname = "exploder",
287 collide_with_objects = false,
288 collisionbox = {-0.37, -0.4, -0.37, 0.37, 0.5, 0.37},
290 visual_size = {x = 3, y = 3},
291 mesh = "exploder.b3d",
293 "creepig_body.png","creepig_leg.png","creepig_leg.png","creepig_leg.png","creepig_leg.png"
297 automatic_face_movement_dir = 0,
298 automatic_face_movement_max_rotation_per_sec = 300,
299 makes_footstep_sound = false,
301 gravity = {x = 0, y = -9.81, z = 0},
302 movement_type = "walk",
307 item_drop = "mob:cooked_porkchop",
309 standing_frame = {x=5,y=5},
310 moving_frame = {x=0,y=20},
311 animation_multiplier = 10,
314 has_head = false, --remove this when mesh based head rotation is implemented
315 --head_visual = "mesh",
316 --head_visual_size = {x = 1, y = 1},
317 --head_mesh = "pig_head.x",
318 --head_textures ={"creepig_head.png","creepig_nose.png"},
319 --head_mount = vector.new(0,1.2,1.9),
321 death_rotation = "x",
324 die_sound = "pig_die",
326 attack_type = "explode",
327 --projectile_timer_cooldown = 5,
328 --projectile_type = "tnt:tnt",
330 explosion_radius = 2, -- how far away the mob has to be to initialize the explosion
331 explosion_power = 7, -- how big the explosion has to be
332 explosion_time = 5, -- how long it takes for a mob to explode
334 die_in_light = false,
335 --die_in_light_level = 12,