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

User avatar
cHyper
Member
 
Posts: 587
Joined: Fri May 06, 2011 08:49
IRC: cHyper
In-game: cHyper

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

by cHyper » Mon Feb 15, 2016 16:33

What about spawners in dungeons for Oerrki's?
 

User avatar
cHyper
Member
 
Posts: 587
Joined: Fri May 06, 2011 08:49
IRC: cHyper
In-game: cHyper

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

by cHyper » Mon Feb 15, 2016 16:53

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
Attachments
minetest 2016-02-15 18-17-05-97.jpg
more Oerrki's
minetest 2016-02-15 18-17-05-97.jpg (58.01 KiB) Viewed 7788 times
minetest 2016-02-15 17-49-04-04.jpg
Oerrki
minetest 2016-02-15 17-49-04-04.jpg (104.82 KiB) Viewed 7788 times
Last edited by cHyper on Mon Feb 15, 2016 17:22, edited 2 times in total.
 

User avatar
SaKeL
Member
 
Posts: 193
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

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

by SaKeL » Mon Feb 15, 2016 17:19

Big spider and when you kill him, he will multiply to number of small spiders >:)
Follow my Collection for more Minetest creations found on my server or join the Community for the latest Server updates and news.

SaKeL
 

User avatar
cHyper
Member
 
Posts: 587
Joined: Fri May 06, 2011 08:49
IRC: cHyper
In-game: cHyper

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

by cHyper » Mon Feb 15, 2016 17:26

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


+1
 

Dragonop
Member
 
Posts: 1178
Joined: Tue Oct 23, 2012 12:59
GitHub: Dragonop
IRC: Dragonop
In-game: Dragonop

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

by Dragonop » Mon Feb 15, 2016 21:04

Afaik it is "Oerkki", not "Oerrki". Other than that, it looks good!
 

User avatar
BlockMen
Member
 
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen

Creatures MOB-Engine 2.3.1

by BlockMen » Wed Feb 17, 2016 09:46

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.
 

User avatar
iska
Member
 
Posts: 29
Joined: Thu Apr 23, 2015 17:19
In-game: iska

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

by iska » Wed Feb 17, 2016 11:45

Oerkki comes from Örkki (nickname for hirviö or monster) in finnish language, I think you should keep the original name.
 

User avatar
benrob0329
Member
 
Posts: 1192
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
In-game: benrob03

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

by benrob0329 » Fri Feb 26, 2016 06:33

So who's going to take up development? I'd like to but I don't know much Lua...
 

User avatar
SaKeL
Member
 
Posts: 193
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

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

by SaKeL » Fri Feb 26, 2016 11:24

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
Follow my Collection for more Minetest creations found on my server or join the Community for the latest Server updates and news.

SaKeL
 

User avatar
cHyper
Member
 
Posts: 587
Joined: Fri May 06, 2011 08:49
IRC: cHyper
In-game: cHyper

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

by cHyper » Fri Mar 04, 2016 16:58

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. ..
 

Martin_Devil
Member
 
Posts: 190
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48

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

by Martin_Devil » Fri Mar 04, 2016 17:27

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
 

User avatar
SaKeL
Member
 
Posts: 193
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

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

by SaKeL » Fri Mar 04, 2016 20:11

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
Follow my Collection for more Minetest creations found on my server or join the Community for the latest Server updates and news.

SaKeL
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

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

by Sokomine » Wed Mar 16, 2016 04:14

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.
A list of my mods can be found here.
 

User avatar
TailsTheFoxDoes MT
Member
 
Posts: 415
Joined: Mon Jan 18, 2016 20:50
In-game: TailsTheFox

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

by TailsTheFoxDoes MT » Sun Mar 20, 2016 01:05

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.
I'm the TailsTMM of minetest, in other words, i rock.
BRAAAAAZZZZAAAA!!!!!!!!!!!!!!!!!!!!!!!!!!!
BTW it means TailsTheMeseMinecart, but that isn't my name, it's just a way of saying that i basically do the same thing Dantdm does but i do it with minetest And you problably can't see the invisible ink.
My mods:
My first mod:tails_boss

Mob_pack now has voice acting! Do you want YOUR VOICE included? Look in my posts for the thread!
 

User avatar
SaKeL
Member
 
Posts: 193
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

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

by SaKeL » Sun Mar 20, 2016 01:16

we miss someone to spawn in snow biomes ...it feels so empty there
Follow my Collection for more Minetest creations found on my server or join the Community for the latest Server updates and news.

SaKeL
 

User avatar
swordpaint12
Member
 
Posts: 187
Joined: Sat Aug 22, 2015 00:50
In-game: [swordpaint12][Belching_Balladeer]

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

by swordpaint12 » Wed May 04, 2016 13:31

SaKeL wrote:we miss someone to spawn in snow biomes ...it feels so empty there

Oh, maybe foxes?
Winter Cumicles
God's not dead; remember that!
Yay for MT! No MC here!
I am a human. I'm younger than 100 years old.
I've been playing Minetest since December 2014.
Fruit!

I'm amazed that I haven't been on here in so long! My latest minetest accomplishment was mining by hand (well, as close as you can get in a computer game) a circle 30 blocks in diameter. It took forever but it's pretty cool.
 

Emon
Member
 
Posts: 48
Joined: Tue Apr 26, 2016 09:35

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

by Emon » Mon May 16, 2016 21:45

Italian version available here.
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

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

by BrunoMine » Fri Jul 08, 2016 13:45

which is the easiest and correct way to make a mob walk in one direction? (Can show me a piece of LUA coding?)
 

User avatar
enigma
New member
 
Posts: 1
Joined: Sun Jul 24, 2016 12:56
GitHub: pickardjoe
In-game: enigma617

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

by enigma » Sun Jul 24, 2016 13:00

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>
 

User avatar
cHyper
Member
 
Posts: 587
Joined: Fri May 06, 2011 08:49
IRC: cHyper
In-game: cHyper

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

by cHyper » Mon Aug 15, 2016 18:04

Where can I download this version included the new mob skeleton?
 

PlanetKiller
Member
 
Posts: 14
Joined: Mon Nov 23, 2015 22:50

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

by PlanetKiller » Mon Sep 26, 2016 19:15

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.
([noun].. " tried to " ..[verb]..[noun].. " at protected position "..[noun].. " with a bucket")
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

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

by azekill_DIABLO » Wed Sep 28, 2016 18:06

cHyper wrote:Where can I download this version included the new mob skeleton?

which one?
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
ParaklataChotou
Member
 
Posts: 209
Joined: Sat Jun 18, 2016 17:09
GitHub: paraklatachotou
IRC: CareBearWhoCares
In-game: AutistCortana

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

by ParaklataChotou » Tue Oct 04, 2016 17:30

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>
Last edited by ParaklataChotou on Tue Oct 04, 2016 19:32, edited 1 time in total.
Visit my server: freextress.ddnsking.com 30002 . mobs, npcs, interesting places, pvp.
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

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

by BrunoMine » Tue Oct 04, 2016 17:35

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.
Last edited by BrunoMine on Sat Oct 08, 2016 20:33, edited 1 time in total.
 

User avatar
JoshMars
Member
 
Posts: 103
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh

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

by JoshMars » Sat Oct 08, 2016 20:19

So.... no fix for the sheep crap?
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

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

by BrunoMine » Sat Oct 08, 2016 20:36

JoshMars wrote:So.... no fix for the sheep crap?

Exactly
I advise check for similar mods
 

User avatar
JoshMars
Member
 
Posts: 103
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh

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

by JoshMars » Sat Oct 08, 2016 21:26

Can anyone successfully reproduce the bug?
 

User avatar
theblackwolf
Member
 
Posts: 25
Joined: Thu Oct 13, 2016 23:54

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

by theblackwolf » Fri Oct 14, 2016 05:00

I liked this mod I have used it in my game as well. I love the cloak creature i think its really cool! ^.^
https://s000.tinyupload.com/index.php?f ... 4098245523


Its my game if people wish to try it. :)
 

User avatar
ParaklataChotou
Member
 
Posts: 209
Joined: Sat Jun 18, 2016 17:09
GitHub: paraklatachotou
IRC: CareBearWhoCares
In-game: AutistCortana

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

by ParaklataChotou » Fri Oct 14, 2016 13:56

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.
Visit my server: freextress.ddnsking.com 30002 . mobs, npcs, interesting places, pvp.
 

User avatar
cHyper
Member
 
Posts: 587
Joined: Fri May 06, 2011 08:49
IRC: cHyper
In-game: cHyper

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

by cHyper » Fri Oct 14, 2016 19:25

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 ...
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 15 guests

cron