Ive created a simple and (hopefully) lightweight mod that adds currently 5 hostile mobs and 2 passive animals to MT.
This mod is good for everyone who cant run the animals mod.
The models are conributed by Pavel_S.
.blend files for the models: https://www.dropbox.com/sh/j4ux5fxw8jfazzr/h1O7SU0Y2p
Documentation by Temperest:
Code: Select all
Mobs ==== This mod adds mobs to Minetest. Minetest's damage system ------------------------ The damage system in Minetest is more complex than just hold down the left mouse button. After the first punch your hand or weapon has a "reload" time. This is for most weapons 1 second. After the reload time the player can punch again. Settings -------- When you add `only_peaceful_mobs = true` to minetest.conf then all hostile mobs will despawn. `display_mob_spawn = true` will show you a message in the chat when a mob spawns. Items ----- * Meat: dropped by sheep upon dying. When cooked in a furnace, results in cooked meat that heals players when eaten. * Wheat: players holding wheat cause sheep to follow them. Right clicking sheep with wheat tames them. List of mobs ------------ ### Hostile mobs Hostile mobs walk arround in the world and start to attack the player when they see him. * Dirt Monster: spawns on grass at night. It has the same velocity as the player and cause 1 heart damage. It dies in water, lava and sunlight. Drops dirt when killed by a player. * Stone Monster: spawns on normal stone in the dark. It is slower than the player but can only be hurt by at least a stone sword. It causes 2 heart damage and is immune to water, lava and light. Drops mossy cobble when killed by a player. * Sand Monster: spawns at deserts. It is faster than the player but dies fast and doesnt cause much damage. It dies in water and lava. Drops sand when killed by a player. * Oerkki: from version 0.3 of Minetest. It spawns on stone in the dark and has same velocity as the player. It causes more damage than the dirt monster and dies in lava and water. * Dungeon Master: from version 0.3 of Minetest. It spawns on stone in the dark and throws fireballs at the player. It dies in water and lava and the player needs at least a stone sword to kill it. Has a 1% chance of dropping MESE when killed by a player. ### Friendly mobs Friendly mobs walk arround in the world. They do not attack the player but some of them have useful features. * Sheep: friendly animal that walks randomly in the world. It spawns on grass and gives the player wool if right clicked and meat if he kills it. It will follow players holding wheat. If fed wheat by right clicking, they are tamed, do not despawn, and regrow wool. * Rat: from version 0.3 of Minetest. Its a friendly animal that spawns on grass and stone. The player can right click it to get it into his inventory. In the inventory the rat can be replaced in the world or cooked in the furnace. API --- You can use the API of simple mobs in your own mods if you have it installed. See the [init.lua]([url]https://github.com/PilzAdam/mobs/blob/master/init.lua[/url]) file in the mod to have some examples of the usage. Simple Mobs has a simple API. Other mods can use the functions to add their own mobs. ### mobs:register_mob(name, definition) This functions registers a new mob as a Minetest entity. * `name` is the name of the mob (e.g. "mobs:dirt_monster") * `definition` is a table with the following fields * `type` the type of the mob ("monster" or "animal") * `hp_max` same is in minetest.register_entity() * `physical` same is in minetest.register_entity() * `collisionbox` same is in minetest.register_entity() * `visual` same is in minetest.register_entity() * `visual_size` same is in minetest.register_entity() * `textures` same is in minetest.register_entity() * `mesh` same is in minetest.register_entity() * `makes_footstep_sound`: same is in minetest.register_entity() * `view_range` the range in that the monster will see the playerand follow him * `walk_velocity` the velocity when the monster is walking around * `run_velocity` the velocity when the monster is attacking a player * `damage` the damage per second * `drops` is list of tables with the following fields: * `name` itemname * `chance` the inverted chance (same as in abm) to get the item * `min` the minimum number of items * `max` the maximum number of items * `armor` the armor (integer)(3=lowest; 1=highest)(fleshy group is used) * `drawtype` "front" or "side" * `water_damage` the damage per second if the mob is in water * `lava_damage` the damage per second if the mob is in lava * `light_damage` the damage per second if the mob is in light * `on_rightclick` its same as in minetest.register_entity() * `attack_type` the attack type of a monster ("dogfight", "shoot", maybe somehting like "explode" in the future) * `arrow` if the attack_type="shoot" needed: the entity name of the arrow * `shoot_interval` the minimum shoot interval * `sounds` this is a table with sounds of the mob * `random` a sound that is played randomly * `attack` a sound that is played when a mob hits a player * `animation` a table with the animation ranges and speed of the model * `stand_start` * `stand_end` * `walk_start` * `walk_end` * `run_start` * `run_end` * `punch_start` * `punch_end` * `speed_normal` * `speed_run` used when mob runs behind player to make animation faster ### mobs:register_spawn(name, nodes, max_light, min_light, chance, active_object_count, max_height) This function registers a spawn algorithm for the animal. Without this function the call the mobs won't spawn. * `name` is the name of the animal/monster * `nodes` is a list of nodenames on that the animal/monster can spawn * `max_light` is the maximum of light * `min_light` is the minimum of light * `chance` is same as in register_abm() * `active_object_count` mob is only spawned if active_object_count_wider of ABM is <= this * `max_height` is the maximum height the mob can spawn For each mob that spawns with this function is a field in `mobs.spawning_mobs`. It tells if the mob should spawn or not. Default is `true`. So other mods can only use the API of this mod by disabling the spawning of the default mobs in this mod. ### mobs:register_arrow(name, definition) This function registers a arrow for mobs with the attack type shoot. * `name` is the name of the arrow * `definition` is a table with the following values: * `visual` same is in minetest.register_entity() * `visual_size` same is in minetest.register_entity() * `textures` same is in minetest.register_entity() * `velocity` the velocity of the arrow * `hit_player` a function that is called when the arrow hits a player; this function should hurt the player * the parameters are (self, player) * `hit_node` a function that is called when the arrow hits a node * the parameters are (self, pos, node)