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
32 debug_head_pos = false,
33 head_directional_offset = 0.5, --used in vector.multiply(minetest.yaw_to_dir(body_yaw),head_offset)
34 head_height_offset = 0.8, --added to the base y position
35 head_rotation_offset = math.pi,
36 --use this to correct the head position initially because it becomes severly offset - look at your blender model to get this perfect
37 head_position_correction = vector.new(0,3,-0.5),
42 automatic_face_movement_dir = 90,
43 automatic_face_movement_max_rotation_per_sec = 300,
44 makes_footstep_sound = false,
46 gravity = {x = 0, y = -9.81, z = 0},
47 movement_type = "walk",
52 item_drop = "mob:raw_porkchop",
53 standing_frame = {x=0,y=0},
54 moving_frame = {x=0,y=40},
55 animation_multiplier = 20,
61 die_sound = "pig_die",
65 attacked_hostile = true,
66 attack_type = "punch",
68 --explosion_radius = 4, -- how far away the mob has to be to initialize the explosion
69 --explosion_power = 7, -- how big the explosion has to be
70 --explosion_time = 3, -- how long it takes for a mob to explode
81 collide_with_objects = false,
82 collisionbox = {-0.37, -0.4, -0.37, 0.37, 0.5, 0.37},
84 visual_size = {x = 3, y = 3},
87 --if you're wondering what mob this is, it's a chicken
88 "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"
92 automatic_face_movement_dir = -90.0,
93 automatic_face_movement_max_rotation_per_sec = 300,
94 makes_footstep_sound = false,
96 gravity = {x = 0, y = -9.81, z = 0},
97 movement_type = "walk",
103 item_drop = "mob:raw_porkchop",
104 standing_frame = {x=0,y=0},
105 moving_frame = {x=5,y=15},
106 animation_multiplier = 5,
109 has_head = true, --remove this when mesh based head rotation is implemented
110 head_visual = "mesh",
111 head_visual_size = {x = 1.1, y = 1.1},
112 head_mesh = "pig_head.x",
113 head_textures ={"head.png","nose.png"},
114 head_mount = vector.new(0,1.2,1.9),
116 death_rotation = "z",
119 die_sound = "pig_die",
121 attack_type = "punch",
122 --explosion_radius = 4, -- how far away the mob has to be to initialize the explosion
123 --explosion_power = 7, -- how big the explosion has to be
124 --explosion_time = 3, -- how long it takes for a mob to explode
133 collide_with_objects = false,
134 collisionbox = {-0.37, -0.4, -0.37, 0.37, 0.5, 0.37},
136 visual_size = {x = 3, y = 3},
139 "slimecore.png","slimeeye.png","slimeeye.png","slimeeye.png","slimeoutside.png"
143 automatic_face_movement_dir = 180,
144 automatic_face_movement_max_rotation_per_sec = 300,
145 makes_footstep_sound = false,
147 gravity = {x = 0, y = -9.81, z = 0},
148 movement_type = "jump",
153 item_drop = "mob:slimeball",
155 standing_frame = {x=0,y=0},
156 moving_frame = {x=0,y=0},
157 animation_multiplier = 5,
159 has_head = false, --remove this when mesh based head rotation is implemented
161 death_rotation = "x",
163 hurt_sound = "slime_die",
164 die_sound = "slime_die",
166 attack_type = "punch",
168 die_in_light_level = 12,
175 mobname = "flying_pig",
177 collide_with_objects = false,
178 collisionbox = {-0.37, -0.4, -0.37, 0.37, 0.5, 0.37},
180 visual_size = {x = 3, y = 3},
183 "flying_pig_body.png","flying_pig_leg.png","flying_pig_leg.png","flying_pig_leg.png","flying_pig_leg.png"
187 automatic_face_movement_dir = -90.0,
188 automatic_face_movement_max_rotation_per_sec = 300,
189 makes_footstep_sound = false,
191 gravity = {x = 0, y = -1, z = 0},
192 movement_type = "jump",
197 item_drop = "main:gold",
201 standing_frame = {x=0,y=0},
202 moving_frame = {x=5,y=15},
203 animation_multiplier = 5,
206 has_head = true, --remove this when mesh based head rotation is implemented
207 head_visual = "mesh",
208 head_visual_size = {x = 1.1, y = 1.1},
209 head_mesh = "pig_head.x",
210 head_textures ={"flying_pig_head.png","flying_pig_nose.png"},
211 head_mount = vector.new(0,1.2,1.9),
213 death_rotation = "z",
216 die_sound = "pig_die",
218 attack_type = "projectile",
219 projectile_timer_cooldown = 5,
220 projectile_type = "tnt:tnt",
222 --explosion_radius = 4, -- how far away the mob has to be to initialize the explosion
223 --explosion_power = 7, -- how big the explosion has to be
224 --explosion_time = 3, -- how long it takes for a mob to explode
234 collide_with_objects = false,
235 collisionbox = {-0.37, -0.4, -0.37, 0.37, 0.5, 0.37},
237 visual_size = {x = 3, y = 3},
240 "creepig_body.png","creepig_leg.png","creepig_leg.png","creepig_leg.png","creepig_leg.png"
244 automatic_face_movement_dir = -90.0,
245 automatic_face_movement_max_rotation_per_sec = 300,
246 makes_footstep_sound = false,
248 gravity = {x = 0, y = -9.81, z = 0},
249 movement_type = "walk",
254 item_drop = "mob:cooked_porkchop",
256 standing_frame = {x=0,y=0},
257 moving_frame = {x=5,y=15},
258 animation_multiplier = 5,
261 has_head = true, --remove this when mesh based head rotation is implemented
262 head_visual = "mesh",
263 head_visual_size = {x = 1.1, y = 1.1},
264 head_mesh = "pig_head.x",
265 head_textures ={"creepig_head.png","creepig_nose.png"},
266 head_mount = vector.new(0,1.2,1.9),
268 death_rotation = "z",
271 die_sound = "pig_die",
273 attack_type = "explode",
274 --projectile_timer_cooldown = 5,
275 --projectile_type = "tnt:tnt",
277 explosion_radius = 2, -- how far away the mob has to be to initialize the explosion
278 explosion_power = 7, -- how big the explosion has to be
279 explosion_time = 5, -- how long it takes for a mob to explode
282 die_in_light_level = 12,
290 mobname = "exploder",
292 collide_with_objects = false,
293 collisionbox = {-0.37, -0.4, -0.37, 0.37, 0.5, 0.37},
295 visual_size = {x = 3, y = 3},
296 mesh = "exploder.b3d",
298 "creepig_body.png","creepig_leg.png","creepig_leg.png","creepig_leg.png","creepig_leg.png"
302 automatic_face_movement_dir = 0,
303 automatic_face_movement_max_rotation_per_sec = 300,
304 makes_footstep_sound = false,
306 gravity = {x = 0, y = -9.81, z = 0},
307 movement_type = "walk",
312 item_drop = "mob:cooked_porkchop",
314 standing_frame = {x=5,y=5},
315 moving_frame = {x=0,y=20},
316 animation_multiplier = 10,
319 has_head = false, --remove this when mesh based head rotation is implemented
320 --head_visual = "mesh",
321 --head_visual_size = {x = 1, y = 1},
322 --head_mesh = "pig_head.x",
323 --head_textures ={"creepig_head.png","creepig_nose.png"},
324 --head_mount = vector.new(0,1.2,1.9),
326 death_rotation = "x",
329 die_sound = "pig_die",
331 attack_type = "explode",
332 --projectile_timer_cooldown = 5,
333 --projectile_type = "tnt:tnt",
335 explosion_radius = 2, -- how far away the mob has to be to initialize the explosion
336 explosion_power = 7, -- how big the explosion has to be
337 explosion_time = 5, -- how long it takes for a mob to explode
339 die_in_light = false,
340 --die_in_light_level = 12,