Page 1 of 1

[Mod] Mobs [carbone_mobs] – fast and simple mobs

PostPosted: Tue Jul 01, 2014 18:47
by Calinou
A fast mobs mod. Based on PilzAdam's mobs mod, packing dozens of improvements.

This mod is originating from Carbone. You don't install this mod if you're playing that particular game; it's already included and enabled by default there.

GitHub repository (includes issue tracker)

Download
Rename the directory to “carbone_mobs” after extracting the .zip file.

No dependencies on non-default mods.
License for code: WTFPL
License for media: WTFPL (some by Evergreen and Pavel_S)


This mod forces active_block_range = 1 which is the correct value needed by the spawning code. This also greatly improves server performance, by decreasing its CPU usage.

Crafting

Smelt a rat for a cooked rat, gives 3 HP. Smelt raw meat for meat, gives 6 HP.

Smelt a cooked rat for scorched stuff, which attracts nearby rats when held.

Settings

Mobs never spawn in creative mode, but can be placed using items with the same name as the mobs.

spawn_hostile_mobs: whether to spawn hostile mobs. [true]
spawn_friendly_mobs: whether to spawn friendly mobs. [true]
monster_damage_factor: 0 disables damage, values above 1 increase damage. Values between 0 and 1 do not work. [1.0]

Mob list

Hostile

Hostile mobs slowly die if exposed to sunlight. They do not spawn outside, even at night, only in caves below sea level (Y coordinate 0). All hostile mobs spawn on stone and desert stone only. Overall, the monsters aren't that easy to beat.

Dirt Monster: 20 HP, 3 damage
Fairly fast movement speed.

Stone Monster: 24 HP, 4 damage
Resistant to lava and water, is fairly slow.

Sand Monster: 12 HP, 2 damage
Moves very quickly, almost as fast as the player.

Tree Monster: 50 HP, 5 damage
Moves slowly.

Oerkki: 35 HP, 4 damage
Moves fairly quickly.

Dungeon Master: 40 HP, 8 damage using fireball (8 blocks/s movement speed, 1 fireball per 2.5 seconds)
Instantly dies in sunlight. Fireballs destroy most nearby nodes, except containers and bedrock (but do not cause fire to appear). Spawns at -50 and deeper.

Rhino: 20 HP, 2 damage using bullets (15 blocks/s movement speed, 1 bullet per 0.5 seconds)

Trooper: 20 HP, 1 damage
Looks like a player without a name tag.


Friendly

Rat: 1 HP
Can be cooked (15 seconds cook time), gives 3 HP when eaten. Left click to collect, can be placed after being collected. Also spawns on trees, jungle trees and cacti. Follows you when holding scorched stuff (which is obtained by smelting a cooked rat).

Sheep: 10 HP
Can be cooked (25 seconds cook time), gives 6 HP when eaten. Right click to shear. Follows you when holding wheat; right click with wheat to feed them, to make their wool regrow.

Re: [Mod] Mobs [mobs]

PostPosted: Tue Jul 01, 2014 20:07
by HeroOfTheWinds
Neat, seems pretty close to the original Simple Mobs. However, I notice that you have some monsters drop maptools:silver_coin... shouldn't maptools be a dependency then?

Re: [Mod] Mobs [mobs]

PostPosted: Tue Jul 01, 2014 22:09
by Sokomine
And again: Another variant of sheep. I'd love to see goats!

Re: [Mod] Mobs [mobs]

PostPosted: Tue Jul 01, 2014 22:53
by trainwrecktony
Great work with this, this is the the mob pack to be using in my opinion. Everything is tweaked just right.
I run a modified version on my server with added animals, monsters, and code borrowed from adventuretest for knockback effect, bloodsplatter, and sounds

Re: [Mod] Mobs [mobs]

PostPosted: Wed Jul 02, 2014 02:15
by BrandonReese
Sokomine wrote:And again: Another variant of sheep. I'd love to see goats!


If somebody would make a goat model I would add it and I'm sure Calinou would too.

Re: [Mod] Mobs [mobs]

PostPosted: Wed Jul 02, 2014 09:17
by Calinou
Commented out references to coin, added player damage, death and falling damage sounds, which may also be used by mods.

By installing this mod, you also get sounds when players are damaged or fall since they're automatically used by the engine.

Re: [Mod] Mobs [mobs]

PostPosted: Thu Jul 03, 2014 05:43
by NyankoSensei
trainwrecktony wrote:code borrowed from adventuretest for knockback effect


That can be a nice improvement, i like how harder are those mobs but without knockback you don't have the chance to disengage enemy, can be added sword wearing ?

Re: [Mod] Mobs [mobs]

PostPosted: Sat Jul 05, 2014 21:44
by Achilles
Is there an admin command that would spawn one of the mobs? Or an egg that can only be gained by admins?

Re: [Mod] Mobs [mobs]

PostPosted: Sun Jul 06, 2014 14:40
by Calinou
Achilles wrote:Is there an admin command that would spawn one of the mobs? Or an egg that can only be gained by admins?


This one requires the “server” privilege: /spawnentity carbone_mobs:name – the mob is spawned directly at your position.

This one requires the “give” privilege: /giveme carbone_mobs:name – this gives you an item which lets you spawn the mob by right-clicking a block.

name can be:

Animals:
  • rat
  • sheep
  • oerkki
Monsters:
  • dirt_monster
  • sand_monster
  • stone_monster
  • tree_monster
  • dungeon_master
  • rhino
  • trooper

Re: [Mod] Mobs [mobs]

PostPosted: Mon Jul 07, 2014 16:31
by gsmanners
Nice. I still don't care for the drops, though. I usually do a little something like this with mobs:

Code: Select all
local handle_drops = function(self)
   if self.object:get_hp() <= 0 then
      local p = self.object:getpos()
      for _,drop in ipairs(self.drops) do
         if math.random(1, drop.chance) == 1 then
            local o = minetest.add_entity(p, "__builtin:item")
            local s = ItemStack(drop.name.." "..math.random(drop.min, drop.max))
            o:get_luaentity():set_item(s:to_string())
            o:setvelocity({x=math.random(0,4)-2, y=0, z=math.random(0,4)-2})
         end
      end
      if self.bonus and math.random(1, 4) == 1 then
         local o = minetest.add_entity(p, "__builtin:item")
         local s = ItemStack(self.bonus[math.random(1, #self.bonus)])
         o:get_luaentity():set_item(s:to_string())
         o:setvelocity({x=math.random(0,4)-2, y=0, z=math.random(0,4)-2})
      end
      self.object:remove()
      return
   end
end


Then call the above right before various remove()s.

Re: [Mod] Mobs [mobs]

PostPosted: Mon Jul 07, 2014 21:02
by Calinou
gsmanners wrote:Nice. I still don't care for the drops, though. I usually do a little something like this with mobs:

Code: Select all
local handle_drops = function(self)
   if self.object:get_hp() <= 0 then
      local p = self.object:getpos()
      for _,drop in ipairs(self.drops) do
         if math.random(1, drop.chance) == 1 then
            local o = minetest.add_entity(p, "__builtin:item")
            local s = ItemStack(drop.name.." "..math.random(drop.min, drop.max))
            o:get_luaentity():set_item(s:to_string())
            o:setvelocity({x=math.random(0,4)-2, y=0, z=math.random(0,4)-2})
         end
      end
      if self.bonus and math.random(1, 4) == 1 then
         local o = minetest.add_entity(p, "__builtin:item")
         local s = ItemStack(self.bonus[math.random(1, #self.bonus)])
         o:get_luaentity():set_item(s:to_string())
         o:setvelocity({x=math.random(0,4)-2, y=0, z=math.random(0,4)-2})
      end
      self.object:remove()
      return
   end
end


Then call the above right before various remove()s.


Ideally, I would drop items like that only if the mob dies due to an arrow. I don't want to see dozens of meat in lakes. :)

Re: [Mod] Mobs [mobs]

PostPosted: Sun Oct 19, 2014 10:37
by Wuzzy
You said that you made “tons of improvements” and performance improvements. May I know which ones?
Maybe you could get in touch with the author of this mod, which is like PilzAdam’s mobs mod, but just the API. It would be great if you could help out here a little bit. :)

Re: [Mod] Mobs [carbone_mobs] – fast and simple mobs

PostPosted: Sun Nov 09, 2014 19:28
by Calinou
A new release, finally:

  • Mod name changed: mobs → carbone_mobs (added aliases for compatibility).
  • Health, damage and speed values tweaked for use in minetest_game.
  • Added troopers (player-looking monsters).
  • active_block_range = 1 is now enforced.
  • Uses a Git repository.

Re: [Mod] Mobs [carbone_mobs] – fast and simple mobs

PostPosted: Tue Dec 23, 2014 13:20
by Inocudom
Cyberpangolen uploaded these sound effects recently:
https://forum.minetest.net/viewforum.php?f=9
You might find something that you like.

Re: [Mod] Mobs [carbone_mobs] – fast and simple mobs

PostPosted: Wed May 20, 2015 17:24
by Cryterion
Hi. Just a suggestion to help server admins. Is to place an option to either enable or disable node damage from the fireballs sent out by the dungeon master. Simple enough for a programmer to do, but would help for the non programmers with server configuration.

Re: [Mod] Mobs [carbone_mobs] – fast and simple mobs

PostPosted: Fri Oct 07, 2016 22:31
by cHyper
What are the dozens of improvements exactly?

Can you implement bigs and cows?