First Commit by TenPlus1

master
tenplus1 2014-11-09 19:13:11 +00:00
commit 790135e497
79 changed files with 72707 additions and 0 deletions

27
README.txt Normal file
View File

@ -0,0 +1,27 @@
-= MOBS-MOD for MINETEST =-
by PilzAdam, KrupnovPavel, Zeg9 and TenPlus1
All my models and change code on valid license The MIT License
The MIT License (MIT)
Copyright (c) 2014 Krupnov Pavel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

905
api.lua Normal file
View File

@ -0,0 +1,905 @@
mobs = {}
mobs.mod = "redo"
function mobs:register_mob(name, def)
minetest.register_entity(name, {
name = name,
hp_min = def.hp_min or 5,
hp_max = def.hp_max,
physical = true,
collisionbox = def.collisionbox,
visual = def.visual,
visual_size = def.visual_size,
mesh = def.mesh,
textures = def.textures,
makes_footstep_sound = def.makes_footstep_sound,
view_range = def.view_range,
walk_velocity = def.walk_velocity,
run_velocity = def.run_velocity,
damage = def.damage,
light_damage = def.light_damage,
water_damage = def.water_damage,
lava_damage = def.lava_damage,
fall_damage = def.fall_damage or true,
drops = def.drops,
armor = def.armor,
drawtype = def.drawtype,
on_rightclick = def.on_rightclick,
type = def.type,
attack_type = def.attack_type,
arrow = def.arrow,
shoot_interval = def.shoot_interval,
sounds = def.sounds,
animation = def.animation,
follow = def.follow,
jump = def.jump or true,
exp_min = def.exp_min or 0,
exp_max = def.exp_max or 0,
walk_chance = def.walk_chance or 50,
attacks_monsters = def.attacks_monsters or false,
group_attack = def.group_attack or false,
step = def.step or 0,
fov = def.fov or 120,
passive = def.passive or false,
recovery_time = def.recovery_time or 0.5,
knock_back = def.knock_back or 3,
blood_offset = def.blood_offset or 0,
blood_amount = def.blood_amount or 5, -- 15
blood_texture = def.blood_texture or "mobs_blood.png",
rewards = def.rewards or nil,
animaltype = def.animaltype,
shoot_offset = def.shoot_offset or 0,
stimer = 0,
timer = 0,
env_damage_timer = 0, -- only if state = "attack"
attack = {player=nil, dist=nil},
state = "stand",
v_start = false,
old_y = nil,
lifetimer = 600,
tamed = false,
last_state = nil,
pause_timer = 0,
do_attack = function(self, player, dist)
if self.state ~= "attack" then
-- if self.sounds.war_cry then
-- if math.random(0,100) < 90 then
-- minetest.sound_play(self.sounds.war_cry,{ object = self.object })
-- end
-- end
self.state = "attack"
self.attack.player = player
self.attack.dist = dist
end
end,
set_velocity = function(self, v)
local yaw = self.object:getyaw()
if self.drawtype == "side" then
yaw = yaw+(math.pi/2)
end
local x = math.sin(yaw) * -v
local z = math.cos(yaw) * v
self.object:setvelocity({x=x, y=self.object:getvelocity().y, z=z})
end,
get_velocity = function(self)
local v = self.object:getvelocity()
return (v.x^2 + v.z^2)^(0.5)
end,
--[[
in_fov = function(self,pos)
-- checks if POS is in self's FOV
local yaw = self.object:getyaw()
if self.drawtype == "side" then
yaw = yaw+(math.pi/2)
end
local vx = math.sin(yaw)
local vz = math.cos(yaw)
local ds = math.sqrt(vx^2 + vz^2)
local ps = math.sqrt(pos.x^2 + pos.z^2)
local d = { x = vx / ds, z = vz / ds }
local p = { x = pos.x / ps, z = pos.z / ps }
local an = ( d.x * p.x ) + ( d.z * p.z )
a = math.deg( math.acos( an ) )
if a > ( self.fov / 2 ) then
return false
else
return true
end
end,
]]
set_animation = function(self, type)
if not self.animation then
return
end
if not self.animation.current then
self.animation.current = ""
end
if type == "stand" and self.animation.current ~= "stand" then
if
self.animation.stand_start
and self.animation.stand_end
and self.animation.speed_normal
then
self.object:set_animation(
{x=self.animation.stand_start,y=self.animation.stand_end},
self.animation.speed_normal, 0
)
self.animation.current = "stand"
end
elseif type == "walk" and self.animation.current ~= "walk" then
if
self.animation.walk_start
and self.animation.walk_end
and self.animation.speed_normal
then
self.object:set_animation(
{x=self.animation.walk_start,y=self.animation.walk_end},
self.animation.speed_normal, 0
)
self.animation.current = "walk"
end
elseif type == "run" and self.animation.current ~= "run" then
if
self.animation.run_start
and self.animation.run_end
and self.animation.speed_run
then
self.object:set_animation(
{x=self.animation.run_start,y=self.animation.run_end},
self.animation.speed_run, 0
)
self.animation.current = "run"
end
elseif type == "punch" and self.animation.current ~= "punch" then
if
self.animation.punch_start
and self.animation.punch_end
and self.animation.speed_normal
then
self.object:set_animation(
{x=self.animation.punch_start,y=self.animation.punch_end},
self.animation.speed_normal, 0
)
self.animation.current = "punch"
end
end
end,
on_step = function(self, dtime)
if self.type == "monster" and minetest.setting_getbool("only_peaceful_mobs") then
self.object:remove()
end
self.lifetimer = self.lifetimer - dtime
if self.lifetimer <= 0 and not self.tamed and self.type ~= "npc" then
local player_count = 0
for _,obj in ipairs(minetest.get_objects_inside_radius(self.object:getpos(), 10)) do
if obj:is_player() then
player_count = player_count+1
end
end
if player_count == 0 and self.state ~= "attack" then
minetest.log("action","lifetimer expired, removed mob "..self.name)
self.object:remove()
return
end
end
-- drop egg
if self.animaltype == "clucky" then
if math.random(1, 1500) < 2
and minetest.get_node(self.object:getpos()).name == "air"
and self.state == "stand" then
minetest.set_node(self.object:getpos(), {name="mobs:egg"})
end
end
if self.object:getvelocity().y > 0.1 then
local yaw = self.object:getyaw()
if self.drawtype == "side" then
yaw = yaw+(math.pi/2)
end
local x = math.sin(yaw) * -2
local z = math.cos(yaw) * 2
-- self.object:setacceleration({x=x, y=-10, z=z})
-- else
-- self.object:setacceleration({x=0, y=-10, z=0})
-- end
-- Mobs float in water now, to revert uncomment previous 4 lines and remove following block of 12
if minetest.get_item_group(minetest.get_node(self.object:getpos()).name, "water") ~= 0 then
self.object:setacceleration({x = x, y = 1.5, z = z})
else
self.object:setacceleration({x = x, y = -10, z = z}) -- 14.5
end
else
if minetest.get_item_group(minetest.get_node(self.object:getpos()).name, "water") ~= 0 then
self.object:setacceleration({x = 0, y = 1.5, z = 0})
else
self.object:setacceleration({x = 0, y = -10, z = 0}) -- 14.5
end
end
-- fall damage
if self.fall_damage and self.object:getvelocity().y == 0 then
if not self.old_y then
self.old_y = self.object:getpos().y
else
local d = self.old_y - self.object:getpos().y
if d > 5 then
local damage = d-5
self.object:set_hp(self.object:get_hp()-damage)
if self.object:get_hp() == 0 then
self.object:remove()
end
end
self.old_y = self.object:getpos().y
end
end
-- if pause state then this is where the loop ends
-- pause is only set after a monster is hit
if self.pause_timer > 0 then
self.pause_timer = self.pause_timer - dtime
if self.pause_timer <= 0 then
self.pause_timer = 0
end
return
end
self.timer = self.timer+dtime
if self.state ~= "attack" then
if self.timer < 1 then
return
end
self.timer = 0
end
if self.sounds and self.sounds.random and math.random(1, 100) <= 1 then
minetest.sound_play(self.sounds.random, {object = self.object})
end
local do_env_damage = function(self)
local pos = self.object:getpos()
local n = minetest.get_node(pos)
if self.light_damage and self.light_damage ~= 0
and pos.y>0
and minetest.get_node_light(pos)
and minetest.get_node_light(pos) > 4
and minetest.get_timeofday() > 0.2
and minetest.get_timeofday() < 0.8
then
self.object:set_hp(self.object:get_hp()-self.light_damage)
if self.object:get_hp() < 1 then
self.object:remove()
end
end
if self.water_damage and self.water_damage ~= 0 and
minetest.get_item_group(n.name, "water") ~= 0
then
self.object:set_hp(self.object:get_hp()-self.water_damage)
if self.object:get_hp() < 1 then
self.object:remove()
end
end
if self.lava_damage and self.lava_damage ~= 0 and
minetest.get_item_group(n.name, "lava") ~= 0
then
self.object:set_hp(self.object:get_hp()-self.lava_damage)
if self.object:get_hp() < 1 then
self.object:remove()
end
end
end
self.env_damage_timer = self.env_damage_timer + dtime
if self.state == "attack" and self.env_damage_timer > 1 then
self.env_damage_timer = 0
do_env_damage(self)
elseif self.state ~= "attack" then
do_env_damage(self)
end
-- FIND SOMEONE TO ATTACK
if ( self.type == "monster" or self.type == "barbarian" ) and minetest.setting_getbool("enable_damage") and self.state ~= "attack" then
local s = self.object:getpos()
local inradius = minetest.get_objects_inside_radius(s,self.view_range)
local player = nil
local type = nil
for _,oir in ipairs(inradius) do
if oir:is_player() then
player = oir
type = "player"
else
local obj = oir:get_luaentity()
if obj then
player = obj.object
type = obj.type
end
end
if type == "player" or type == "npc" then
local s = self.object:getpos()
local p = player:getpos()
local sp = s
p.y = p.y + 1
sp.y = sp.y + 1 -- aim higher to make looking up hills more realistic
local dist = ((p.x-s.x)^2 + (p.y-s.y)^2 + (p.z-s.z)^2)^0.5
if dist < self.view_range then -- and self.in_fov(self,p) then
if minetest.line_of_sight(sp,p,2) == true then
self.do_attack(self,player,dist)
break
end
end
end
end
end
-- NPC FIND A MONSTER TO ATTACK
-- if self.type == "npc" and self.attacks_monsters and self.state ~= "attack" then
-- local s = self.object:getpos()
-- local inradius = minetest.get_objects_inside_radius(s,self.view_range)
-- for _, oir in pairs(inradius) do
-- local obj = oir:get_luaentity()
-- if obj then
-- if obj.type == "monster" or obj.type == "barbarian" then
-- -- attack monster
-- local p = obj.object:getpos()
-- local dist = ((p.x-s.x)^2 + (p.y-s.y)^2 + (p.z-s.z)^2)^0.5
-- self.do_attack(self,obj.object,dist)
-- break
-- end
-- end
-- end
-- end
if self.follow ~= "" and not self.following then
for _,player in pairs(minetest.get_connected_players()) do
local s = self.object:getpos()
local p = player:getpos()
local dist = ((p.x-s.x)^2 + (p.y-s.y)^2 + (p.z-s.z)^2)^0.5
if self.view_range and dist < self.view_range then
self.following = player
break
end
end
end
if self.following and self.following:is_player() then
if self.following:get_wielded_item():get_name() ~= self.follow then
self.following = nil
else
local s = self.object:getpos()
local p = self.following:getpos()
local dist = ((p.x-s.x)^2 + (p.y-s.y)^2 + (p.z-s.z)^2)^0.5
if dist > self.view_range then
self.following = nil
self.v_start = false
else
local vec = {x=p.x-s.x, y=p.y-s.y, z=p.z-s.z}
local yaw = math.atan(vec.z/vec.x)+math.pi/2
if self.drawtype == "side" then
yaw = yaw+(math.pi/2)
end
if p.x > s.x then
yaw = yaw+math.pi
end
self.object:setyaw(yaw)
if dist > 2 then
if not self.v_start then
self.v_start = true
self.set_velocity(self, self.walk_velocity)
else
if self.jump and self.get_velocity(self) <= 1.5 and self.object:getvelocity().y == 0 then
local v = self.object:getvelocity()
v.y = 6
self.object:setvelocity(v)
end
self.set_velocity(self, self.walk_velocity)
end
self:set_animation("walk")
else
self.v_start = false
self.set_velocity(self, 0)
self:set_animation("stand")
end
return
end
end
end
if self.state == "stand" then
-- randomly turn
if math.random(1, 4) == 1 then
-- if there is a player nearby look at them
local lp = nil
local s = self.object:getpos()
if self.type == "npc" then
local o = minetest.get_objects_inside_radius(self.object:getpos(), 3)
local yaw = 0
for _,o in ipairs(o) do
if o:is_player() then
lp = o:getpos()
break
end
end
end
if lp ~= nil then
local vec = {x=lp.x-s.x, y=lp.y-s.y, z=lp.z-s.z}
yaw = math.atan(vec.z/vec.x)+math.pi/2
if self.drawtype == "side" then
yaw = yaw+(math.pi/2)
end
if lp.x > s.x then
yaw = yaw+math.pi
end
else
yaw = self.object:getyaw()+((math.random(0,360)-180)/180*math.pi)
end
self.object:setyaw(yaw)
end
self.set_velocity(self, 0)
self.set_animation(self, "stand")
if math.random(1, 100) <= self.walk_chance then
self.set_velocity(self, self.walk_velocity)
self.state = "walk"
self.set_animation(self, "walk")
end
elseif self.state == "walk" then
if math.random(1, 100) < 31 then
self.object:setyaw(self.object:getyaw()+((math.random(0,360)-180)/180*math.pi))
end
if self.jump and self.get_velocity(self) <= 0.5 and self.object:getvelocity().y == 0 then
local v = self.object:getvelocity()
v.y = 5
self.object:setvelocity(v)
end
self:set_animation("walk")
self.set_velocity(self, self.walk_velocity)
if math.random(1, 100) < 31 then
self.set_velocity(self, 0)
self.state = "stand"
self:set_animation("stand")
end
elseif self.state == "attack" and self.attack_type == "dogfight" then
if not self.attack.player or not self.attack.player:getpos() then
print("stop attacking")
self.state = "stand"
self:set_animation("stand")
return
end
local s = self.object:getpos()
local p = self.attack.player:getpos()
local dist = ((p.x-s.x)^2 + (p.y-s.y)^2 + (p.z-s.z)^2)^0.5
if dist > self.view_range or self.attack.player:get_hp() <= 0 then
self.state = "stand"
self.v_start = false
self.set_velocity(self, 0)
self.attack = {player=nil, dist=nil}
self:set_animation("stand")
return
else
self.attack.dist = dist
end
local vec = {x=p.x-s.x, y=p.y-s.y, z=p.z-s.z}
local yaw = math.atan(vec.z/vec.x)+math.pi/2
if self.drawtype == "side" then
yaw = yaw+(math.pi/2)
end
if p.x > s.x then
yaw = yaw+math.pi
end
self.object:setyaw(yaw)
if self.attack.dist > 2 then
if not self.v_start then
self.v_start = true
self.set_velocity(self, self.run_velocity)
else
if self.jump and self.get_velocity(self) <= 0.5 and self.object:getvelocity().y == 0 then
local v = self.object:getvelocity()
v.y = 5
self.object:setvelocity(v)
end
self.set_velocity(self, self.run_velocity)
end
self:set_animation("run")
else
self.set_velocity(self, 0)
self:set_animation("punch")
self.v_start = false
if self.timer > 1 then
self.timer = 0
local p2 = p
local s2 = s
p2.y = p2.y + 1.5
s2.y = s2.y + 1.5
if minetest.line_of_sight(p2,s2) == true then
if self.sounds and self.sounds.attack then
minetest.sound_play(self.sounds.attack, {object = self.object})
end
self.attack.player:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=self.damage}
}, vec)
if self.attack.player:get_hp() < 1 then
self.state = "stand"
self:set_animation("stand")
end
end
end
end
elseif self.state == "attack" and self.attack_type == "shoot" then
if not self.attack.player or not self.attack.player:is_player() then
self.state = "stand"
self:set_animation("stand")
return
end
local s = self.object:getpos()
local p = self.attack.player:getpos()
p.y = p.y - .5
s.y = s.y + .5
local dist = ((p.x-s.x)^2 + (p.y-s.y)^2 + (p.z-s.z)^2)^0.5
if dist > self.view_range or self.attack.player:get_hp() <= 0 then
self.state = "stand"
self.v_start = false
self.set_velocity(self, 0)
if self.type ~= "npc" then
self.attack = {player=nil, dist=nil}
end
self:set_animation("stand")
return
else
self.attack.dist = dist
end
local vec = {x=p.x-s.x, y=p.y-s.y, z=p.z-s.z}
local yaw = math.atan(vec.z/vec.x)+math.pi/2
if self.drawtype == "side" then
yaw = yaw+(math.pi/2)
end
if p.x > s.x then
yaw = yaw+math.pi
end
self.object:setyaw(yaw)
self.set_velocity(self, 0)
if self.timer > self.shoot_interval and math.random(1, 100) < 61 then
self.timer = 0
self:set_animation("punch")
if self.sounds and self.sounds.attack then
minetest.sound_play(self.sounds.attack, {object = self.object})
end
local p = self.object:getpos()
p.y = p.y + (self.collisionbox[2]+self.collisionbox[5])/2
local obj = minetest.add_entity(p, self.arrow)
local amount = (vec.x^2+vec.y^2+vec.z^2)^0.5
local v = obj:get_luaentity().velocity
vec.y = vec.y + self.shoot_offset -- was +1, this way shoot aim is accurate
vec.x = vec.x*v/amount
vec.y = vec.y*v/amount
vec.z = vec.z*v/amount
obj:setvelocity(vec)
end
end
end,
on_activate = function(self, staticdata, dtime_s)
-- reset HP
local pos = self.object:getpos()
local distance_rating = ( ( get_distance({x=0,y=0,z=0},pos) ) / 20000 )
local newHP = self.hp_min + math.floor( self.hp_max * distance_rating )
self.object:set_hp( newHP )
self.object:set_armor_groups({fleshy=self.armor})
self.object:setacceleration({x=0, y=-10, z=0})
self.state = "stand"
self.object:setvelocity({x=0, y=self.object:getvelocity().y, z=0})
self.object:setyaw(math.random(1, 360)/180*math.pi)
if self.type == "monster" and minetest.setting_getbool("only_peaceful_mobs") then
self.object:remove()
end
if self.type ~= "npc" then
self.lifetimer = 600 - dtime_s
end
if staticdata then
local tmp = minetest.deserialize(staticdata)
if tmp and tmp.lifetimer then
self.lifetimer = tmp.lifetimer - dtime_s
end
if tmp and tmp.tamed then
self.tamed = tmp.tamed
end
--[[if tmp and tmp.textures then
self.object:set_properties(tmp.textures)
end]]
end
if self.lifetimer < 1 and not self.tamed and self.type ~= "npc" then
self.object:remove()
end
end,
get_staticdata = function(self)
local tmp = {
lifetimer = self.lifetimer,
tamed = self.tamed,
textures = { textures = self.textures },
}
return minetest.serialize(tmp)
end,
on_punch = function(self, hitter, tflp, tool_capabilities, dir)
process_weapon(hitter,tflp,tool_capabilities)
local pos = self.object:getpos()
if self.object:get_hp() < 1 then
if hitter and hitter:is_player() then -- and hitter:get_inventory() then
for _,drop in ipairs(self.drops) do
if math.random(1, drop.chance) == 1 then
local d = ItemStack(drop.name.." "..math.random(drop.min, drop.max))
-- default.drop_item(pos,d)
local pos2 = pos
pos2.y = pos2.y + 0.5 -- drop items half block higher
minetest.add_item(pos2,d)
end
end
-- if self.sounds.death ~= nil then
-- minetest.sound_play(self.sounds.death,{
-- object = self.object,
-- })
-- end
-- if minetest.get_modpath("skills") and minetest.get_modpath("experience") then
-- -- DROP experience
-- local distance_rating = ( ( get_distance({x=0,y=0,z=0},pos) ) / ( skills.get_player_level(hitter:get_player_name()).level * 1000 ) )
-- local emax = math.floor( self.exp_min + ( distance_rating * self.exp_max ) )
-- local expGained = math.random(self.exp_min, emax)
-- skills.add_exp(hitter:get_player_name(),expGained)
-- local expStack = experience.exp_to_items(expGained)
-- for _,stack in ipairs(expStack) do
-- default.drop_item(pos,stack)
-- end
-- end
-- -- see if there are any NPCs to shower you with rewards
-- if self.type ~= "npc" then
-- local inradius = minetest.get_objects_inside_radius(hitter:getpos(),10)
-- for _, oir in pairs(inradius) do
-- local obj = oir:get_luaentity()
-- if obj then
-- if obj.type == "npc" and obj.rewards ~= nil then
-- local yaw = nil
-- local lp = hitter:getpos()
-- local s = obj.object:getpos()
-- local vec = {x=lp.x-s.x, y=1, z=lp.z-s.z}
-- yaw = math.atan(vec.z/vec.x)+math.pi/2
-- if self.drawtype == "side" then
-- yaw = yaw+(math.pi/2)
-- end
-- if lp.x > s.x then
-- yaw = yaw+math.pi
-- end
-- obj.object:setyaw(yaw)
-- local x = math.sin(yaw) * -2
-- local z = math.cos(yaw) * 2
-- acc = {x=x, y=-5, z=z}
-- for _, r in pairs(obj.rewards) do
-- if math.random(0,100) < r.chance then
-- default.drop_item(obj.object:getpos(),r.item, vec, acc)
-- end
-- end
-- end
-- end
-- end
-- end
end
end
--blood_particles
--[[
if self.blood_amount > 0 and pos then
local p = pos
p.y = p.y + self.blood_offset
minetest.add_particlespawner(
5, --blood_amount, --amount
0.25, --time
{x=p.x-0.2, y=p.y-0.2, z=p.z-0.2}, --minpos
{x=p.x+0.2, y=p.y+0.2, z=p.z+0.2}, --maxpos
{x=0, y=-2, z=0}, --minvel
{x=2, y=2, z=2}, --maxvel
{x=-4,y=-4,z=-4}, --minacc
{x=4,y=-4,z=4}, --maxacc
0.1, --minexptime
1, --maxexptime
0.5, --minsize
1, --maxsize
false, --collisiondetection
self.blood_texture --texture
)
end
]]--
-- knock back effect, adapted from blockmen's pyramids mod
-- https://github.com/BlockMen/pyramids
local kb = self.knock_back
local r = self.recovery_time
if tflp < tool_capabilities.full_punch_interval then
kb = kb * ( tflp / tool_capabilities.full_punch_interval )
r = r * ( tflp / tool_capabilities.full_punch_interval )
end
local ykb=2
local v = self.object:getvelocity()
if v.y ~= 0 then
ykb = 0
end
self.object:setvelocity({x=dir.x*kb,y=ykb,z=dir.z*kb})
self.pause_timer = r
--[[
-- attack puncher and call other mobs for help
if self.passive == false then
if self.state ~= "attack" then
self.do_attack(self,hitter,1)
end
-- alert other NPCs to the attack
local inradius = minetest.get_objects_inside_radius(hitter:getpos(),5)
for _, oir in pairs(inradius) do
local obj = oir:get_luaentity()
if obj then
if obj.group_attack == true and obj.state ~= "attack" then
obj.do_attack(obj,hitter,1)
end
end
end
end
]]--
end,
})
end
mobs.spawning_mobs = {}
function mobs:register_spawn(name, nodes, max_light, min_light, chance, active_object_count, max_height, min_dist, max_dist, spawn_func)
mobs.spawning_mobs[name] = true
minetest.register_abm({
nodenames = nodes,
neighbors = {"air"},
interval = 30,
chance = chance,
action = function(pos, node, _, active_object_count_wider)
if active_object_count_wider > active_object_count then
return
end
if not mobs.spawning_mobs[name] then
return
end
pos.y = pos.y+1
if not minetest.get_node_light(pos)
or minetest.get_node_light(pos) > max_light
or minetest.get_node_light(pos) < min_light then
--print ("LIGHT", name)
return
end
if pos.y > max_height then
return
end
if not minetest.registered_nodes[minetest.get_node(pos).name] then return end
if minetest.registered_nodes[minetest.get_node(pos).name].walkable then return end
pos.y = pos.y+1
if not minetest.registered_nodes[minetest.get_node(pos).name] then return end
if minetest.registered_nodes[minetest.get_node(pos).name].walkable then return end
if min_dist == nil then
min_dist = {x=-1,z=-1}
end
if max_dist == nil then
max_dist = {x=33000,z=33000}
end
if math.abs(pos.x) < min_dist.x or math.abs(pos.z) < min_dist.z
or math.abs(pos.x) > max_dist.x or math.abs(pos.z) > max_dist.z then
return
end
if spawn_func and not spawn_func(pos, node) then
return
end
if minetest.setting_getbool("display_mob_spawn") then
minetest.chat_send_all("[mobs] Add "..name.." at "..minetest.pos_to_string(pos))
end
local mob = minetest.add_entity(pos, name)
-- setup the hp, armor, drops, etc... for this specific mob
local distance_rating = ( ( get_distance({x=0,y=0,z=0},pos) ) / 15000 )
if mob then
mob = mob:get_luaentity()
local newHP = mob.hp_min + math.floor( mob.hp_max * distance_rating )
mob.object:set_hp( newHP )
end
end
})
end
function mobs:register_arrow(name, def)
minetest.register_entity(name, {
physical = false,
visual = def.visual,
visual_size = def.visual_size,
textures = def.textures,
velocity = def.velocity,
hit_player = def.hit_player,
hit_node = def.hit_node,
collisionbox = {0,0,0,0,0,0}, -- remove box around arrows
on_step = function(self, dtime)
local pos = self.object:getpos()
--if minetest.get_node(self.object:getpos()).name ~= "air" then
if minetest.registered_nodes[minetest.get_node(self.object:getpos()).name].walkable then
self.hit_node(self, pos, node)
self.object:remove()
return
end
-- pos.y = pos.y-1.0
for _,player in pairs(minetest.get_objects_inside_radius(pos, 1)) do
if player:is_player() then
self.hit_player(self, player)
self.object:remove()
return
end
end
end
})
end
function get_distance(pos1,pos2)
if ( pos1 ~= nil and pos2 ~= nil ) then
return math.abs(math.floor(math.sqrt( (pos1.x - pos2.x)^2 + (pos1.z - pos2.z)^2 )))
else
return 0
end
end
function process_weapon(player, time_from_last_punch, tool_capabilities)
local weapon = player:get_wielded_item()
if tool_capabilities ~= nil then
local wear = ( tool_capabilities.full_punch_interval / 75 ) * 65535
weapon:add_wear(wear)
player:set_wielded_item(weapon)
end
-- if weapon:get_definition().sounds ~= nil then
-- local s = math.random(0,#weapon:get_definition().sounds)
-- minetest.sound_play(weapon:get_definition().sounds[s], {
-- object=player,
-- })
-- else
-- minetest.sound_play("default_sword_wood", {
-- object = player,
-- })
-- end
end

102
bee.lua Normal file
View File

@ -0,0 +1,102 @@
-- Bee
mobs:register_mob("mobs:bee", {
type = "animal",
hp_min = 1,
hp_max = 2,
collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.2, 0.2},
visual = "mesh",
mesh = "mobs_bee.x",
textures = {"mobs_bee.png"},
makes_footstep_sound = false,
walk_velocity = 1,
armor = 200,
drops = {
{name = "mobs:med_cooked",
chance = 1,
min = 1,
max = 2,},
},
drawtype = "front",
water_damage = 1,
lava_damage = 1,
light_damage = 0,
animation = {
speed_normal = 15,
stand_start = 0,
stand_end = 30,
walk_start = 35,
walk_end = 65,
},
on_rightclick = function(self, clicker)
if clicker:is_player() and clicker:get_inventory() then
clicker:get_inventory():add_item("main", "mobs:bee")
self.object:remove()
end
end,
jump = true,
step = 1,
passive = true,
})
mobs:register_spawn("mobs:bee", {"group:flower"}, 20, 4, 5000, 1, 31000)
minetest.register_craftitem("mobs:bee", {
description = "bee",
inventory_image = "mobs_bee_inv.png",
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.above then
minetest.env:add_entity(pointed_thing.above, "mobs:bee")
itemstack:take_item()
end
return itemstack
end,
})
-- Honey
minetest.register_craftitem("mobs:honey", {
description = "Honey",
inventory_image = "mobs_honey_inv.png",
on_use = minetest.item_eat(6),
})
minetest.register_craft({
type = "cooking",
output = "mobs:med_cooked",
recipe = "mobs:bee",
cooktime = 5,
})
-- Beehive
minetest.register_node("mobs:beehive", {
description = "Beehive",
drawtype = "plantlike",
visual_scale = 1.0,
tiles ={"mobs_beehive.png"},
inventory_image = "mobs_beehive.png",
paramtype = "light",
sunlight_propagates = true,
walkable = true,
groups = {fleshy=3,dig_immediate=3},
on_use = minetest.item_eat(4),
sounds = default.node_sound_defaults(),
after_place_node = function(pos, placer, itemstack)
if placer:is_player() then
minetest.set_node(pos, {name="mobs:beehive", param2=1})
minetest.env:add_entity(pos, "mobs:bee")
end
end,
})
minetest.register_craft({
output = "mobs:beehive",
recipe = {
{"mobs:bee","mobs:bee","mobs:bee"},
}
})

120
chicken.lua Normal file
View File

@ -0,0 +1,120 @@
--= Chicken (thanks to JK Murray for his chicken model)
mobs:register_mob("mobs:chicken", {
type = "animal",
hp_min = 5,
hp_max = 10,
animaltype = "clucky",
collisionbox = {-0.3, -0.75, -0.3, 0.3, 0.1, 0.3},
visual = "mesh",
mesh = "chicken.x",
-- textures look repetative but they fix the wrapping bug
textures = {"mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png",
"mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png"},
makes_footstep_sound = true,
walk_velocity = 1,
armor = 200,
drops = {
{name = "mobs:chicken_raw", chance = 1, min = 2, max = 2,},
},
drawtype = "front",
water_damage = 1,
lava_damage = 5,
light_damage = 0,
jump = false,
animation = {
speed_normal = 15,
stand_start = 0,
stand_end = 1, -- 20
walk_start = 20,
walk_end = 40,
},
follow = "farming:wheat",
view_range = 5,
on_rightclick = function(self, clicker)
if clicker:is_player() and clicker:get_inventory() then
clicker:get_inventory():add_item("main", "mobs:chicken")
self.object:remove()
end
end,
jump = true,
step = 1,
blood_texture = "mobs_blood.png",
passive = true,
})
mobs:register_spawn("mobs:chicken", {"default:dirt_with_grass", "ethereal:bamboo_dirt"}, 20, 8, 9000, 1, 31000)
-- Chicken (right-click chicken to place in inventory)
minetest.register_craftitem("mobs:chicken", {
description = "Chicken",
inventory_image = "mobs_chicken_inv.png",
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.above then
minetest.env:add_entity(pointed_thing.above, "mobs:chicken")
itemstack:take_item()
end
return itemstack
end,
})
-- Egg (can be fried in furnace)
minetest.register_node("mobs:egg",
{
description = "Chicken Egg",
tiles = {"mobs_chicken_egg.png"},
inventory_image = "mobs_chicken_egg.png",
visual_scale = 0.7,
drawtype = "plantlike",
wield_image = "mobs_chicken_egg.png",
paramtype = "light",
walkable = false,
is_ground_content = true,
sunlight_propagates = true,
selection_box = {
type = "fixed",
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
},
groups = {snappy=2, dig_immediate=3},
after_place_node = function(pos, placer, itemstack)
if placer:is_player() then
minetest.set_node(pos, {name="mobs:egg", param2=1})
end
end
})
minetest.register_craftitem("mobs:chicken_egg_fried", {
description = "Fried Egg",
inventory_image = "mobs_chicken_egg_fried.png",
on_use = minetest.item_eat(2),
})
minetest.register_craft({
type = "cooking",
recipe = "mobs:egg",
output = "mobs:chicken_egg_fried",
})
-- Chicken (raw and cooked)
minetest.register_craftitem("mobs:chicken_raw", {
description = "Raw Chicken",
inventory_image = "mobs_chicken_raw.png",
on_use = minetest.item_eat(2),
})
minetest.register_craftitem("mobs:chicken_cooked", {
description = "Cooked Chicken",
inventory_image = "mobs_chicken_cooked.png",
on_use = minetest.item_eat(6),
})
minetest.register_craft({
type = "cooking",
recipe = "mobs:chicken_raw",
output = "mobs:chicken_cooked",
})

131
cow.lua Normal file
View File

@ -0,0 +1,131 @@
-- Cow by Krupnovpavel
mobs:register_mob("mobs:cow", {
type = "animal",
hp_min = 5,
hp_max = 20,
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4},
textures = {"mobs_cow.png"},
visual = "mesh",
mesh = "mobs_cow.x",
makes_footstep_sound = true,
view_range = 7,
walk_velocity = 1,
run_velocity = 2,
damage = 10,
armor = 200,
drops = {
{name = "mobs:meat_raw",
chance = 1,
min = 5,
max = 10,},
},
drawtype = "front",
water_damage = 1,
lava_damage = 5,
light_damage = 0,
follow = "farming:wheat",
sounds = {
random = "mobs_cow",
},
-- right-click cow with empty bucket to get milk, then feed 8 wheat to replenish milk
on_rightclick = function(self, clicker)
tool = clicker:get_wielded_item()
if tool:get_name() == "bucket:bucket_empty" then
if self.milked then
do return end
end
clicker:get_inventory():remove_item("main", "bucket:bucket_empty")
clicker:get_inventory():add_item("main", "mobs:bucket_milk")
self.milked = true
end
if tool:get_name() == "farming:wheat" then
if self.milked then
if not minetest.setting_getbool("creative_mode") then
tool:take_item(1)
clicker:set_wielded_item(tool)
end
self.food = (self.food or 0) + 1
if self.food >= 8 then
self.food = 0
self.milked = false
self.tamed = true
minetest.sound_play("mobs_cow", {object = self.object,gain = 1.0,max_hear_distance = 32,loop = false,})
end
end
return tool
end
end,
animation = {
speed_normal = 15,
speed_run = 15,
stand_start = 0,
stand_end = 30,
walk_start = 35,
walk_end = 65,
run_start = 105,
run_end = 135,
punch_start = 70,
punch_end = 100,
},
jump = true,
step = 1,
blood_texture = "mobs_blood.png",
passive = true,
})
mobs:register_spawn("mobs:cow", {"default:dirt_with_grass", "ethereal:green_dirt_top", "ethereal:prairie_dirt"}, 20, 0, 11000, 1, 31000)
-- Bucket of Milk
minetest.register_craftitem("mobs:bucket_milk", {
description = "Bucket of Milk",
inventory_image = "mobs_bucket_milk.png",
stack_max = 1,
on_use = minetest.item_eat(8, 'bucket:bucket_empty'),
})
-- Cheese Wedge
minetest.register_craftitem("mobs:cheese", {
description = "Cheese",
inventory_image = "mobs_cheese.png",
on_use = minetest.item_eat(4),
})
minetest.register_craft({
type = "cooking",
output = "mobs:cheese",
recipe = "mobs:bucket_milk",
cooktime = 5,
replacements = {{ "mobs:bucket_milk", "bucket:bucket_empty"}}
})
-- Cheese Block
minetest.register_node("mobs:cheeseblock", {
description = "Cheese Block",
tiles = {"mobs_cheeseblock.png"},
is_ground_content = false,
groups = {crumbly=3},
sounds = default.node_sound_dirt_defaults()
})
minetest.register_craft({
output = "mobs:cheeseblock",
recipe = {
{'mobs:cheese', 'mobs:cheese', 'mobs:cheese'},
{'mobs:cheese', 'mobs:cheese', 'mobs:cheese'},
{'mobs:cheese', 'mobs:cheese', 'mobs:cheese'},
}
})
minetest.register_craft({
output = "mobs:cheese 9",
recipe = {
{'mobs:cheeseblock'},
}
})

1
depends.txt Normal file
View File

@ -0,0 +1 @@
default

46
dirtmonster.lua Normal file
View File

@ -0,0 +1,46 @@
-- Dirt Monster
mobs:register_mob("mobs:dirt_monster", {
type = "monster",
hp_min = 3,
hp_max = 27,
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
visual = "mesh",
mesh = "mobs_stone_monster.x",
textures = {"mobs_dirt_monster.png"},
visual_size = {x=3, y=2.6},
makes_footstep_sound = true,
view_range = 15,
walk_velocity = 1,
run_velocity = 3,
damage = 2,
drops = {
{name = "default:dirt",
chance = 1,
min = 3,
max = 5,},
},
armor = 100,
drawtype = "front",
water_damage = 1,
lava_damage = 5,
light_damage = 2,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 15,
stand_start = 0,
stand_end = 14,
walk_start = 15,
walk_end = 38,
run_start = 40,
run_end = 63,
punch_start = 40,
punch_end = 63,
},
jump = true,
step = 0.5,
blood_texture = "default_dirt.png",
})
mobs:register_spawn("mobs:dirt_monster", {"default:dirt_with_grass", "ethereal:gray_dirt_top"}, 3, -1, 7000, 1, 31000)

102
dungeonmaster.lua Normal file
View File

@ -0,0 +1,102 @@
-- Dungeon Master (This one spits out fireballs at you)
mobs:register_mob("mobs:dungeon_master", {
type = "monster",
hp_min = 12,
hp_max = 35,
collisionbox = {-0.7, -0.01, -0.7, 0.7, 2.6, 0.7},
visual = "mesh",
mesh = "mobs_dungeon_master.x",
textures = {"mobs_dungeon_master.png"},
visual_size = {x=8, y=8},
makes_footstep_sound = true,
view_range = 15,
walk_velocity = 1,
run_velocity = 3,
damage = 4,
drops = {
{name = "default:mese_crystal_fragment",
chance = 1,
min = 1,
max = 3,},
{name = "default:diamond",
chance = 4,
min = 1,
max = 1,},
{name = "default:mese_crystal",
chance = 2,
min = 1,
max = 2,},
{name = "default:diamond_block",
chance = 30,
min = 1,
max = 1,},
},
armor = 60,
drawtype = "front",
water_damage = 1,
lava_damage = 1,
light_damage = 0,
on_rightclick = nil,
attack_type = "shoot",
arrow = "mobs:fireball",
shoot_interval = 2.5,
sounds = {
attack = "mobs_fireball",
},
animation = {
stand_start = 0,
stand_end = 19,
walk_start = 20,
walk_end = 35,
punch_start = 36,
punch_end = 48,
speed_normal = 15,
speed_run = 15,
},
jump = true,
step = 0.5,
shoot_offset = 0,
blood_texture = "mobs_blood.png",
})
mobs:register_spawn("mobs:dungeon_master", {"default:stone"}, 2, -1, 7000, 1, -70)
-- Fireball (weapon)
mobs:register_arrow("mobs:fireball", {
visual = "sprite",
visual_size = {x=1, y=1},
textures = {"mobs_fireball.png"},
velocity = 5,
-- direct hit, no fire... just plenty of pain
hit_player = function(self, player)
local s = self.object:getpos()
local p = player:getpos()
player:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=8},
}, 0) -- {x=s.x-p.x, y=s.y-p.y, z=s.z-p.z})
end,
-- node hit, bursts into flame (cannot blast through obsidian)
hit_node = function(self, pos, node)
for dx=-1,1 do
for dy=-1,1 do
for dz=-1,1 do
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
local n = minetest.env:get_node(p).name
if n ~= "default:obsidian" and n ~= "ethereal:obsidian_brick" then
if minetest.registered_nodes[n].groups.flammable or math.random(1, 100) <= 30 then
minetest.env:set_node(p, {name="fire:basic_flame"})
else
minetest.env:set_node(p, {name="air"})
end
end
end
end
end
end
})

55
init.lua Normal file
View File

@ -0,0 +1,55 @@
-- Mob Api (15th Oct 2014)
dofile(minetest.get_modpath("mobs").."/api.lua")
-- Animals inc. Krupnovpavel's warthog/bee and JKmurray's chicken
dofile(minetest.get_modpath("mobs").."/chicken.lua")
dofile(minetest.get_modpath("mobs").."/cow.lua")
dofile(minetest.get_modpath("mobs").."/rat.lua")
dofile(minetest.get_modpath("mobs").."/sheep.lua")
dofile(minetest.get_modpath("mobs").."/warthog.lua")
dofile(minetest.get_modpath("mobs").."/bee.lua")
-- Monsters
dofile(minetest.get_modpath("mobs").."/dirtmonster.lua")
dofile(minetest.get_modpath("mobs").."/dungeonmaster.lua")
dofile(minetest.get_modpath("mobs").."/oerkki.lua")
dofile(minetest.get_modpath("mobs").."/sandmonster.lua")
dofile(minetest.get_modpath("mobs").."/stonemonster.lua")
dofile(minetest.get_modpath("mobs").."/treemonster.lua")
-- Zmobs by Zeg9
dofile(minetest.get_modpath("mobs").."/lava_flan.lua")
dofile(minetest.get_modpath("mobs").."/mese_monster.lua")
-- Spider from Lord of the Test - https://forum.minetest.net/viewtopic.php?pid=127538
dofile(minetest.get_modpath("mobs").."/spider.lua")
-- Meat & Cooked Meat
minetest.register_craftitem("mobs:meat_raw", {
description = "Raw Meat",
inventory_image = "mobs_meat_raw.png",
on_use = minetest.item_eat(3),
})
minetest.register_craftitem("mobs:meat", {
description = "Meat",
inventory_image = "mobs_meat.png",
on_use = minetest.item_eat(8),
})
minetest.register_craft({
type = "cooking",
output = "mobs:meat",
recipe = "mobs:meat_raw",
cooktime = 5,
})
if minetest.setting_get("log_mods") then
minetest.log("action", "mobs loaded")
end

56
lava_flan.lua Normal file
View File

@ -0,0 +1,56 @@
--= Lava Flan by Zeg9
minetest.register_craftitem("mobs:lava_orb", {
description = "Lava orb",
inventory_image = "zmobs_lava_orb.png",
on_place = function(itemstack, placer, pointed_thing)
end,
})
minetest.register_alias("zmobs:lava_orb", "mobs:lava_orb")
mobs:register_mob("mobs:lava_flan", {
type = "monster",
hp_min = 10,
hp_max = 35,
collisionbox = {-0.5, -0.5, -0.5, 0.5, 1.5, 0.5},
visual = "mesh",
mesh = "zmobs_lava_flan.x",
textures = {"zmobs_lava_flan.png"},
visual_size = {x=1, y=1},
makes_footstep_sound = true,
view_range = 10,
walk_velocity = 0.5,
run_velocity = 2,
damage = 3,
drops = {
{name = "mobs:lava_orb",
chance = 15,
min = 1,
max = 1,},
},
light_resistant = true,
armor = 80,
drawtype = "front",
water_damage = 5,
lava_damage = 0,
light_damage = 0,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 15,
stand_start = 0,
stand_end = 8,
walk_start = 10,
walk_end = 18,
run_start = 20,
run_end = 28,
punch_start = 20,
punch_end = 28,
},
jump = true,
step = 0.5,
blood_texture = "fire_basic_flame.png",
})
mobs:register_spawn("mobs:lava_flan", {"default:lava_source"}, 15, -1, 1000, 3, 0)

87
mese_monster.lua Normal file
View File

@ -0,0 +1,87 @@
--= Mese Monster by Zeg9
-- 9 mese crystal fragments = 1 mese crystal
minetest.register_craft({
output = "default:mese_crystal",
recipe = {
{"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
{"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
{"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
}
})
-- Mese Monster
mobs:register_mob("mobs:mese_monster", {
type = "monster",
hp_min = 10,
hp_max = 25,
collisionbox = {-0.5, -1.5, -0.5, 0.5, 0.5, 0.5},
visual = "mesh",
mesh = "zmobs_mese_monster.x",
textures = {"zmobs_mese_monster.png"},
visual_size = {x=1, y=1},
makes_footstep_sound = true,
view_range = 10,
walk_velocity = 0.5,
run_velocity = 2,
damage = 3,
drops = {
{name = "default:mese_crystal",
chance = 9,
min = 1,
max = 3,},
{name = "default:mese_crystal_fragment",
chance = 1,
min = 1,
max = 9,},
},
light_resistant = true,
armor = 80,
drawtype = "front",
water_damage = 0,
lava_damage = 0,
light_damage = 0,
attack_type = "shoot",
arrow = "mobs:mese_arrow",
shoot_interval = .5,
animation = {
speed_normal = 15,
speed_run = 15,
stand_start = 0,
stand_end = 14,
walk_start = 15,
walk_end = 38,
run_start = 40,
run_end = 63,
punch_start = 15, -- 40
punch_end = 38, -- 63
},
jump = true,
step = 0.5,
shoot_offset = 2,
blood_texture = "default_mese_crystal_fragment.png",
})
mobs:register_spawn("mobs:mese_monster", {"default:stone"}, 3, -1, 5000, 1, -20)
-- Mese Monster Crystal Shards (weapon)
mobs:register_arrow("mobs:mese_arrow", {
visual = "sprite",
visual_size = {x=.5, y=.5},
textures = {"default_mese_crystal_fragment.png"},
velocity = 5,
hit_player = function(self, player)
local s = self.object:getpos()
local p = player:getpos()
player:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=1},
}, 0) -- {x=s.x-p.x, y=s.y-p.y, z=s.z-p.z})
end,
hit_node = function(self, pos, node)
end
})

3080
models/chicken.x Normal file

File diff suppressed because it is too large Load Diff

BIN
models/mobs_bee.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

7645
models/mobs_bee.x Normal file

File diff suppressed because it is too large Load Diff

BIN
models/mobs_chicken.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
models/mobs_cow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

7420
models/mobs_cow.x Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
models/mobs_dungeon_master.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

2830
models/mobs_dungeon_master.x Executable file

File diff suppressed because it is too large Load Diff

BIN
models/mobs_oerkki.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

3858
models/mobs_oerkki.x Executable file

File diff suppressed because it is too large Load Diff

BIN
models/mobs_pumba.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

5316
models/mobs_pumba.x Normal file

File diff suppressed because it is too large Load Diff

BIN
models/mobs_rat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

699
models/mobs_rat.x Normal file
View File

@ -0,0 +1,699 @@
xof 0303txt 0032
Frame Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000,
0.000000, 1.000000,-0.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
Frame Cube_004 {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000,
0.000000, 0.000000,-0.000000, 1.000000;;
}
Mesh { //Cube_005 Mesh
176;
0.336296; 1.101631; 1.340231;,
1.524099; 1.101631; 1.348138;,
1.516191; 1.101631; 2.535941;,
0.328389; 1.101631; 2.528034;,
0.328389; 1.101631; 2.528034;,
0.336296; 1.101631; 1.340231;,
0.336296; 1.101631; 1.340231;,
0.328389; 1.101631; 2.528034;,
1.524099; 1.101631; 1.348138;,
1.516191; 1.101631; 2.535941;,
1.516191; 1.101631; 2.535941;,
1.524099; 1.101631; 1.348138;,
1.516191; 1.101631; 2.535941;,
0.328389; 1.101631; 2.528034;,
0.328389; 1.101631; 2.528034;,
1.516191; 1.101631; 2.535941;,
0.336296; 1.101631; 1.340231;,
1.524099; 1.101631; 1.348138;,
1.524099; 1.101631; 1.348138;,
0.336296; 1.101631; 1.340231;,
-1.564649; 0.817637; 1.334045;,
-1.564649; 1.101631; 1.334045;,
-1.596119; 1.101631; 2.521457;,
-1.596119; 0.817637; 2.521457;,
-1.564649; 1.101631; 1.334045;,
-0.377237; 1.101631; 1.365515;,
-0.408707; 1.101631; 2.552927;,
-1.596119; 1.101631; 2.521457;,
-0.377237; 1.101631; 1.365515;,
-0.377237; 0.817638; 1.365515;,
-0.408707; 0.817638; 2.552928;,
-0.408707; 1.101631; 2.552927;,
-0.377237; 0.817638; 1.365515;,
-1.564649; 0.817637; 1.334045;,
-1.596119; 0.817637; 2.521457;,
-0.408707; 0.817638; 2.552928;,
-0.377237; 0.817638; 1.365515;,
-0.377237; 1.101631; 1.365515;,
-1.564649; 1.101631; 1.334045;,
-1.564649; 0.817637; 1.334045;,
-1.596119; 0.817637; 2.521457;,
-1.596119; 1.101631; 2.521457;,
-0.408707; 1.101631; 2.552927;,
-0.408707; 0.817638; 2.552928;,
0.336296; 0.817638; 1.340231;,
0.336296; 1.101631; 1.340231;,
0.328389; 1.101631; 2.528034;,
0.328389; 0.817638; 2.528034;,
1.524099; 1.101631; 1.348138;,
1.524099; 0.817637; 1.348139;,
1.516192; 0.817637; 2.535942;,
1.516191; 1.101631; 2.535941;,
1.524099; 0.817637; 1.348139;,
0.336296; 0.817638; 1.340231;,
0.328389; 0.817638; 2.528034;,
1.516192; 0.817637; 2.535942;,
1.524099; 0.817637; 1.348139;,
1.524099; 1.101631; 1.348138;,
0.336296; 1.101631; 1.340231;,
0.336296; 0.817638; 1.340231;,
0.328389; 0.817638; 2.528034;,
0.328389; 1.101631; 2.528034;,
1.516191; 1.101631; 2.535941;,
1.516192; 0.817637; 2.535942;,
-0.117394;-5.732621; 0.182654;,
-0.186090;-2.477838; 0.265415;,
-0.186090;-2.477838; 0.668304;,
-0.117394;-5.732621; 0.448150;,
-0.186090;-2.477838; 0.265415;,
0.216799;-2.477838; 0.265415;,
0.216799;-2.477838; 0.668304;,
-0.186090;-2.477838; 0.668304;,
0.216799;-2.477838; 0.265415;,
0.148102;-5.732621; 0.182654;,
0.148102;-5.732621; 0.448150;,
0.216799;-2.477838; 0.668304;,
0.148102;-5.732621; 0.182654;,
-0.117394;-5.732621; 0.182654;,
-0.117394;-5.732621; 0.448150;,
0.148102;-5.732621; 0.448150;,
0.148102;-5.732621; 0.182654;,
0.216799;-2.477838; 0.265415;,
-0.186090;-2.477838; 0.265415;,
-0.117394;-5.732621; 0.182654;,
-0.117394;-5.732621; 0.448150;,
-0.186090;-2.477838; 0.668304;,
0.216799;-2.477838; 0.668304;,
0.148102;-5.732621; 0.448150;,
-0.933130;-2.573576; 0.130200;,
-0.933130; 0.667430; 0.130200;,
-0.933130; 0.667430; 2.038438;,
-0.933130;-2.573576; 2.038438;,
-0.933130; 0.667430; 0.130200;,
0.963839; 0.667430; 0.130200;,
0.963839; 0.667430; 2.038438;,
-0.933130; 0.667430; 2.038438;,
0.963839; 0.667430; 0.130200;,
0.963839;-2.573576; 0.130200;,
0.963839;-2.573576; 2.038438;,
0.963839; 0.667430; 2.038438;,
0.963839;-2.573576; 0.130200;,
-0.933130;-2.573576; 0.130200;,
-0.933130;-2.573576; 2.038438;,
0.963839;-2.573576; 2.038438;,
0.963839;-2.573576; 0.130200;,
0.963839; 0.667430; 0.130200;,
-0.933130; 0.667430; 0.130200;,
-0.933130;-2.573576; 0.130200;,
-0.933130;-2.573576; 2.038438;,
-0.933130; 0.667430; 2.038438;,
0.963839; 0.667430; 2.038438;,
0.963839;-2.573576; 2.038438;,
-0.694354; 0.619175; 0.175005;,
-0.469990; 2.744857; 0.240792;,
-0.469990; 2.744857; 1.874725;,
-0.694354; 0.619175; 1.814122;,
0.015354; 2.744857; 0.240792;,
0.500698; 2.744857; 0.240792;,
0.500698; 2.744857; 1.874725;,
0.015354; 2.744857; 1.874725;,
0.500698; 2.744857; 0.240792;,
0.725062; 0.619175; 0.175005;,
0.725062; 0.619175; 1.814122;,
0.500698; 2.744857; 1.874725;,
0.015354; 0.619175; 0.175005;,
-0.694354; 0.619175; 0.175005;,
-0.694354; 0.619175; 1.814122;,
0.015354; 0.619175; 1.814122;,
0.725062; 0.619175; 0.175005;,
0.500698; 2.744857; 0.240792;,
0.015354; 2.744857; 0.240792;,
0.015354; 0.619175; 0.175005;,
-0.694354; 0.619175; 1.814122;,
-0.469990; 2.744857; 1.874725;,
0.015354; 2.744857; 1.874725;,
0.015354; 0.619175; 1.814122;,
-0.281961; 2.574486; 0.745273;,
-0.281961; 3.169116; 0.745273;,
-0.281961; 3.169116; 1.339903;,
-0.281961; 2.574486; 1.339903;,
-0.281961; 3.169116; 0.745273;,
0.312669; 3.169116; 0.745273;,
0.312669; 3.169116; 1.339903;,
-0.281961; 3.169116; 1.339903;,
0.312669; 3.169116; 0.745273;,
0.312669; 2.574486; 0.745273;,
0.312669; 2.574486; 1.339903;,
0.312669; 3.169116; 1.339903;,
0.312669; 2.574486; 0.745273;,
-0.281961; 2.574486; 0.745273;,
-0.281961; 2.574486; 1.339903;,
0.312669; 2.574486; 1.339903;,
0.312669; 2.574486; 0.745273;,
0.312669; 3.169116; 0.745273;,
-0.281961; 3.169116; 0.745273;,
-0.281961; 2.574486; 0.745273;,
-0.281961; 2.574486; 1.339903;,
-0.281961; 3.169116; 1.339903;,
0.312669; 3.169116; 1.339903;,
0.312669; 2.574486; 1.339903;,
-0.469990; 2.744857; 0.240792;,
0.015354; 2.744857; 0.240792;,
0.015354; 2.744857; 1.874725;,
-0.469990; 2.744857; 1.874725;,
0.725062; 0.619175; 0.175005;,
0.015354; 0.619175; 0.175005;,
0.015354; 0.619175; 1.814122;,
0.725062; 0.619175; 1.814122;,
0.015354; 0.619175; 0.175005;,
0.015354; 2.744857; 0.240792;,
-0.469990; 2.744857; 0.240792;,
-0.694354; 0.619175; 0.175005;,
0.015354; 0.619175; 1.814122;,
0.015354; 2.744857; 1.874725;,
0.500698; 2.744857; 1.874725;,
0.725062; 0.619175; 1.814122;;
44;
4;0;1;2;3;,
4;4;5;6;7;,
4;8;9;10;11;,
4;12;13;14;15;,
4;16;17;18;19;,
4;20;21;22;23;,
4;24;25;26;27;,
4;28;29;30;31;,
4;32;33;34;35;,
4;36;37;38;39;,
4;40;41;42;43;,
4;44;45;46;47;,
4;48;49;50;51;,
4;52;53;54;55;,
4;56;57;58;59;,
4;60;61;62;63;,
4;64;65;66;67;,
4;68;69;70;71;,
4;72;73;74;75;,
4;76;77;78;79;,
4;80;81;82;83;,
4;84;85;86;87;,
4;88;89;90;91;,
4;92;93;94;95;,
4;96;97;98;99;,
4;100;101;102;103;,
4;104;105;106;107;,
4;108;109;110;111;,
4;112;113;114;115;,
4;116;117;118;119;,
4;120;121;122;123;,
4;124;125;126;127;,
4;128;129;130;131;,
4;132;133;134;135;,
4;136;137;138;139;,
4;140;141;142;143;,
4;144;145;146;147;,
4;148;149;150;151;,
4;152;153;154;155;,
4;156;157;158;159;,
4;160;161;162;163;,
4;164;165;166;167;,
4;168;169;170;171;,
4;172;173;174;175;;
MeshNormals { //Cube_005 Normals
176;
0.000000; 1.000000; 0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
0.000000; 0.000000; 0.000000;,
-0.999649; 0.000000;-0.026494;,
-0.999649; 0.000000;-0.026494;,
-0.999649; 0.000000;-0.026494;,
-0.999649; 0.000000;-0.026494;,
-0.000000; 1.000000; 0.000000;,
-0.000000; 1.000000; 0.000000;,
-0.000000; 1.000000; 0.000000;,
-0.000000; 1.000000; 0.000000;,
0.999649; 0.000001; 0.026494;,
0.999649; 0.000001; 0.026494;,
0.999649; 0.000001; 0.026494;,
0.999649; 0.000001; 0.026494;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.026494; 0.000000;-0.999649;,
0.026494; 0.000000;-0.999649;,
0.026494; 0.000000;-0.999649;,
0.026494; 0.000000;-0.999649;,
-0.026494; 0.000000; 0.999649;,
-0.026494; 0.000000; 0.999649;,
-0.026494; 0.000000; 0.999649;,
-0.026494; 0.000000; 0.999649;,
-0.999978;-0.000000;-0.006657;,
-0.999978;-0.000000;-0.006657;,
-0.999978;-0.000000;-0.006657;,
-0.999978;-0.000000;-0.006657;,
0.999978; 0.000001; 0.006657;,
0.999978; 0.000001; 0.006657;,
0.999978; 0.000001; 0.006657;,
0.999978; 0.000001; 0.006657;,
-0.000000;-1.000000;-0.000000;,
-0.000000;-1.000000;-0.000000;,
-0.000000;-1.000000;-0.000000;,
-0.000000;-1.000000;-0.000000;,
0.006657; 0.000000;-0.999978;,
0.006657; 0.000000;-0.999978;,
0.006657; 0.000000;-0.999978;,
0.006657; 0.000000;-0.999978;,
-0.006657; 0.000000; 0.999978;,
-0.006657; 0.000000; 0.999978;,
-0.006657; 0.000000; 0.999978;,
-0.006657; 0.000000; 0.999978;,
-0.999777;-0.021102; 0.000000;,
-0.999777;-0.021102; 0.000000;,
-0.999777;-0.021102; 0.000000;,
-0.999777;-0.021102; 0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.999777;-0.021102; 0.000000;,
0.999777;-0.021102; 0.000000;,
0.999777;-0.021102; 0.000000;,
0.999777;-0.021102; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000; 0.025419;-0.999677;,
0.000000; 0.025419;-0.999677;,
0.000000; 0.025419;-0.999677;,
0.000000; 0.025419;-0.999677;,
0.000000;-0.067486; 0.997720;,
0.000000;-0.067486; 0.997720;,
0.000000;-0.067486; 0.997720;,
0.000000;-0.067486; 0.997720;,
-1.000000; 0.000000; 0.000000;,
-1.000000; 0.000000; 0.000000;,
-1.000000; 0.000000; 0.000000;,
-1.000000; 0.000000; 0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
1.000000; 0.000000;-0.000000;,
1.000000; 0.000000;-0.000000;,
1.000000; 0.000000;-0.000000;,
1.000000; 0.000000;-0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
-0.000000; 0.000000;-1.000000;,
-0.000000; 0.000000;-1.000000;,
-0.000000; 0.000000;-1.000000;,
-0.000000; 0.000000;-1.000000;,
-0.000000; 0.000000; 1.000000;,
-0.000000; 0.000000; 1.000000;,
-0.000000; 0.000000; 1.000000;,
-0.000000; 0.000000; 1.000000;,
-0.994476; 0.104966; 0.000000;,
-0.994476; 0.104966; 0.000000;,
-0.994476; 0.104966; 0.000000;,
-0.994476; 0.104966; 0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.994476; 0.104966; 0.000000;,
0.994476; 0.104966; 0.000000;,
0.994476; 0.104966; 0.000000;,
0.994476; 0.104966; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000; 0.030934;-0.999521;,
0.000000; 0.030934;-0.999521;,
0.000000; 0.030934;-0.999521;,
0.000000; 0.030934;-0.999521;,
0.000000;-0.028498; 0.999594;,
0.000000;-0.028498; 0.999594;,
0.000000;-0.028498; 0.999594;,
0.000000;-0.028498; 0.999594;,
-1.000000; 0.000000; 0.000000;,
-1.000000; 0.000000; 0.000000;,
-1.000000; 0.000000; 0.000000;,
-1.000000; 0.000000; 0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
1.000000; 0.000000;-0.000000;,
1.000000; 0.000000;-0.000000;,
1.000000; 0.000000;-0.000000;,
1.000000; 0.000000;-0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
-0.000000; 0.000000;-1.000000;,
-0.000000; 0.000000;-1.000000;,
-0.000000; 0.000000;-1.000000;,
-0.000000; 0.000000;-1.000000;,
-0.000000; 0.000000; 1.000000;,
-0.000000; 0.000000; 1.000000;,
-0.000000; 0.000000; 1.000000;,
-0.000000; 0.000000; 1.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000; 1.000000;-0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000; 0.030934;-0.999521;,
0.000000; 0.030934;-0.999521;,
0.000000; 0.030934;-0.999521;,
0.000000; 0.030934;-0.999521;,
0.000000;-0.028498; 0.999594;,
0.000000;-0.028498; 0.999594;,
0.000000;-0.028498; 0.999594;,
0.000000;-0.028498; 0.999594;;
44;
4;0;1;2;3;,
4;4;5;6;7;,
4;8;9;10;11;,
4;12;13;14;15;,
4;16;17;18;19;,
4;20;21;22;23;,
4;24;25;26;27;,
4;28;29;30;31;,
4;32;33;34;35;,
4;36;37;38;39;,
4;40;41;42;43;,
4;44;45;46;47;,
4;48;49;50;51;,
4;52;53;54;55;,
4;56;57;58;59;,
4;60;61;62;63;,
4;64;65;66;67;,
4;68;69;70;71;,
4;72;73;74;75;,
4;76;77;78;79;,
4;80;81;82;83;,
4;84;85;86;87;,
4;88;89;90;91;,
4;92;93;94;95;,
4;96;97;98;99;,
4;100;101;102;103;,
4;104;105;106;107;,
4;108;109;110;111;,
4;112;113;114;115;,
4;116;117;118;119;,
4;120;121;122;123;,
4;124;125;126;127;,
4;128;129;130;131;,
4;132;133;134;135;,
4;136;137;138;139;,
4;140;141;142;143;,
4;144;145;146;147;,
4;148;149;150;151;,
4;152;153;154;155;,
4;156;157;158;159;,
4;160;161;162;163;,
4;164;165;166;167;,
4;168;169;170;171;,
4;172;173;174;175;;
} //End of Cube_005 Normals
MeshMaterialList { //Cube_005 Material List
1;
44;
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0;;
Material Material_001 {
0.640000; 0.640000; 0.640000; 1.000000;;
96.078431;
0.500000; 0.500000; 0.500000;;
0.000000; 0.000000; 0.000000;;
}
} //End of Cube_005 Material List
MeshTextureCoords { //Cube_005 UV Coordinates
176;
0.635817; 0.275819;,
0.635817; 0.046728;,
0.864908; 0.046728;,
0.864908; 0.275819;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.864346; 0.986031;,
0.783570; 0.986031;,
0.783570; 0.648180;,
0.864346; 0.648180;,
0.635817; 0.274669;,
0.635817; 0.045578;,
0.864908; 0.045578;,
0.864908; 0.274669;,
0.863901; 0.987104;,
0.783126; 0.987104;,
0.783126; 0.649254;,
0.863901; 0.649254;,
0.991231; 0.987104;,
0.653381; 0.987104;,
0.653381; 0.649254;,
0.991232; 0.649254;,
0.991232; 0.777658;,
0.991232; 0.858433;,
0.653381; 0.858433;,
0.653381; 0.777658;,
0.655529; 0.859063;,
0.655529; 0.778288;,
0.993379; 0.778288;,
0.993379; 0.859063;,
0.335443; 0.861158;,
0.265926; 0.861158;,
0.265926; 0.570397;,
0.335443; 0.570397;,
0.334205; 0.859816;,
0.264688; 0.859816;,
0.264688; 0.569055;,
0.334205; 0.569055;,
0.444367; 0.858474;,
0.153606; 0.858474;,
0.153606; 0.567713;,
0.444367; 0.567713;,
0.333996; 0.859816;,
0.264479; 0.859816;,
0.264479; 0.569055;,
0.333996; 0.569055;,
0.264228; 0.568595;,
0.333745; 0.568595;,
0.333745; 0.859357;,
0.264228; 0.859357;,
0.910309; 0.067094;,
0.990888; 0.067068;,
0.991634; 0.077574;,
0.911094; 0.077574;,
0.910309; 0.024149;,
0.921538; 0.024149;,
0.921538; 0.035379;,
0.910309; 0.035379;,
0.990708; 0.067037;,
0.910309; 0.067041;,
0.910896; 0.056534;,
0.991418; 0.056534;,
0.928966; 0.035379;,
0.921565; 0.035379;,
0.921565; 0.027979;,
0.928966; 0.027979;,
0.910595; 0.035408;,
0.990869; 0.035406;,
0.990583; 0.045937;,
0.910309; 0.045939;,
0.910597; 0.045966;,
0.990951; 0.045966;,
0.990662; 0.056507;,
0.910309; 0.056507;,
0.461795; 0.725720;,
0.002369; 0.725720;,
0.002369; 0.455219;,
0.461795; 0.455219;,
0.728915; 0.630399;,
0.460011; 0.630399;,
0.460011; 0.359898;,
0.728915; 0.359898;,
0.459622; 0.999805;,
0.000195; 0.999805;,
0.000195; 0.729304;,
0.459622; 0.729304;,
0.990155; 1.001469;,
0.721251; 1.001469;,
0.721251; 0.730968;,
0.990155; 0.730968;,
0.000987; 0.351616;,
0.460413; 0.351616;,
0.460413; 0.620520;,
0.000987; 0.620520;,
0.728915; 0.540378;,
0.728915; 0.999805;,
0.460011; 0.999805;,
0.460011; 0.540378;,
0.006594; 0.353635;,
0.507556; 0.369053;,
0.507556; 0.596553;,
0.006594; 0.737794;,
0.752538; 0.533913;,
0.752538; 0.647662;,
0.525038; 0.647662;,
0.525038; 0.533913;,
0.509703; 0.731028;,
0.008741; 0.746446;,
0.008741; 0.362287;,
0.509703; 0.503529;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.003201; 0.349292;,
0.501634; 0.401876;,
0.501634; 0.515626;,
0.003201; 0.515626;,
0.529333; 0.186216;,
0.171158; 0.150188;,
0.171083; 0.071516;,
0.529224; 0.071176;,
0.636995; 0.428681;,
0.636995; 0.545208;,
0.520468; 0.545208;,
0.520468; 0.428681;,
0.340480; 0.361873;,
0.452832; 0.361873;,
0.452832; 0.474224;,
0.340480; 0.474224;,
0.453577; 0.475130;,
0.341226; 0.475130;,
0.341226; 0.362779;,
0.453577; 0.362779;,
0.453737; 0.472732;,
0.341386; 0.472732;,
0.341386; 0.360381;,
0.453737; 0.360381;,
0.454483; 0.362033;,
0.454483; 0.474384;,
0.342132; 0.474384;,
0.342132; 0.362033;,
0.342132; 0.472732;,
0.342132; 0.360381;,
0.454483; 0.360381;,
0.454483; 0.472732;,
0.752538; 0.420163;,
0.752538; 0.533913;,
0.525038; 0.533913;,
0.525038; 0.420163;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 1.000000;,
0.003201; 0.515626;,
0.501634; 0.515626;,
0.501634; 0.629375;,
0.003201; 0.681959;,
0.529223; 0.070318;,
0.171082; 0.070658;,
0.171157; 0.149330;,
0.529332; 0.185358;;
} //End of Cube_005 UV Coordinates
} //End of Cube_005 Mesh
} //End of Cube_004
} //End of Root Frame

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

8573
models/mobs_sand_monster.x Executable file

File diff suppressed because it is too large Load Diff

BIN
models/mobs_sheep.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

7169
models/mobs_sheep.x Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

4592
models/mobs_sheep_shaved.x Normal file

File diff suppressed because it is too large Load Diff

BIN
models/mobs_spider.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

6110
models/mobs_spider.x Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

2753
models/mobs_stone_monster.x Executable file

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

4009
models/mobs_tree_monster.x Executable file

File diff suppressed because it is too large Load Diff

BIN
models/zmobs_lava_flan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

3506
models/zmobs_lava_flan.x Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

2999
models/zmobs_mese_monster.x Normal file

File diff suppressed because it is too large Load Diff

47
oerkki.lua Normal file
View File

@ -0,0 +1,47 @@
-- Oerkki
mobs:register_mob("mobs:oerkki", {
type = "monster",
hp_min = 8,
hp_max = 34,
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
visual = "mesh",
mesh = "mobs_oerkki.x",
textures = {"mobs_oerkki.png"},
visual_size = {x=5, y=5},
makes_footstep_sound = false,
view_range = 15,
walk_velocity = 1,
run_velocity = 3,
damage = 4,
drops = {
{name = "default:obsidian",
chance = 3,
min = 1,
max = 2,},
},
armor = 100,
drawtype = "front",
light_resistant = true,
water_damage = 1,
lava_damage = 1,
light_damage = 0,
attack_type = "dogfight",
animation = {
stand_start = 0,
stand_end = 23,
walk_start = 24,
walk_end = 36,
run_start = 37,
run_end = 49,
punch_start = 37,
punch_end = 49,
speed_normal = 15,
speed_run = 15,
},
jump = true,
step = 0.5,
blood_texture = "mobs_blood.png",
})
mobs:register_spawn("mobs:oerkki", {"default:stone"}, 2, -1, 7000, 1, -10)

62
rat.lua Normal file
View File

@ -0,0 +1,62 @@
-- Rat
mobs:register_mob("mobs:rat", {
type = "animal",
hp_min = 1,
hp_max = 4, -- 1
collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.2, 0.2},
visual = "mesh",
mesh = "mobs_rat.x",
textures = {"mobs_rat.png"},
makes_footstep_sound = false,
walk_velocity = 1,
armor = 200,
drops = {},
drawtype = "front",
water_damage = 0,
lava_damage = 1,
light_damage = 0,
jump = true,
step = 1,
passive = true,
on_rightclick = function(self, clicker)
if clicker:is_player() and clicker:get_inventory() then
clicker:get_inventory():add_item("main", "mobs:rat")
self.object:remove()
end
end,
})
mobs:register_spawn("mobs:rat", {"default:stone"}, 20, -1, 7000, 1, 31000)
-- Can Right-click Rat to Pick Up
minetest.register_craftitem("mobs:rat", {
description = "Rat",
inventory_image = "mobs_rat_inventory.png",
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.above then
minetest.env:add_entity(pointed_thing.above, "mobs:rat")
itemstack:take_item()
end
return itemstack
end,
})
-- Cooked Rat, yummy!
minetest.register_craftitem("mobs:rat_cooked", {
description = "Cooked Rat",
inventory_image = "mobs_cooked_rat.png",
on_use = minetest.item_eat(3),
})
minetest.register_craft({
type = "cooking",
output = "mobs:rat_cooked",
recipe = "mobs:rat",
cooktime = 5,
})

47
sandmonster.lua Normal file
View File

@ -0,0 +1,47 @@
-- Sand Monster
mobs:register_mob("mobs:sand_monster", {
type = "monster",
hp_min = 4,
hp_max = 20,
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
visual = "mesh",
mesh = "mobs_sand_monster.x",
textures = {"mobs_sand_monster.png"},
visual_size = {x=8,y=8},
makes_footstep_sound = true,
view_range = 15,
walk_velocity = 1.5,
run_velocity = 4,
damage = 1,
drops = {
{name = "default:desert_sand",
chance = 1,
min = 3,
max = 5,},
},
light_resistant = true,
armor = 100,
drawtype = "front",
water_damage = 3,
lava_damage = 1,
light_damage = 0,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 15,
stand_start = 0,
stand_end = 39,
walk_start = 41,
walk_end = 72,
run_start = 74,
run_end = 105,
punch_start = 74,
punch_end = 105,
},
jump = true,
step = 0.5,
blood_texture = "mobs_blood.png",
})
mobs:register_spawn("mobs:sand_monster", {"default:desert_sand", "default:sand"}, 20, -1, 7000, 1, 31000)

73
sheep.lua Normal file
View File

@ -0,0 +1,73 @@
-- Sheep
mobs:register_mob("mobs:sheep", {
type = "animal",
hp_min = 8,
hp_max = 10,
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4},
textures = {"mobs_sheep.png"},
visual = "mesh",
mesh = "mobs_sheep.x",
makes_footstep_sound = true,
walk_velocity = 1,
armor = 200,
drops = {
{name = "mobs:meat_raw",
chance = 1,
min = 2,
max = 3,},
},
drawtype = "front",
water_damage = 1,
lava_damage = 5,
light_damage = 0,
sounds = {
random = "mobs_sheep",
},
animation = {
speed_normal = 15,
stand_start = 0,
stand_end = 80,
walk_start = 81,
walk_end = 100,
},
jump = true,
step = 1,
blood_texture = "mobs_blood.png",
passive = true,
follow = "farming:wheat",
view_range = 5,
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
if item:get_name() == "farming:wheat" then
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
self.food = (self.food or 0) + 1
if self.food >= 8 then
self.food = 0
self.naked = false
self.tamed = true
self.object:set_properties({
textures = {"mobs_sheep.png"},
mesh = "mobs_sheep.x",
})
minetest.sound_play("mobs_sheep", {object = self.object,gain = 1.0,max_hear_distance = 32,loop = false,})
end
return
end
if clicker:get_inventory() and not self.naked then
self.naked = true
if minetest.registered_items["wool:white"] then
clicker:get_inventory():add_item("main", ItemStack("wool:white "..math.random(1,3)))
end
self.object:set_properties({
textures = {"mobs_sheep_shaved.png"},
mesh = "mobs_sheep_shaved.x",
})
end
end,
})
mobs:register_spawn("mobs:sheep", {"default:dirt_with_grass", "ethereal:green_dirt_top"}, 20, 8, 9000, 1, 31000)

BIN
sounds/mobs_cow.ogg Normal file

Binary file not shown.

BIN
sounds/mobs_fireball.ogg Normal file

Binary file not shown.

BIN
sounds/mobs_pig.ogg Normal file

Binary file not shown.

BIN
sounds/mobs_sheep.ogg Normal file

Binary file not shown.

89
spider.lua Normal file
View File

@ -0,0 +1,89 @@
-- Glowtest Spider
mobs:register_mob("mobs:spider", {
type = "monster",
hp_min = 20,
hp_max = 40,
collisionbox = {-0.9, -0.01, -0.7, 0.7, 0.6, 0.7},
textures = {"mobs_spider.png"},
visual_size = {x=7,y=7},
visual = "mesh",
mesh = "mobs_spider.x",
makes_footstep_sound = true,
view_range = 15,
walk_velocity = 1,
run_velocity = 3,
armor = 200,
damage = 3,
drops = {
{name = "farming:string",
chance = 1,
min = 1,
max = 5,},
{name = "ethereal:crystal_spike",
chance = 15,
min = 1,
max = 2,},
},
light_resistant = false,
drawtype = "front",
water_damage = 5,
lava_damage = 5,
light_damage = 0,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 15,
stand_start = 1,
stand_end = 1,
walk_start = 20,
walk_end = 40,
run_start = 20,
run_end = 40,
punch_start = 50,
punch_end = 90,
},
jump = true,
sounds = {},
step = 1,
})
mobs:register_spawn("mobs:spider", {"default:desert_stone", "ethereal:crystal_topped_dirt"}, 5, -1, 7000, 1, 71)
-- Ethereal crystal spike compatibility
if not minetest.get_modpath("ethereal") then
minetest.register_alias("ethereal:crystal_spike", "default:sandstone")
end
-- Cobweb
minetest.register_node("mobs:cobweb", {
description = "Cobweb",
drawtype = "plantlike",
visual_scale = 1.1,
tiles = {"mobs_cobweb.png"},
inventory_image = "mobs_cobweb.png",
paramtype = "light",
sunlight_propagates = true,
liquid_viscosity = 11,
liquidtype = "source",
liquid_alternative_flowing = "mobs:cobweb",
liquid_alternative_source = "mobs:cobweb",
liquid_renewable = false,
liquid_range = 0,
walkable = false,
groups = {snappy=1,liquid=3},
drop = "farming:cotton",
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_craft({
output = "mobs:cobweb",
recipe = {
{"farming:string", "farming:string", "farming:string"},
{"farming:string", "farming:string", "farming:string"},
{"farming:string", "farming:string", "farming:string"},
}
})

55
stonemonster.lua Normal file
View File

@ -0,0 +1,55 @@
-- Stone Monster
mobs:register_mob("mobs:stone_monster", {
type = "monster",
hp_min = 12,
hp_max = 35,
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
visual = "mesh",
mesh = "mobs_stone_monster.x",
textures = {"mobs_stone_monster.png"},
visual_size = {x=3, y=2.6},
makes_footstep_sound = true,
view_range = 10,
walk_velocity = 0.5,
run_velocity = 2,
damage = 3,
drops = {
{name = "default:torch",
chance = 2,
min = 3,
max = 5,},
{name = "default:iron_lump",
chance=5,
min=1,
max=2,},
{name = "default:coal_lump",
chance=3,
min=1,
max=3,},
},
light_resistant = true,
armor = 80,
drawtype = "front",
water_damage = 0,
lava_damage = 0,
light_damage = 0,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 15,
stand_start = 0,
stand_end = 14,
walk_start = 15,
walk_end = 38,
run_start = 40,
run_end = 63,
punch_start = 40,
punch_end = 63,
},
jump = true,
step = 0.5,
blood_texture = "mobs_blood.png",
})
mobs:register_spawn("mobs:stone_monster", {"default:stone"}, 3, -1, 7000, 1, 0)

BIN
textures/mobs_bee_inv.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 934 B

BIN
textures/mobs_beehive.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

BIN
textures/mobs_blood.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

BIN
textures/mobs_cheese.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

BIN
textures/mobs_cobweb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
textures/mobs_fireball.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

BIN
textures/mobs_honey_inv.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

BIN
textures/mobs_meat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

BIN
textures/mobs_meat_raw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

BIN
textures/mobs_pork_raw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

BIN
textures/zmobs_lava_orb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

64
treemonster.lua Normal file
View File

@ -0,0 +1,64 @@
-- Tree Monster (or Tree Gollum as I like to call it)
mobs:register_mob("mobs:tree_monster", {
type = "monster",
hp_min = 7,
hp_max = 33,
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
visual = "mesh",
mesh = "mobs_tree_monster.x",
textures = {"mobs_tree_monster.png"},
visual_size = {x=4.5,y=4.5},
makes_footstep_sound = true,
view_range = 15,
walk_velocity = 1,
run_velocity = 3,
damage = 2,
drops = {
{name = "ethereal:tree_sapling",
chance = 3,
min = 1,
max = 2,},
{name = "ethereal:jungle_tree_sapling",
chance = 3,
min = 1,
max = 2,},
{name = "default:apple",
chance = 2,
min = 1,
max=3,
},
},
light_resistant = true,
armor = 100,
drawtype = "front",
water_damage = 1,
lava_damage = 5,
light_damage = 2,
disable_fall_damage = true,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 15,
stand_start = 0,
stand_end = 24,
walk_start = 25,
walk_end = 47,
run_start = 48,
run_end = 62,
punch_start = 48,
punch_end = 62,
},
step = 0.5,
jump = true,
blood_texture = "default_wood.png",
})
mobs:register_spawn("mobs:tree_monster", {"default:leaves", "default:jungleleaves"}, 3, -1, 7000, 1, 31000)
-- Ethereal sapling compatibility
if not minetest.get_modpath("ethereal") then
minetest.register_alias("ethereal:tree_sapling", "default:sapling")
minetest.register_alias("ethereal:jungle_tree_sapling", "default:junglesapling")
end

79
warthog.lua Normal file
View File

@ -0,0 +1,79 @@
-- Warthog
mobs:register_mob("mobs:pumba", {
type = "animal",
hp_min = 5,
hp_max = 15,
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4},
textures = {"mobs_pumba.png"},
visual = "mesh",
mesh = "mobs_pumba.x",
makes_footstep_sound = true,
walk_velocity = 2,
armor = 200,
drops = {
{name = "mobs:pork_raw",
chance = 1,
min = 2,
max = 3,},
},
drawtype = "front",
water_damage = 1,
lava_damage = 5,
light_damage = 0,
sounds = {
random = "mobs_pig",
},
animation = {
speed_normal = 15,
stand_start = 25,
stand_end = 55,
walk_start = 70,
walk_end = 100,
},
follow = "farming:wheat",
view_range = 5,
jump = true,
step = 1,
passive = true,
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
if item:get_name() == "farming:wheat" then
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
self.food = (self.food or 0) + 1
if self.food >= 8 then
self.food = 0
self.tamed = true
minetest.sound_play("mobs_pig", {object = self.object,gain = 1.0,max_hear_distance = 32,loop = false,})
end
return
end
end,
})
mobs:register_spawn("mobs:pumba", {"ethereal:mushroom_dirt"}, 20, 8, 9000, 1, 31000)
-- Porkchops
minetest.register_craftitem("mobs:pork_raw", {
description = "Raw Porkchop",
inventory_image = "mobs_pork_raw.png",
on_use = minetest.item_eat(4),
})
minetest.register_craftitem("mobs:pork_cooked", {
description = "Cooked Porkchop",
inventory_image = "mobs_pork_cooked.png",
on_use = minetest.item_eat(8),
})
minetest.register_craft({
type = "cooking",
output = "mobs:pork_cooked",
recipe = "mobs:pork_raw",
cooktime = 5,
})