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.85, 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
34 debug_head_pos = false,
35 head_directional_offset = 0.5, --used in vector.multiply(minetest.yaw_to_dir(body_yaw),head_offset)
36 head_height_offset = 0.8, --added to the base y position
37 --use this to correct the head position initially because it becomes severly offset - look at your blender model to get this perfect
38 head_position_correction = vector.new(0,3,-0.5),
39 --this is used to tell the game the orientation of the bone (swaps x to and y, then z and y)
40 head_coord = "horizontal",
45 automatic_face_movement_dir = 0,
46 automatic_face_movement_max_rotation_per_sec = 300,
47 makes_footstep_sound = false,
49 gravity = {x = 0, y = -9.81, z = 0},
50 movement_type = "walk",
55 item_drop = "mob:raw_porkchop",
56 standing_frame = {x=0,y=0},
57 moving_frame = {x=0,y=40},
58 animation_multiplier = 20,
64 die_sound = "pig_die",
68 attacked_hostile = false,
69 attack_type = "punch",
71 --explosion_radius = 4, -- how far away the mob has to be to initialize the explosion
72 --explosion_power = 7, -- how big the explosion has to be
73 --explosion_time = 3, -- how long it takes for a mob to explode
82 collide_with_objects = false,
83 collisionbox = {-0.37, 0, -0.37, 0.37, 1.75, 0.37},
85 visual_size = {x = 3, y = 3},
88 "snowman.png","snowman.png","snowman.png","snowman.png","snowman.png","snowman.png",
91 --these are used to anchor a point to the head position
96 debug_head_pos = false,
97 head_directional_offset = 0, --used in vector.multiply(minetest.yaw_to_dir(body_yaw),head_offset)
98 head_height_offset = 1.625, --added to the base y position
99 --use this to correct the head position initially because it becomes severly offset - look at your blender model to get this perfect
100 head_position_correction = vector.new(0,4.6,0),
101 --this is used to tell the game the orientation of the bone (swaps x to and y, then z and y)
102 head_coord = "vertical",
103 --rotational_correction = math.pi/2,
108 automatic_face_movement_dir = 0,
109 automatic_face_movement_max_rotation_per_sec = 300,
110 makes_footstep_sound = false,
112 gravity = {x = 0, y = -9.81, z = 0},
113 movement_type = "walk",
118 item_drop = "weather:snowball",
119 standing_frame = {x=0,y=0},
120 moving_frame = {x=0,y=0},
121 animation_multiplier = 10,
124 death_rotation = "x",
131 attack_type = "projectile",
132 projectile_type = "weather:snowball",
133 projectile_timer_cooldown = 1,
142 collide_with_objects = false,
143 collisionbox = {-0.37, 0, -0.37, 0.37, 0.85, 0.37},
145 visual_size = {x = 3, y = 3},
148 --blank out the first two to create adult pig
149 "phyg.png","wings.png"
152 --these are used to anchor a point to the head position
157 debug_head_pos = false,
158 head_directional_offset = 0.5, --used in vector.multiply(minetest.yaw_to_dir(body_yaw),head_offset)
159 head_height_offset = 0.8, --added to the base y position
160 --use this to correct the head position initially because it becomes severly offset - look at your blender model to get this perfect
161 head_position_correction = vector.new(0,3,-0.5),
162 --this is used to tell the game the orientation of the bone (swaps x to and y, then z and y)
163 head_coord = "horizontal",
168 automatic_face_movement_dir = 0,
169 automatic_face_movement_max_rotation_per_sec = 300,
170 makes_footstep_sound = false,
171 takes_fall_damage = false,
172 make_jump_noise = false,
174 gravity = {x = 0, y = -1, z = 0},
175 movement_type = "walk",
180 item_drop = "main:gold",
184 standing_frame = {x=0,y=0},
185 moving_frame = {x=0,y=40},
186 animation_multiplier = 20,
189 death_rotation = "x",
192 die_sound = "pig_die",
196 attacked_hostile = false,
197 attack_type = "punch",
199 --explosion_radius = 4, -- how far away the mob has to be to initialize the explosion
200 --explosion_power = 7, -- how big the explosion has to be
201 --explosion_time = 3, -- how long it takes for a mob to explode
211 collide_with_objects = false,
212 collisionbox = {-0.37, -0.4, -0.37, 0.37, 0.5, 0.37},
214 visual_size = {x = 3, y = 3},
215 mesh = "chicken.b3d",
217 --if you're wondering what mob this is, it's a chicken
218 "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"
222 automatic_face_movement_dir = -90.0,
223 automatic_face_movement_max_rotation_per_sec = 300,
224 makes_footstep_sound = false,
226 gravity = {x = 0, y = -9.81, z = 0},
227 movement_type = "walk",
233 item_drop = "mob:raw_porkchop",
234 standing_frame = {x=0,y=0},
235 moving_frame = {x=5,y=15},
236 animation_multiplier = 5,
239 has_head = true, --remove this when mesh based head rotation is implemented
240 head_visual = "mesh",
241 head_visual_size = {x = 1.1, y = 1.1},
242 head_mesh = "pig_head.x",
243 head_textures ={"head.png","nose.png"},
244 head_mount = vector.new(0,1.2,1.9),
246 death_rotation = "z",
249 die_sound = "pig_die",
251 attack_type = "punch",
252 --explosion_radius = 4, -- how far away the mob has to be to initialize the explosion
253 --explosion_power = 7, -- how big the explosion has to be
254 --explosion_time = 3, -- how long it takes for a mob to explode
261 mobname = "big_slime",
263 collide_with_objects = false,
264 collisionbox = {-1.25, 0, -1.25, 1.25, 2.5, 1.25},
266 visual_size = {x = 15, y = 15},
273 automatic_face_movement_dir = 90,
274 automatic_face_movement_max_rotation_per_sec = 300,
275 makes_footstep_sound = false,
277 gravity = {x = 0, y = -9.81, z = 0},
278 movement_type = "jump",
279 make_jump_noise = true,
284 death_rotation = "z",
285 hurt_sound = "slime_die",
286 die_sound = "slime_die",
287 attack_type = "punch",
288 custom_on_death = function(self)
289 local pos = self.object:get_pos()
291 minetest.add_entity(pos,"mob:medium_slime")
299 mobname = "medium_slime",
301 collide_with_objects = false,
302 collisionbox = {-0.625, 0, -0.625, 0.625, 1.25, 0.625},
304 visual_size = {x = 7.5, y = 7.5},
311 automatic_face_movement_dir = 90,
312 automatic_face_movement_max_rotation_per_sec = 300,
313 makes_footstep_sound = false,
315 gravity = {x = 0, y = -9.81, z = 0},
316 movement_type = "jump",
317 make_jump_noise = true,
322 death_rotation = "z",
323 hurt_sound = "slime_die",
324 die_sound = "slime_die",
325 attack_type = "punch",
326 custom_on_death = function(self)
327 local pos = self.object:get_pos()
330 minetest.add_entity(pos,"mob:small_slime")
338 mobname = "small_slime",
340 collide_with_objects = false,
341 collisionbox = {-0.3, 0, -0.3, 0.3, 0.6, 0.3},
343 visual_size = {x = 3.7, y = 3.7},
350 automatic_face_movement_dir = 90,
351 automatic_face_movement_max_rotation_per_sec = 300,
352 makes_footstep_sound = false,
354 gravity = {x = 0, y = -9.81, z = 0},
355 movement_type = "jump",
356 make_jump_noise = true,
361 death_rotation = "z",
362 hurt_sound = "slime_die",
363 die_sound = "slime_die",
364 attack_type = "punch",
365 item_drop = "mob:slimeball"
372 mobname = "flying_pig",
374 collide_with_objects = false,
375 collisionbox = {-0.37, -0.4, -0.37, 0.37, 0.5, 0.37},
377 visual_size = {x = 3, y = 3},
380 "flying_pig_body.png","flying_pig_leg.png","flying_pig_leg.png","flying_pig_leg.png","flying_pig_leg.png"
384 automatic_face_movement_dir = -90.0,
385 automatic_face_movement_max_rotation_per_sec = 300,
386 makes_footstep_sound = false,
388 gravity = {x = 0, y = -1, z = 0},
389 movement_type = "jump",
394 item_drop = "main:gold",
398 standing_frame = {x=0,y=0},
399 moving_frame = {x=5,y=15},
400 animation_multiplier = 5,
403 has_head = true, --remove this when mesh based head rotation is implemented
404 head_visual = "mesh",
405 head_visual_size = {x = 1.1, y = 1.1},
406 head_mesh = "pig_head.x",
407 head_textures ={"flying_pig_head.png","flying_pig_nose.png"},
408 head_mount = vector.new(0,1.2,1.9),
410 death_rotation = "z",
413 die_sound = "pig_die",
415 attack_type = "projectile",
416 projectile_timer_cooldown = 5,
417 projectile_type = "tnt:tnt",
419 --explosion_radius = 4, -- how far away the mob has to be to initialize the explosion
420 --explosion_power = 7, -- how big the explosion has to be
421 --explosion_time = 3, -- how long it takes for a mob to explode
431 collide_with_objects = false,
432 collisionbox = {-0.37, -0.4, -0.37, 0.37, 0.5, 0.37},
434 visual_size = {x = 3, y = 3},
437 "creepig_body.png","creepig_leg.png","creepig_leg.png","creepig_leg.png","creepig_leg.png"
441 automatic_face_movement_dir = -90.0,
442 automatic_face_movement_max_rotation_per_sec = 300,
443 makes_footstep_sound = false,
445 gravity = {x = 0, y = -9.81, z = 0},
446 movement_type = "walk",
451 item_drop = "mob:cooked_porkchop",
453 standing_frame = {x=0,y=0},
454 moving_frame = {x=5,y=15},
455 animation_multiplier = 5,
458 has_head = true, --remove this when mesh based head rotation is implemented
459 head_visual = "mesh",
460 head_visual_size = {x = 1.1, y = 1.1},
461 head_mesh = "pig_head.x",
462 head_textures ={"creepig_head.png","creepig_nose.png"},
463 head_mount = vector.new(0,1.2,1.9),
465 death_rotation = "z",
468 die_sound = "pig_die",
470 attack_type = "explode",
471 --projectile_timer_cooldown = 5,
472 --projectile_type = "tnt:tnt",
474 explosion_radius = 2, -- how far away the mob has to be to initialize the explosion
475 explosion_power = 7, -- how big the explosion has to be
476 explosion_time = 5, -- how long it takes for a mob to explode
479 die_in_light_level = 12,
489 collide_with_objects = false,
490 collisionbox = {-0.37,0, -0.37, 0.37, 1.5, 0.37},
492 visual_size = {x = 3.2, y = 3.2},
493 mesh = "creeper.b3d",
499 automatic_face_movement_max_rotation_per_sec = 300,
500 makes_footstep_sound = false,
502 gravity = {x = 0, y = -9.81, z = 0},
503 movement_type = "walk",
506 hostile_cooldown = false,
509 item_drop = "mob:gunpowder",
511 standing_frame = {x=0,y=0},
512 moving_frame = {x=0,y=40},
513 animation_multiplier = 20,
517 --these are used to anchor a point to the head position
519 automatic_face_movement_dir = 0,
521 debug_head_pos = false,
522 --this always has to be slightly positive
523 head_directional_offset = 0.01,
524 head_height_offset = 1.45, --added to the base y position
525 --use this to correct the head position initially because it becomes severly offset - look at your blender model to get this perfect
526 head_position_correction = vector.new(0,2.4,0),
527 head_coord = "vertical",
531 death_rotation = "x",
533 hurt_sound = "creeper_hurt",
534 die_sound = "creeper_hurt",
536 attack_type = "explode",
537 --projectile_timer_cooldown = 5,
538 --projectile_type = "tnt:tnt",
540 explosion_radius = 4, -- how far away the mob has to be to initialize the explosion
541 explosion_power = 4, -- how big the explosion has to be
542 explosion_time = 3, -- how long it takes for a mob to explode
544 die_in_light = false,
545 --die_in_light_level = 12,
553 mobname = "nitro_creeper",
555 collide_with_objects = false,
556 collisionbox = {-0.37,0, -0.37, 0.37, 1.5, 0.37},
558 visual_size = {x = 3.2, y = 3.2},
559 mesh = "creeper.b3d",
565 automatic_face_movement_max_rotation_per_sec = 300,
566 makes_footstep_sound = false,
568 gravity = {x = 0, y = -9.81, z = 0},
569 movement_type = "walk",
572 hostile_cooldown = false,
575 item_drop = "mob:gunpowder",
577 damage_color = "blue",
579 standing_frame = {x=0,y=0},
580 moving_frame = {x=0,y=40},
581 animation_multiplier = 20,
585 --these are used to anchor a point to the head position
587 automatic_face_movement_dir = 0,
589 debug_head_pos = false,
590 --this always has to be slightly positive
591 head_directional_offset = 0.01,
592 head_height_offset = 1.45, --added to the base y position
593 --use this to correct the head position initially because it becomes severly offset - look at your blender model to get this perfect
594 head_position_correction = vector.new(0,2.4,0),
595 head_coord = "vertical",
599 death_rotation = "x",
601 hurt_sound = "creeper_hurt",
602 die_sound = "creeper_hurt",
604 attack_type = "explode",
605 --projectile_timer_cooldown = 5,
606 --projectile_type = "tnt:tnt",
608 explosion_radius = 6, -- how far away the mob has to be to initialize the explosion
609 explosion_power = 14, -- how big the explosion is (radius)
610 explosion_time = 3, -- how long it takes for a mob to explode
611 explosion_blink_timer = 0.1, -- how fast the blinking happens
613 die_in_light = false,
614 --die_in_light_level = 12,
623 collide_with_objects = false,
624 collisionbox = {-0.37, 0, -0.37, 0.37, 0.85, 0.37},
626 visual_size = {x = 3, y = 3},
632 --these are used to anchor a point to the head position
636 head_bone = "body.head",
637 debug_head_pos = false,
638 rotational_correction = -math.pi/2,
639 head_directional_offset = 0.3, --used in vector.multiply(minetest.yaw_to_dir(body_yaw),head_offset)
640 head_height_offset = 0.63, --added to the base y position
641 --use this to correct the head position initially because it becomes severly offset - look at your blender model to get this perfect
642 head_position_correction = vector.new(0,1.24,0),
643 --this is used to tell the game the orientation of the bone (swaps x to and y, then z and y)
644 head_coord = "horizontal",
649 automatic_face_movement_dir = 90,
650 automatic_face_movement_max_rotation_per_sec = 300,
651 makes_footstep_sound = false,
653 gravity = {x = 0, y = -9.81, z = 0},
654 movement_type = "walk",
659 item_drop = "mob:string",
660 standing_frame = {x=21,y=21},
661 moving_frame = {x=0,y=20},
662 animation_multiplier = 20,
665 death_rotation = "z",
667 hurt_sound = "spider",
668 die_sound = "spider_die",
672 friendly_in_daylight = true,
673 attacked_hostile = true,
674 attack_type = "punch",
676 --explosion_radius = 4, -- how far away the mob has to be to initialize the explosion
677 --explosion_power = 7, -- how big the explosion has to be
678 --explosion_time = 3, -- how long it takes for a mob to explode