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
34 debug_head_pos = true,
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
84 collide_with_objects = false,
85 collisionbox = {-0.37, -0.4, -0.37, 0.37, 0.5, 0.37},
87 visual_size = {x = 3, y = 3},
90 --if you're wondering what mob this is, it's a chicken
91 "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"
95 automatic_face_movement_dir = -90.0,
96 automatic_face_movement_max_rotation_per_sec = 300,
97 makes_footstep_sound = false,
99 gravity = {x = 0, y = -9.81, z = 0},
100 movement_type = "walk",
106 item_drop = "mob:raw_porkchop",
107 standing_frame = {x=0,y=0},
108 moving_frame = {x=5,y=15},
109 animation_multiplier = 5,
112 has_head = true, --remove this when mesh based head rotation is implemented
113 head_visual = "mesh",
114 head_visual_size = {x = 1.1, y = 1.1},
115 head_mesh = "pig_head.x",
116 head_textures ={"head.png","nose.png"},
117 head_mount = vector.new(0,1.2,1.9),
119 death_rotation = "z",
122 die_sound = "pig_die",
124 attack_type = "punch",
125 --explosion_radius = 4, -- how far away the mob has to be to initialize the explosion
126 --explosion_power = 7, -- how big the explosion has to be
127 --explosion_time = 3, -- how long it takes for a mob to explode
136 collide_with_objects = false,
137 collisionbox = {-0.37, -0.4, -0.37, 0.37, 0.5, 0.37},
139 visual_size = {x = 3, y = 3},
142 "slimecore.png","slimeeye.png","slimeeye.png","slimeeye.png","slimeoutside.png"
146 automatic_face_movement_dir = 180,
147 automatic_face_movement_max_rotation_per_sec = 300,
148 makes_footstep_sound = false,
150 gravity = {x = 0, y = -9.81, z = 0},
151 movement_type = "jump",
156 item_drop = "mob:slimeball",
158 standing_frame = {x=0,y=0},
159 moving_frame = {x=0,y=0},
160 animation_multiplier = 5,
162 has_head = false, --remove this when mesh based head rotation is implemented
164 death_rotation = "x",
166 hurt_sound = "slime_die",
167 die_sound = "slime_die",
169 attack_type = "punch",
171 die_in_light_level = 12,
178 mobname = "flying_pig",
180 collide_with_objects = false,
181 collisionbox = {-0.37, -0.4, -0.37, 0.37, 0.5, 0.37},
183 visual_size = {x = 3, y = 3},
186 "flying_pig_body.png","flying_pig_leg.png","flying_pig_leg.png","flying_pig_leg.png","flying_pig_leg.png"
190 automatic_face_movement_dir = -90.0,
191 automatic_face_movement_max_rotation_per_sec = 300,
192 makes_footstep_sound = false,
194 gravity = {x = 0, y = -1, z = 0},
195 movement_type = "jump",
200 item_drop = "main:gold",
204 standing_frame = {x=0,y=0},
205 moving_frame = {x=5,y=15},
206 animation_multiplier = 5,
209 has_head = true, --remove this when mesh based head rotation is implemented
210 head_visual = "mesh",
211 head_visual_size = {x = 1.1, y = 1.1},
212 head_mesh = "pig_head.x",
213 head_textures ={"flying_pig_head.png","flying_pig_nose.png"},
214 head_mount = vector.new(0,1.2,1.9),
216 death_rotation = "z",
219 die_sound = "pig_die",
221 attack_type = "projectile",
222 projectile_timer_cooldown = 5,
223 projectile_type = "tnt:tnt",
225 --explosion_radius = 4, -- how far away the mob has to be to initialize the explosion
226 --explosion_power = 7, -- how big the explosion has to be
227 --explosion_time = 3, -- how long it takes for a mob to explode
237 collide_with_objects = false,
238 collisionbox = {-0.37, -0.4, -0.37, 0.37, 0.5, 0.37},
240 visual_size = {x = 3, y = 3},
243 "creepig_body.png","creepig_leg.png","creepig_leg.png","creepig_leg.png","creepig_leg.png"
247 automatic_face_movement_dir = -90.0,
248 automatic_face_movement_max_rotation_per_sec = 300,
249 makes_footstep_sound = false,
251 gravity = {x = 0, y = -9.81, z = 0},
252 movement_type = "walk",
257 item_drop = "mob:cooked_porkchop",
259 standing_frame = {x=0,y=0},
260 moving_frame = {x=5,y=15},
261 animation_multiplier = 5,
264 has_head = true, --remove this when mesh based head rotation is implemented
265 head_visual = "mesh",
266 head_visual_size = {x = 1.1, y = 1.1},
267 head_mesh = "pig_head.x",
268 head_textures ={"creepig_head.png","creepig_nose.png"},
269 head_mount = vector.new(0,1.2,1.9),
271 death_rotation = "z",
274 die_sound = "pig_die",
276 attack_type = "explode",
277 --projectile_timer_cooldown = 5,
278 --projectile_type = "tnt:tnt",
280 explosion_radius = 2, -- how far away the mob has to be to initialize the explosion
281 explosion_power = 7, -- how big the explosion has to be
282 explosion_time = 5, -- how long it takes for a mob to explode
285 die_in_light_level = 12,
295 collide_with_objects = false,
296 collisionbox = {-0.37,0, -0.37, 0.37, 0.5, 0.37},
298 visual_size = {x = 3.2, y = 3.2},
299 mesh = "creeper.b3d",
305 automatic_face_movement_max_rotation_per_sec = 300,
306 makes_footstep_sound = false,
308 gravity = {x = 0, y = -9.81, z = 0},
309 movement_type = "walk",
314 item_drop = "mob:cooked_porkchop",
316 standing_frame = {x=0,y=0},
317 moving_frame = {x=0,y=40},
318 animation_multiplier = 20,
322 --these are used to anchor a point to the head position
324 automatic_face_movement_dir = 0,
326 debug_head_pos = true,
327 --this always has to be slightly positive
328 head_directional_offset = 0.01,
329 head_height_offset = 1.45, --added to the base y position
330 --use this to correct the head position initially because it becomes severly offset - look at your blender model to get this perfect
331 head_position_correction = vector.new(0,2.4,0),
332 head_coord = "vertical",
336 death_rotation = "x",
339 die_sound = "pig_die",
341 attack_type = "explode",
342 --projectile_timer_cooldown = 5,
343 --projectile_type = "tnt:tnt",
345 explosion_radius = 2, -- how far away the mob has to be to initialize the explosion
346 explosion_power = 7, -- how big the explosion has to be
347 explosion_time = 5, -- how long it takes for a mob to explode
349 die_in_light = false,
350 --die_in_light_level = 12,