Page 8 of 10

Re: [Modpack] Creatures MOB-Engine [2.3] [cme]

PostPosted: Mon Feb 15, 2016 16:33
by cHyper
What about spawners in dungeons for Oerrki's?

Re: [Modpack] Creatures MOB-Engine [2.3] [cme]

PostPosted: Mon Feb 15, 2016 16:53
by cHyper
BlockMen wrote:
cHyper wrote:What about the spawn-rate of the new Oerrki mob?
I have not seen any of this mob, only in creative mode with eggs.


Seems I have messed up spawn times, plz test with this change: https://github.com/BlockMen/cme/commit/ ... b79563d675


I've seen an Oerrki mob, but they are very rare and do not drop something when they die!

Image
Image

Re: [Modpack] Creatures MOB-Engine [2.3] [cme]

PostPosted: Mon Feb 15, 2016 17:19
by SaKeL
Big spider and when you kill him, he will multiply to number of small spiders >:)

Re: [Modpack] Creatures MOB-Engine [2.3] [cme]

PostPosted: Mon Feb 15, 2016 17:26
by cHyper
SaKeL wrote:Big spider and when you kill him, he will multiply to number of small spiders >:)


+1

Re: [Modpack] Creatures MOB-Engine [2.3] [cme]

PostPosted: Mon Feb 15, 2016 21:04
by Dragonop
Afaik it is "Oerkki", not "Oerrki". Other than that, it looks good!

Creatures MOB-Engine 2.3.1

PostPosted: Wed Feb 17, 2016 09:46
by BlockMen
Update Version 2.3.1


Changelog:
- Added colored sheep (Sheep spawn randomly with white, grey, brown or black wool)
- Fixed Oerrki spawning times (spawns on night as intended); thx to cHyper for reporting

Image


-----
Dragonop wrote:Afaik it is "Oerkki", not "Oerrki". Other than that, it looks good!

Oh, hmm. IMO Oerrki sounds better than Oerkki, idk whether is should change it :\

SaKeL wrote:Big spider and when you kill him, he will multiply to number of small spiders >:)

Yes, sounds good.

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Wed Feb 17, 2016 11:45
by iska
Oerkki comes from Örkki (nickname for hirviö or monster) in finnish language, I think you should keep the original name.

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Fri Feb 26, 2016 06:33
by benrob0329
So who's going to take up development? I'd like to but I don't know much Lua...

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Fri Feb 26, 2016 11:24
by SaKeL
i will definitely fork this and also fix the pyramids mod with this api... but it will be in my free time, so dont expect any daily commits :)

https://bitbucket.org/minetest_gamers/cme/overview

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Fri Mar 04, 2016 16:58
by cHyper
SaKeL wrote:i will definitely fork this and also fix the pyramids mod with this api... but it will be in my free time, so dont expect any daily commits :)

https://bitbucket.org/minetest_gamers/cme/overview


Fine that this mod will be continued. ..

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Fri Mar 04, 2016 17:27
by Martin_Devil
cHyper wrote:
SaKeL wrote:i will definitely fork this and also fix the pyramids mod with this api... but it will be in my free time, so dont expect any daily commits :)

https://bitbucket.org/minetest_gamers/cme/overview


Fine that this mod will be continued. ..

Or, no :)
https://bitbucket.org/minetest_gamers/cme/commits/all

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Fri Mar 04, 2016 20:11
by SaKeL
i ended up using mobs redo API since its more powerful right now and merged pyramids mod to my spawners mod - recreating the mummy mob

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Wed Mar 16, 2016 04:14
by Sokomine
BlockMen wrote:- Added colored sheep (Sheep spawn randomly with white, grey, brown or black wool)

That's very nice. Having sheep come in only one color was always a bit boring about them. They look very fine in those colors they now have.

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Sun Mar 20, 2016 01:05
by TailsTheFoxDoes MT
Sokomine wrote:
BlockMen wrote:- Added colored sheep (Sheep spawn randomly with white, grey, brown or black wool)

That's very nice. Having sheep come in only one color was always a bit boring about them. They look very fine in those colors they now have.

Next: Energon Cubas, weird name, but theyre like slimes but kill you instantly and spawn in the desert biome.

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Sun Mar 20, 2016 01:16
by SaKeL
we miss someone to spawn in snow biomes ...it feels so empty there

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Wed May 04, 2016 13:31
by swordpaint12
SaKeL wrote:we miss someone to spawn in snow biomes ...it feels so empty there

Oh, maybe foxes?

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Mon May 16, 2016 21:45
by Emon
Italian version available here.

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Fri Jul 08, 2016 13:45
by BrunoMine
which is the easiest and correct way to make a mob walk in one direction? (Can show me a piece of LUA coding?)

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Sun Jul 24, 2016 13:00
by enigma
I discovered a runtime error. As far as I know it's only occurred once during the considerable amount of time I've been using this mod.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
2016-07-22 17:31:09: ERROR[Main]: ServerError: Lua: Runtime error from mod 'sheep' in callback luaentity_Step(): {location of minetest directory}/.minetest/mods/cme/creatures/functions.lua:483: attempt to index field 'last_node' (a nil value)
2016-07-22 17:31:09: ERROR[Main]: stack traceback:
2016-07-22 17:31:09: ERROR[Main]:    {location of minetest directory}/.minetest/mods/cme/creatures/functions.lua:483: in function 'on_step'
2016-07-22 17:31:09: ERROR[Main]:    {location of minetest directory}
/.minetest/mods/cme/creatures/register.lua:216: in function <{location of minetest directory}/.minetest/mods/cme/creatures/register.lua:211>

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Mon Aug 15, 2016 18:04
by cHyper
Where can I download this version included the new mob skeleton?

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Mon Sep 26, 2016 19:15
by PlanetKiller
Thanks, I'll be looking over this and might use it in a game. Might even try adding some of my own mobs to it.

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Wed Sep 28, 2016 18:06
by azekill_DIABLO
cHyper wrote:Where can I download this version included the new mob skeleton?

which one?

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Tue Oct 04, 2016 17:30
by ParaklataChotou
Greeting BlockMan. I'm enjoying your mob. Your mobs looks so real.
I'm testing on my server. There are few error who causes crashing the server sometimes. If you could debug it, I would be grateful.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
2016-10-04 12:52:08: ERROR[Main]: ServerError: Lua: Runtime error from mod 'sheep' in callback luaentity_Step(): ...14-b11720a-win64\bin\..\mods\cme\creatures/functions.lua:483: attempt to index field 'last_node' (a nil value)
2016-10-04 12:52:08: ERROR[Main]: stack traceback:
2016-10-04 12:52:08: ERROR[Main]:    ...14-b11720a-win64\bin\..\mods\cme\creatures/functions.lua:483: in function 'on_step'
2016-10-04 12:52:08: ERROR[Main]:    ....14-b11720a-win64\bin\..\mods\cme\creatures/register.lua:216: in function <....14-b11720a-win64\bin\..\mods\cme\creatures/register.lua:211>

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Tue Oct 04, 2016 17:35
by BrunoMine
ParaklataChotou wrote:Greeting BlockMan. I'm enjoying your mob. Your mobs looks so real.
I'm testing on my server. There are few error who causes crashing the server sometimes. If you could debug it, I would be grateful.

Blockman not work more with minetest. Am sorry.

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Sat Oct 08, 2016 20:19
by JoshMars
So.... no fix for the sheep crap?

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Sat Oct 08, 2016 20:36
by BrunoMine
JoshMars wrote:So.... no fix for the sheep crap?

Exactly
I advise check for similar mods

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Sat Oct 08, 2016 21:26
by JoshMars
Can anyone successfully reproduce the bug?

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Fri Oct 14, 2016 05:00
by theblackwolf
I liked this mod I have used it in my game as well. I love the cloak creature i think its really cool! ^.^

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Fri Oct 14, 2016 13:56
by ParaklataChotou
Now I know how to fix it. I changed the spawn areas when the creatures spawns. Go to int.*lua and change the spawning areas for oerkii and zombies. I changed they spawn on gravel, and sheeps and chickens spawn less times

For chicken:
Int.lua:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
dofile(core.get_modpath("chicken") .. "/egg.lua")
local function dropEgg(obj)
  local pos = obj:getpos()
  if pos then
    creatures.dropItems(pos, {{"creatures:egg"}})
  end
end

-- Flesh
core.register_craftitem(":creatures:chicken_flesh", {
   description = "Raw Chicken Flesh",
   inventory_image = "creatures_chicken_flesh.png",
   on_use = core.item_eat(1)
})

core.register_craftitem(":creatures:chicken_meat", {
   description = "Chicken Meat",
   inventory_image = "creatures_chicken_meat.png",
   on_use = core.item_eat(3)
})

core.register_craft({
   type = "cooking",
   output = "creatures:chicken_meat",
   recipe = "creatures:chicken_flesh",
})

-- Feather
core.register_craftitem(":creatures:feather", {
   description = "Feather",
   inventory_image = "creatures_feather.png",
})

local def = {
  -- general
  name = "creatures:chicken",
  stats = {
    hp = 5,
    lifetime = 200, -- 5 Minutes
    can_jump = 1,
    can_swim = true,
    can_burn = true,
    can_panic = true,
    has_kockback = true,
    sneaky = true,
  },

  modes = {
    idle = {chance = 0.25, duration = 5, update_yaw = 3},
    idle2 = {chance = 0.69, duration = 0.8},
    pick = {chance = 0.2, duration = 2},
    walk = {chance = 0.2, duration = 5.5, moving_speed = 0.7, update_yaw = 2},
    panic = {moving_speed = 2.1},
    lay_egg = {chance = 0.01, duration = 1},
  },

  model = {
    mesh = "creatures_chicken.b3d",
    textures = {"creatures_chicken.png"},
    collisionbox = {-0.25, -0.01, -0.3, 0.25, 0.45, 0.3},
    rotation = 90.0,
    collide_with_objects = false,
    animations = {
      idle = {start = 0, stop = 1, speed = 10},
      idle2 = {start = 40, stop = 50, speed = 50},
      pick = {start = 88, stop = 134, speed = 50},
      walk = {start = 4, stop = 36, speed = 50},
      -- special modes
      swim = {start = 51, stop = 87, speed = 40},
      panic = {start = 51, stop = 87, speed = 55},
      death = {start = 135, stop = 160, speed = 28, loop = false, duration = 2.12},
    },
  },

  sounds = {
      on_damage = {name = "creatures_chicken_hit", gain = 0.5, distance = 10},
      on_death = {name = "creatures_chicken_hit", gain = 0.5, distance = 10},
      swim = {name = "creatures_splash", gain = 1.0, distance = 10},
      random = {
        idle = {name = "creatures_chicken", gain = 0.9, distance = 12, time_min = 8, time_max = 50},
      },
  },

  spawning = {
    abm_nodes = {
      spawn_on = {"default:dirt_with_grass", "default:dirt"},
    },
    abm_interval = 55,
    abm_chance = 7800,
    max_number = 1,
    number = 1,
    light = {min = 8, max = 15},
    height_limit = {min = 0, max = 150},

    spawn_egg = {
      description = "Chicken Spawn-Egg",
    },
  },

  drops = {
    {"creatures:chicken_flesh"},
    {"creatures:feather", {min = 1, max = 2}, chance = 0.45},
  },

  on_step = function(self, dtime)
    if self.mode == "lay_egg" then
      dropEgg(self.object)
      self.modetimer = 2
    end
  end
}

creatures.register_mob(def)

For Sheeps:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
core.register_tool(":creatures:shears", {
   description = "Shears",
   inventory_image = "creatures_shears.png",
})

core.register_craft({
   output = 'creatures:shears',
   recipe = {
      {'', 'default:steel_ingot'},
      {'default:steel_ingot', 'default:stick'},
   }
})


local function setColor(self)
   if self and self.object then
      local ext = ".png"
      if self.has_wool ~= true then
         ext = ".png^(creatures_sheep_shaved.png^[colorize:" .. self.wool_color:gsub("grey", "gray") .. ":50)"
      end
      self.object:set_properties({textures = {"creatures_sheep.png^creatures_sheep_" .. self.wool_color .. ext}})
   end
end

local function shear(self, drop_count, sound)
   if self.has_wool == true then
      self.has_wool = false
      local pos = self.object:getpos()
      if sound then
         core.sound_play("creatures_shears", {pos = pos, gain = 1, max_hear_distance = 10})
      end

      setColor(self)
      creatures.dropItems(pos, {{"wool:" .. self.wool_color, drop_count}})
   end
end


-- white, grey, brown, black (see wool colors as reference)
local colors = {"white", "grey", "brown", "black"}

local def = {
   name = "creatures:sheep",
   stats = {
      hp = 8,
      lifetime = 300, -- 7,5 Minutes
      can_jump = 1,
      can_swim = true,
      can_burn = true,
      can_panic = true,
      has_falldamage = true,
      has_kockback = true,
   },

   model = {
      mesh = "creatures_sheep.b3d",
      textures = {"creatures_sheep.png^creatures_sheep_white.png"},
      collisionbox = {-0.5, -0.01, -0.55, 0.5, 1.1, 0.55},
      rotation = -90.0,
      animations = {
         idle = {start = 1, stop = 60, speed = 15},
         walk = {start = 81, stop = 101, speed = 18},
         walk_long = {start = 81, stop = 101, speed = 18},
         eat = {start = 107, stop = 170, speed = 12, loop = false},
         follow = {start = 81, stop = 101, speed = 15},
         death = {start = 171, stop = 191, speed = 32, loop = false, duration = 2.52},
      },
   },

   sounds = {
      on_damage = {name = "creatures_sheep", gain = 1.0, distance = 10},
      on_death = {name = "creatures_sheep", gain = 1.0, distance = 10},
      swim = {name = "creatures_splash", gain = 1.0, distance = 10,},
      random = {
         idle = {name = "creatures_sheep", gain = 0.6, distance = 10, time_min = 23},
      },
   },

   modes = {
      idle = {chance = 0.5, duration = 10, update_yaw = 8},
      walk = {chance = 0.14, duration = 4.5, moving_speed = 1.3},
      walk_long = {chance = 0.11, duration = 8, moving_speed = 1.3, update_yaw = 5},
      -- special modes
      follow = {chance = 0, duration = 20, radius = 4, timer = 5, moving_speed = 1, items = {"farming:wheat"}},
      eat = {   chance = 0.25,
         duration = 4,
         nodes = {
            "default:grass_1", "default:grass_2", "default:grass_3",
            "default:grass_4", "default:grass_5", "default:dirt_with_grass"
         }
      },
   },

   drops = function(self)
      local items = {{"creatures:flesh"}}
      if self.has_wool then
         table.insert(items, {"wool:" .. self.wool_color, {min = 1, max = 2}})
      end
      creatures.dropItems(self.object:getpos(), items)
   end,

   spawning = {
      abm_nodes = {
         spawn_on = {"default:dirt_with_grass"},
      },
      abm_interval = 25,
      abm_chance = 7800,
      max_number = 1,
      number = {min = 3, max = 4},
      time_range = {min = 5100, max = 18300},
      light = {min = 10, max = 15},
      height_limit = {min = 0, max = 25},

      spawn_egg = {
         description = "Sheep Spawn-Egg",
         texture = "creatures_egg_sheep.png",
      },

      spawner = {
         description = "Sheep Spawner",
         range = 6,
         player_range = 15,
         number = 4,
      }
   },

   on_punch = function(self, puncher)
      shear(self)
   end,

   get_staticdata = function(self)
      return {
         has_wool = self.has_wool,
         wool_color = self.wool_color,
      }
   end,

   on_activate = function(self, staticdata)
      if self.has_wool == nil then
         self.has_wool = true
      end

      if not self.wool_color then
         self.wool_color =  colors[math.random(1, #colors)]
      end
      -- update fur
      setColor(self)
   end,

   on_rightclick = function(self, clicker)
      local item = clicker:get_wielded_item()
         if item then
            local name = item:get_name()
            if name == "farming:wheat" then
               self.target = clicker
               self.mode = "follow"
               self.modetimer = 0

               if not self.tamed then
                  self.fed_cnt = (self.fed_cnt or 0) + 1
               end

               -- play eat sound?
               item:take_item()
            elseif name == "creatures:shears" and self.has_wool then
               shear(self, math.random(2, 3), true)
               item:add_wear(65535/100)
            end
            if not core.setting_getbool("creative_mode") then
               clicker:set_wielded_item(item)
            end
         end
      return true
   end,

   on_step = function(self, dtime)
      if self.mode == "eat" and self.eat_node then
         self.regrow_wool = true
      end
      if self.last_mode == "eat" and (self.modetimer and self.modetimer == 0) and self.regrow_wool then
         self.has_wool = true
         self.regrow_wool = nil
         setColor(self)
      end
      if self.fed_cnt and self.fed_cnt > 4 then
         self.tamed = true
         self.fed_cnt = nil
      end
   end
}

creatures.register_mob(def)

Zombies:
Int.lua
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local def = {
  -- general
  name = "creatures:zombie",
  stats = {
    hp = 20,
    lifetime = 300, -- 5 Minutes
    can_jump = 1,
    can_swim = true,
    can_burn = true,
    has_falldamage = true,
    has_kockback = true,
    light = {min = 0, max = 8},
    hostile = true,
  },

  modes = {
    idle = {chance = 0.7, duration = 3, update_yaw = 6},
    walk = {chance = 0.3, duration = 5.5, moving_speed = 1.5},
    -- special modes
    attack = {chance = 0, moving_speed = 2.5},
  },

  model = {
    mesh = "creatures_zombie.b3d",
    textures = {"creatures_zombie.png"},
    collisionbox = {-0.25, -0.01, -0.3, 0.25, 1.75, 0.3},
    rotation = -90.0,
    animations = {
      idle = {start = 0, stop = 80, speed = 15},
      walk = {start = 102, stop = 122, speed = 15.5},
      attack = {start = 102, stop = 122, speed = 25},
      death = {start = 81, stop = 101, speed = 28, loop = false, duration = 2.12},
    },
  },

  sounds = {
      on_damage = {name = "creatures_zombie_hit", gain = 0.4, distance = 10},
      on_death = {name = "creatures_zombie_death", gain = 0.7, distance = 10},
      swim = {name = "creatures_splash", gain = 1.0, distance = 10},
      random = {
        idle = {name = "creatures_zombie", gain = 0.7, distance = 12},
      },
  },

  combat = {
    attack_damage = 1,
    attack_speed = 0.6,
    attack_radius = 1.1,

    search_enemy = true,
    search_timer = 2,
    search_radius = 12,
    search_type = "player",
  },

  spawning = {
    abm_nodes = {
      spawn_on = {"default:gravel", "default:mossycobble", "group:sand"},
    },
    abm_interval = 36,
    abm_chance = 7600,
    max_number = 1,
    number = 2,
    light = {min = 0, max = 8},
    height_limit = {min = -200, max = 50},

    spawn_egg = {
      description = "Zombie Spawn-Egg",
      texture = "creatures_egg_zombie.png",
    },

    spawner = {
      description = "Zombie Spawner",
      range = 8,
      number = 6,
      light = {min = 0, max = 8},
    }
  },

  drops = {
    {"creatures:rotten_flesh", {min = 1, max = 2}, chance = 0.7},
  }
}

creatures.register_mob(def)


-- Place spawners in dungeons

local function place_spawner(tab)
   local pos = tab[math.random(1, (#tab or 4))]
   pos.y = pos.y - 1
   local n = core.get_node_or_nil(pos)
   if n and n.name ~= "air" then
      pos.y = pos.y + 1
      core.set_node(pos, {name = "creatures:zombie_spawner"})
   end
end
core.set_gen_notify("dungeon")
core.register_on_generated(function(minp, maxp, blockseed)
   local ntf = core.get_mapgen_object("gennotify")
   if ntf and ntf.dungeon and #ntf.dungeon > 3 then
      core.after(3, place_spawner, table.copy(ntf.dungeon))
   end
end)

Oerkis:
int.lua:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local def = {
  name = "creatures:oerrki",
  stats = {
    hp = 13,
    lifetime = 540, -- 9 Minutes
    can_jump = 1,
    can_swim = true,
    can_burn = true,
    can_panic = true,
    has_falldamage = true,
    has_kockback = true,
    sneaky = true,
    hostile = true,
  },

  model = {
    mesh = "creatures_oerrki.b3d",
    textures = {"creatures_oerrki.png"},
    collisionbox = {-0.25, -0.01, -0.3, 0.25, 1.75, 0.3},
    rotation = -90.0,
    animations = {
      idle = {start = 1, stop = 23, speed = 15},
      walk = {start = 24, stop = 31, speed = 8, loop = false},
      walk_long = {start = 24, stop = 31, speed = 8, loop = false},
      attack = {start = 37, stop = 49, speed = 18},
      death = {start = 50, stop = 76, speed = 32, loop = false, duration = 2.52},
    },
  },

  sounds = {
      on_damage = {name = "creatures_oerrki_hit", gain = 1.0, distance = 10},
      on_death = {name = "creatures_oerrki_hit", gain = 1.0, distance = 10},
      swim = {name = "creatures_splash", gain = 1.0, distance = 10},
      random = {
        idle = {name = "creatures_oerrki_idle", gain = 1.0, distance = 25},
        attack = {name = "creatures_oerrki_attack", gain = 1.0, distance = 20},
      },
  },

  modes = {
    idle = {chance = 0.59, duration = 3, update_yaw = 8},
    walk = {chance = 0.3, duration = 5.5, moving_speed = 1.5},
    walk_long = {chance = 0.11, duration = 8, moving_speed = 1.3, update_yaw = 5},

    -- special modes
    attack = {chance = 0, moving_speed = 2.9},
    panic = {duration = 4, moving_speed = 3.2},
  },

  combat = {
    attack_damage = 2,
    attack_speed = 0.6,
    attack_radius = 1.2,

    search_enemy = true,
    search_timer = 1.6,
    search_radius = 15,
    search_type = "player",
  },

  spawning = {
    abm_nodes = {
      spawn_on = {"default:gravel", "default:stone_with_mese"},
    },
    abm_interval = 55,
    abm_chance = 7800,
    max_number = 1,
    number = {min = 1, max = 3},
    time_range = {min = 18500, max = 5100},
    light = {min = 0, max = 8},
    height_limit = {min = -200, max = 50},

    spawn_egg = {
      description = "Oerrki Spawn-Egg",
      texture = "creatures_egg_oerrki.png",
    },

    spawner = {
      description = "Oerrki Spawner",
      range = 8,
      player_range = 20,
      number = 6,
      light = {min = 0, max = 8},
    }
  },
}

creatures.register_mob(def)

Ghost:
Int.lua:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
--= Ghost for Creatures MOB-Engine (cme) =--
-- Copyright (c) 2015-2016 BlockMen <blockmen2015@gmail.com>
--
-- init.lua
--
-- This software is provided 'as-is', without any express or implied warranty. In no
-- event will the authors be held liable for any damages arising from the use of
-- this software.
--
-- Permission is granted to anyone to use this software for any purpose, including
-- commercial applications, and to alter it and redistribute it freely, subject to the
-- following restrictions:
--
-- 1. The origin of this software must not be misrepresented; you must not
-- claim that you wrote the original software. If you use this software in a
-- product, an acknowledgment in the product documentation is required.
-- 2. Altered source versions must be plainly marked as such, and must not
-- be misrepresented as being the original software.
-- 3. This notice may not be removed or altered from any source distribution.
--


local def = {
  -- general
  name = "creatures:ghost",
  stats = {
    hp = 12,
    lifetime = 300, -- 5 Minutes
    can_burn = true,
    can_fly = true,
    has_falldamage = false,
    has_kockback = true,
    light = {min = 0, max = 8},
    hostile = true,
  },

  modes = {
    idle = {chance = 0.65, duration = 3, update_yaw = 6},
    fly = {chance = 0.25, duration = 2.5, moving_speed = 2, max_height = 25, target_offset = 2.1},
    fly_2 = {chance = 0.1, duration = 4, moving_speed = 1.6, update_yaw = 3, max_height = 25, target_offset = 2.5},
    -- special modes
    attack = {chance = 0, moving_speed = 2.6},
  },

  model = {
    mesh = "creatures_ghost.b3d",
    textures = {"creatures_ghost.png"},
    collisionbox = {-0.25, 0, -0.3, 0.25, 1.3, 0.3},
    rotation = -90.0,
    animations = {
      idle = {start = 0, stop = 80, speed = 15},
      fly = {start = 102, stop = 122, speed = 12},
      fly_2 = {start = 102, stop = 122, speed = 10},
      attack = {start = 102, stop = 122, speed = 25},
      death = {start = 81, stop = 101, speed = 28, loop = false, duration = 1.32},
    },
  },

  sounds = {
      on_damage = {name = "creatures_ghost_hit", gain = 0.4, distance = 10},
      on_death = {name = "creatures_ghost_death", gain = 0.7, distance = 10},
      random = {
        idle = {name = "creatures_ghost", gain = 0.5, distance = 10, time_min = 23},
      },
  },

  combat = {
    attack_damage = 2,
    attack_speed = 1.1,
    attack_radius = 0.9,

    search_enemy = true,
    search_timer = 2,
    search_radius = 12,
    search_type = "player",
  },

  spawning = {
    abm_nodes = {
      spawn_on = {"default:gravel", "group:sand", "default:stone_with_coal"},
    },
    abm_interval = 40,
    abm_chance = 7300,
    max_number = 1,
    number = 1,
    time_range = {min = 18500, max = 4000},
    light = {min = 0, max = 8},
    height_limit = {min = 0, max = 80},

    spawn_egg = {
      description = "Ghost Spawn-Egg",
      texture = "creatures_egg_ghost.png",
    },

    spawner = {
      description = "Ghost Spawner",
      range = 8,
      number = 6,
      light = {min = 0, max = 8},
    }
  },

  --drops = {
  --  {"creatures:rotten_flesh", {min = 1, max = 2}, chance = 0.7},
  --},

}

creatures.register_mob(def)


just copy these codes over int.lua , and that's it. I just changed the spawn_on (line 80) if you want to change it as you like.

Re: [Modpack] Creatures MOB-Engine [2.3.1] [cme]

PostPosted: Fri Oct 14, 2016 19:25
by cHyper
ParaklataChotou wrote:Now I know how to fix it. I changed the spawn areas when the creatures spawns. Go to int.*lua and change the spawning areas for oerkii and zombies. I changed they spawn on gravel, and sheeps and chickens spawn less times

For chicken:
Int.lua:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
dofile(core.get_modpath("chicken") .. "/egg.lua")
local function dropEgg(obj)
  local pos = obj:getpos()
  if pos then
    creatures.dropItems(pos, {{"creatures:egg"}})
  end
end

-- Flesh
core.register_craftitem(":creatures:chicken_flesh", {
   description = "Raw Chicken Flesh",
   inventory_image = "creatures_chicken_flesh.png",
   on_use = core.item_eat(1)
})

core.register_craftitem(":creatures:chicken_meat", {
   description = "Chicken Meat",
   inventory_image = "creatures_chicken_meat.png",
   on_use = core.item_eat(3)
})

core.register_craft({
   type = "cooking",
   output = "creatures:chicken_meat",
   recipe = "creatures:chicken_flesh",
})

-- Feather
core.register_craftitem(":creatures:feather", {
   description = "Feather",
   inventory_image = "creatures_feather.png",
})

local def = {
  -- general
  name = "creatures:chicken",
  stats = {
    hp = 5,
    lifetime = 200, -- 5 Minutes
    can_jump = 1,
    can_swim = true,
    can_burn = true,
    can_panic = true,
    has_kockback = true,
    sneaky = true,
  },

  modes = {
    idle = {chance = 0.25, duration = 5, update_yaw = 3},
    idle2 = {chance = 0.69, duration = 0.8},
    pick = {chance = 0.2, duration = 2},
    walk = {chance = 0.2, duration = 5.5, moving_speed = 0.7, update_yaw = 2},
    panic = {moving_speed = 2.1},
    lay_egg = {chance = 0.01, duration = 1},
  },

  model = {
    mesh = "creatures_chicken.b3d",
    textures = {"creatures_chicken.png"},
    collisionbox = {-0.25, -0.01, -0.3, 0.25, 0.45, 0.3},
    rotation = 90.0,
    collide_with_objects = false,
    animations = {
      idle = {start = 0, stop = 1, speed = 10},
      idle2 = {start = 40, stop = 50, speed = 50},
      pick = {start = 88, stop = 134, speed = 50},
      walk = {start = 4, stop = 36, speed = 50},
      -- special modes
      swim = {start = 51, stop = 87, speed = 40},
      panic = {start = 51, stop = 87, speed = 55},
      death = {start = 135, stop = 160, speed = 28, loop = false, duration = 2.12},
    },
  },

  sounds = {
      on_damage = {name = "creatures_chicken_hit", gain = 0.5, distance = 10},
      on_death = {name = "creatures_chicken_hit", gain = 0.5, distance = 10},
      swim = {name = "creatures_splash", gain = 1.0, distance = 10},
      random = {
        idle = {name = "creatures_chicken", gain = 0.9, distance = 12, time_min = 8, time_max = 50},
      },
  },

  spawning = {
    abm_nodes = {
      spawn_on = {"default:dirt_with_grass", "default:dirt"},
    },
    abm_interval = 55,
    abm_chance = 7800,
    max_number = 1,
    number = 1,
    light = {min = 8, max = 15},
    height_limit = {min = 0, max = 150},

    spawn_egg = {
      description = "Chicken Spawn-Egg",
    },
  },

  drops = {
    {"creatures:chicken_flesh"},
    {"creatures:feather", {min = 1, max = 2}, chance = 0.45},
  },

  on_step = function(self, dtime)
    if self.mode == "lay_egg" then
      dropEgg(self.object)
      self.modetimer = 2
    end
  end
}

creatures.register_mob(def)

For Sheeps:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
core.register_tool(":creatures:shears", {
   description = "Shears",
   inventory_image = "creatures_shears.png",
})

core.register_craft({
   output = 'creatures:shears',
   recipe = {
      {'', 'default:steel_ingot'},
      {'default:steel_ingot', 'default:stick'},
   }
})


local function setColor(self)
   if self and self.object then
      local ext = ".png"
      if self.has_wool ~= true then
         ext = ".png^(creatures_sheep_shaved.png^[colorize:" .. self.wool_color:gsub("grey", "gray") .. ":50)"
      end
      self.object:set_properties({textures = {"creatures_sheep.png^creatures_sheep_" .. self.wool_color .. ext}})
   end
end

local function shear(self, drop_count, sound)
   if self.has_wool == true then
      self.has_wool = false
      local pos = self.object:getpos()
      if sound then
         core.sound_play("creatures_shears", {pos = pos, gain = 1, max_hear_distance = 10})
      end

      setColor(self)
      creatures.dropItems(pos, {{"wool:" .. self.wool_color, drop_count}})
   end
end


-- white, grey, brown, black (see wool colors as reference)
local colors = {"white", "grey", "brown", "black"}

local def = {
   name = "creatures:sheep",
   stats = {
      hp = 8,
      lifetime = 300, -- 7,5 Minutes
      can_jump = 1,
      can_swim = true,
      can_burn = true,
      can_panic = true,
      has_falldamage = true,
      has_kockback = true,
   },

   model = {
      mesh = "creatures_sheep.b3d",
      textures = {"creatures_sheep.png^creatures_sheep_white.png"},
      collisionbox = {-0.5, -0.01, -0.55, 0.5, 1.1, 0.55},
      rotation = -90.0,
      animations = {
         idle = {start = 1, stop = 60, speed = 15},
         walk = {start = 81, stop = 101, speed = 18},
         walk_long = {start = 81, stop = 101, speed = 18},
         eat = {start = 107, stop = 170, speed = 12, loop = false},
         follow = {start = 81, stop = 101, speed = 15},
         death = {start = 171, stop = 191, speed = 32, loop = false, duration = 2.52},
      },
   },

   sounds = {
      on_damage = {name = "creatures_sheep", gain = 1.0, distance = 10},
      on_death = {name = "creatures_sheep", gain = 1.0, distance = 10},
      swim = {name = "creatures_splash", gain = 1.0, distance = 10,},
      random = {
         idle = {name = "creatures_sheep", gain = 0.6, distance = 10, time_min = 23},
      },
   },

   modes = {
      idle = {chance = 0.5, duration = 10, update_yaw = 8},
      walk = {chance = 0.14, duration = 4.5, moving_speed = 1.3},
      walk_long = {chance = 0.11, duration = 8, moving_speed = 1.3, update_yaw = 5},
      -- special modes
      follow = {chance = 0, duration = 20, radius = 4, timer = 5, moving_speed = 1, items = {"farming:wheat"}},
      eat = {   chance = 0.25,
         duration = 4,
         nodes = {
            "default:grass_1", "default:grass_2", "default:grass_3",
            "default:grass_4", "default:grass_5", "default:dirt_with_grass"
         }
      },
   },

   drops = function(self)
      local items = {{"creatures:flesh"}}
      if self.has_wool then
         table.insert(items, {"wool:" .. self.wool_color, {min = 1, max = 2}})
      end
      creatures.dropItems(self.object:getpos(), items)
   end,

   spawning = {
      abm_nodes = {
         spawn_on = {"default:dirt_with_grass"},
      },
      abm_interval = 25,
      abm_chance = 7800,
      max_number = 1,
      number = {min = 3, max = 4},
      time_range = {min = 5100, max = 18300},
      light = {min = 10, max = 15},
      height_limit = {min = 0, max = 25},

      spawn_egg = {
         description = "Sheep Spawn-Egg",
         texture = "creatures_egg_sheep.png",
      },

      spawner = {
         description = "Sheep Spawner",
         range = 6,
         player_range = 15,
         number = 4,
      }
   },

   on_punch = function(self, puncher)
      shear(self)
   end,

   get_staticdata = function(self)
      return {
         has_wool = self.has_wool,
         wool_color = self.wool_color,
      }
   end,

   on_activate = function(self, staticdata)
      if self.has_wool == nil then
         self.has_wool = true
      end

      if not self.wool_color then
         self.wool_color =  colors[math.random(1, #colors)]
      end
      -- update fur
      setColor(self)
   end,

   on_rightclick = function(self, clicker)
      local item = clicker:get_wielded_item()
         if item then
            local name = item:get_name()
            if name == "farming:wheat" then
               self.target = clicker
               self.mode = "follow"
               self.modetimer = 0

               if not self.tamed then
                  self.fed_cnt = (self.fed_cnt or 0) + 1
               end

               -- play eat sound?
               item:take_item()
            elseif name == "creatures:shears" and self.has_wool then
               shear(self, math.random(2, 3), true)
               item:add_wear(65535/100)
            end
            if not core.setting_getbool("creative_mode") then
               clicker:set_wielded_item(item)
            end
         end
      return true
   end,

   on_step = function(self, dtime)
      if self.mode == "eat" and self.eat_node then
         self.regrow_wool = true
      end
      if self.last_mode == "eat" and (self.modetimer and self.modetimer == 0) and self.regrow_wool then
         self.has_wool = true
         self.regrow_wool = nil
         setColor(self)
      end
      if self.fed_cnt and self.fed_cnt > 4 then
         self.tamed = true
         self.fed_cnt = nil
      end
   end
}

creatures.register_mob(def)

Zombies:
Int.lua
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local def = {
  -- general
  name = "creatures:zombie",
  stats = {
    hp = 20,
    lifetime = 300, -- 5 Minutes
    can_jump = 1,
    can_swim = true,
    can_burn = true,
    has_falldamage = true,
    has_kockback = true,
    light = {min = 0, max = 8},
    hostile = true,
  },

  modes = {
    idle = {chance = 0.7, duration = 3, update_yaw = 6},
    walk = {chance = 0.3, duration = 5.5, moving_speed = 1.5},
    -- special modes
    attack = {chance = 0, moving_speed = 2.5},
  },

  model = {
    mesh = "creatures_zombie.b3d",
    textures = {"creatures_zombie.png"},
    collisionbox = {-0.25, -0.01, -0.3, 0.25, 1.75, 0.3},
    rotation = -90.0,
    animations = {
      idle = {start = 0, stop = 80, speed = 15},
      walk = {start = 102, stop = 122, speed = 15.5},
      attack = {start = 102, stop = 122, speed = 25},
      death = {start = 81, stop = 101, speed = 28, loop = false, duration = 2.12},
    },
  },

  sounds = {
      on_damage = {name = "creatures_zombie_hit", gain = 0.4, distance = 10},
      on_death = {name = "creatures_zombie_death", gain = 0.7, distance = 10},
      swim = {name = "creatures_splash", gain = 1.0, distance = 10},
      random = {
        idle = {name = "creatures_zombie", gain = 0.7, distance = 12},
      },
  },

  combat = {
    attack_damage = 1,
    attack_speed = 0.6,
    attack_radius = 1.1,

    search_enemy = true,
    search_timer = 2,
    search_radius = 12,
    search_type = "player",
  },

  spawning = {
    abm_nodes = {
      spawn_on = {"default:gravel", "default:mossycobble", "group:sand"},
    },
    abm_interval = 36,
    abm_chance = 7600,
    max_number = 1,
    number = 2,
    light = {min = 0, max = 8},
    height_limit = {min = -200, max = 50},

    spawn_egg = {
      description = "Zombie Spawn-Egg",
      texture = "creatures_egg_zombie.png",
    },

    spawner = {
      description = "Zombie Spawner",
      range = 8,
      number = 6,
      light = {min = 0, max = 8},
    }
  },

  drops = {
    {"creatures:rotten_flesh", {min = 1, max = 2}, chance = 0.7},
  }
}

creatures.register_mob(def)


-- Place spawners in dungeons

local function place_spawner(tab)
   local pos = tab[math.random(1, (#tab or 4))]
   pos.y = pos.y - 1
   local n = core.get_node_or_nil(pos)
   if n and n.name ~= "air" then
      pos.y = pos.y + 1
      core.set_node(pos, {name = "creatures:zombie_spawner"})
   end
end
core.set_gen_notify("dungeon")
core.register_on_generated(function(minp, maxp, blockseed)
   local ntf = core.get_mapgen_object("gennotify")
   if ntf and ntf.dungeon and #ntf.dungeon > 3 then
      core.after(3, place_spawner, table.copy(ntf.dungeon))
   end
end)

Oerkis:
int.lua:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local def = {
  name = "creatures:oerrki",
  stats = {
    hp = 13,
    lifetime = 540, -- 9 Minutes
    can_jump = 1,
    can_swim = true,
    can_burn = true,
    can_panic = true,
    has_falldamage = true,
    has_kockback = true,
    sneaky = true,
    hostile = true,
  },

  model = {
    mesh = "creatures_oerrki.b3d",
    textures = {"creatures_oerrki.png"},
    collisionbox = {-0.25, -0.01, -0.3, 0.25, 1.75, 0.3},
    rotation = -90.0,
    animations = {
      idle = {start = 1, stop = 23, speed = 15},
      walk = {start = 24, stop = 31, speed = 8, loop = false},
      walk_long = {start = 24, stop = 31, speed = 8, loop = false},
      attack = {start = 37, stop = 49, speed = 18},
      death = {start = 50, stop = 76, speed = 32, loop = false, duration = 2.52},
    },
  },

  sounds = {
      on_damage = {name = "creatures_oerrki_hit", gain = 1.0, distance = 10},
      on_death = {name = "creatures_oerrki_hit", gain = 1.0, distance = 10},
      swim = {name = "creatures_splash", gain = 1.0, distance = 10},
      random = {
        idle = {name = "creatures_oerrki_idle", gain = 1.0, distance = 25},
        attack = {name = "creatures_oerrki_attack", gain = 1.0, distance = 20},
      },
  },

  modes = {
    idle = {chance = 0.59, duration = 3, update_yaw = 8},
    walk = {chance = 0.3, duration = 5.5, moving_speed = 1.5},
    walk_long = {chance = 0.11, duration = 8, moving_speed = 1.3, update_yaw = 5},

    -- special modes
    attack = {chance = 0, moving_speed = 2.9},
    panic = {duration = 4, moving_speed = 3.2},
  },

  combat = {
    attack_damage = 2,
    attack_speed = 0.6,
    attack_radius = 1.2,

    search_enemy = true,
    search_timer = 1.6,
    search_radius = 15,
    search_type = "player",
  },

  spawning = {
    abm_nodes = {
      spawn_on = {"default:gravel", "default:stone_with_mese"},
    },
    abm_interval = 55,
    abm_chance = 7800,
    max_number = 1,
    number = {min = 1, max = 3},
    time_range = {min = 18500, max = 5100},
    light = {min = 0, max = 8},
    height_limit = {min = -200, max = 50},

    spawn_egg = {
      description = "Oerrki Spawn-Egg",
      texture = "creatures_egg_oerrki.png",
    },

    spawner = {
      description = "Oerrki Spawner",
      range = 8,
      player_range = 20,
      number = 6,
      light = {min = 0, max = 8},
    }
  },
}

creatures.register_mob(def)

Ghost:
Int.lua:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
--= Ghost for Creatures MOB-Engine (cme) =--
-- Copyright (c) 2015-2016 BlockMen <blockmen2015@gmail.com>
--
-- init.lua
--
-- This software is provided 'as-is', without any express or implied warranty. In no
-- event will the authors be held liable for any damages arising from the use of
-- this software.
--
-- Permission is granted to anyone to use this software for any purpose, including
-- commercial applications, and to alter it and redistribute it freely, subject to the
-- following restrictions:
--
-- 1. The origin of this software must not be misrepresented; you must not
-- claim that you wrote the original software. If you use this software in a
-- product, an acknowledgment in the product documentation is required.
-- 2. Altered source versions must be plainly marked as such, and must not
-- be misrepresented as being the original software.
-- 3. This notice may not be removed or altered from any source distribution.
--


local def = {
  -- general
  name = "creatures:ghost",
  stats = {
    hp = 12,
    lifetime = 300, -- 5 Minutes
    can_burn = true,
    can_fly = true,
    has_falldamage = false,
    has_kockback = true,
    light = {min = 0, max = 8},
    hostile = true,
  },

  modes = {
    idle = {chance = 0.65, duration = 3, update_yaw = 6},
    fly = {chance = 0.25, duration = 2.5, moving_speed = 2, max_height = 25, target_offset = 2.1},
    fly_2 = {chance = 0.1, duration = 4, moving_speed = 1.6, update_yaw = 3, max_height = 25, target_offset = 2.5},
    -- special modes
    attack = {chance = 0, moving_speed = 2.6},
  },

  model = {
    mesh = "creatures_ghost.b3d",
    textures = {"creatures_ghost.png"},
    collisionbox = {-0.25, 0, -0.3, 0.25, 1.3, 0.3},
    rotation = -90.0,
    animations = {
      idle = {start = 0, stop = 80, speed = 15},
      fly = {start = 102, stop = 122, speed = 12},
      fly_2 = {start = 102, stop = 122, speed = 10},
      attack = {start = 102, stop = 122, speed = 25},
      death = {start = 81, stop = 101, speed = 28, loop = false, duration = 1.32},
    },
  },

  sounds = {
      on_damage = {name = "creatures_ghost_hit", gain = 0.4, distance = 10},
      on_death = {name = "creatures_ghost_death", gain = 0.7, distance = 10},
      random = {
        idle = {name = "creatures_ghost", gain = 0.5, distance = 10, time_min = 23},
      },
  },

  combat = {
    attack_damage = 2,
    attack_speed = 1.1,
    attack_radius = 0.9,

    search_enemy = true,
    search_timer = 2,
    search_radius = 12,
    search_type = "player",
  },

  spawning = {
    abm_nodes = {
      spawn_on = {"default:gravel", "group:sand", "default:stone_with_coal"},
    },
    abm_interval = 40,
    abm_chance = 7300,
    max_number = 1,
    number = 1,
    time_range = {min = 18500, max = 4000},
    light = {min = 0, max = 8},
    height_limit = {min = 0, max = 80},

    spawn_egg = {
      description = "Ghost Spawn-Egg",
      texture = "creatures_egg_ghost.png",
    },

    spawner = {
      description = "Ghost Spawner",
      range = 8,
      number = 6,
      light = {min = 0, max = 8},
    }
  },

  --drops = {
  --  {"creatures:rotten_flesh", {min = 1, max = 2}, chance = 0.7},
  --},

}

creatures.register_mob(def)


just copy these codes over int.lua , and that's it. I just changed the spawn_on (line 80) if you want to change it as you like.



+1 good work ...