Merge sync upstream 'master' of https://notabug.org/TenPlus1/mobs_redo into main

* pending changes made by mckaygerhard:
* https://notabug.org/TenPlus1/mobs_redo/issues/144 (seems need more)
* https://notabug.org/TenPlus1/mobs_redo/issues/114
* https://notabug.org/TenPlus1/mobs_redo/issues/112
This commit is contained in:
mckaygerhard 2023-06-05 15:09:15 -04:00
commit 0d96b633bf
18 changed files with 1169 additions and 722 deletions

26
.luacheckrc Normal file
View File

@ -0,0 +1,26 @@
unused_args = false
read_globals = {
"minetest",
"lucky_block",
"intllib",
"vector",
"table",
"invisibility",
"cmi",
"toolranks",
"pathfinder",
"tnt",
"ItemStack"
}
globals = {
"mobs",
"player_api",
"default"
}
ignore = {
"431", -- Shadowing an upvalue
"432", -- Shadowing an upvalue argument
}

1211
api.lua

File diff suppressed because it is too large Load Diff

67
api.txt
View File

@ -6,6 +6,17 @@ Welcome to the world of mobs in minetest and hopefully an easy guide to defining
your own mobs and having them appear in your worlds.
Quick Note
----------
Since the mobs redo api checks for nodes around the mob to function, it relies on a
default node incase anything goes wrong, so in the default game this is default:dirt
but for any custom game please make sure the following line is registered with your
preferred dirt node of choice:
minetest.register_alias("mapgen_dirt", "mymod:my_dirt_node")
Registering Mobs
----------------
@ -60,6 +71,7 @@ functions needed for the mob to work properly which contains the following:
mob when melee attacking.
'damage_group' group in which damage is dealt, dedaults to "fleshy".
'damage_texture_modifier' applies texture modifier on hit e.g "^[brighten"
or default when enabled is "^[colorize:#c9900070".
'knock_back' when true has mobs falling backwards when hit, the greater
the damage the more they move back.
'fear_height' is how high a cliff or edge has to be before the mob stops
@ -78,6 +90,7 @@ functions needed for the mob to work properly which contains the following:
level is between the min and max values below
'light_damage_min' minimum light value when mob is affected (default: 14)
'light_damage_max' maximum light value when mob is affected (default: 15)
When set to 16 then only natural light will kill mob.
'suffocation' when > 0 mobs will suffocate inside solid blocks and will be
hurt by the value given every second (0 to disable).
'floats' when set to 1 mob will float in water, 0 has them sink.
@ -138,6 +151,9 @@ functions needed for the mob to work properly which contains the following:
arrow/fireball appears on mob.
'specific_attack' has a table of entity names that mob can also attack
e.g. {"player", "mobs_animal:chicken"}.
'friendly_fire` when set to false, mobs will not be able to harm other
mobs of the same type with friendly fire arrows.
Defaults to true.
'runaway_from' contains a table with mob names to run away from, add
"player" to list to runaway from player also.
'ignore_invisibility' When true mob will still be able to see and attack
@ -237,6 +253,9 @@ functions needed for the mob to work properly which contains the following:
'shoot_start' shooting animation.
'shoot_end'
'shoot_speed'
'injured_start' when hit or damaged > 1 hp (if not set then 'walk' is used)
'injured_end'
'injured_speed'
'die_start' death animation
'die_end'
'die_speed'
@ -290,11 +309,9 @@ Custom Definition Functions
Along with the above mob registry settings we can also use custom functions to
enhance mob functionality and have them do many interesting things:
'on_die' a function that is called when the mob is killed the
parameters are (self, pos)
'on_rightclick' its same as in minetest.register_entity()
'on_blast' is called when an explosion happens near mob when using TNT
functions, parameters are (object, damage) and returns
functions, parameters are (damage) and returns
(do_damage, do_knockback, drops)
'on_spawn' is a custom function that runs on mob spawn with 'self' as
variable, return true at end of function to run only once.
@ -335,6 +352,8 @@ for each mob.
'self.child_texture' contains mob child texture when growing up
'self.base_texture' contains current skin texture which was randomly
selected from textures list
'self.texture_mods' contains a list of textures to overlay above the mobs
base texture (used for horse saddle)
'self.gotten' this is used for obtaining milk from cow and wool from
sheep
'self.horny' when animal fed enough it is set to true and animal can
@ -348,6 +367,10 @@ for each mob.
'self.order' set to "follow" or "stand" so that npc will follow owner
or stand it's ground
'self.nametag' contains the name of the mob which it can show above
'self.pause_timer' used to stop mob thinking when punched so that knockback
can take effect.
'self.disable_falling' currently used on spider mob when climbing walls, stops
the mob from experiencing gravity when true.
'self.state' Current mob state.
"stand": no movement (except turning around)
"walk": walk or move around aimlessly
@ -356,6 +379,12 @@ for each mob.
"flop": bounce around aimlessly
(for swimming mobs that have stranded)
"die": during death
'self.standing_on' Node name mob is standing on.
'self.standing_in' Node name mob is standing inside.
'self.looking_at' Node name in front of mob.
'self.looking_above'Node name in front/above mob.
'self.facing_fence' True if mob facing node containing "wall", "fence", "gate"
in it's name.
Adding Mobs in World
@ -526,10 +555,12 @@ Explosion Function
mobs:explosion(pos, radius) -- DEPRECATED!!! use mobs:boom() instead
mobs:boom(self, pos, radius)
mobs:boom(self, pos, radius, damage_radius, texture)
'self' mob entity
'pos' centre position of explosion
'radius' radius of explosion (typically set to 3)
'damage_radius' radius of damage around explosion
'texture' particle texture during explosion, defaults to "tnt_smoke.png"
This function generates an explosion which removes nodes in a specific radius
and damages any entity caught inside the blast radius. Protection will limit
@ -702,14 +733,29 @@ This function returns true if the node name given is harmful to the mob (mob_obj
it is mainly used when a mob is near a node it has to avoid.
Looting Level
-------------
If a tool is used with 'looting_level' defined under tool_capabilities then mobs can drop
extra items per level up to a maximum of 3 levels. 'looting_level' can also be read from
the tools own meta to override the default.
External Settings for "minetest.conf"
------------------------------------
'mob_node_timer_interval' How often mobs get nodes around them (0.25 is default)
for every 1/4 second.
'mob_main_timer_interval' How often mobs run main functions (1.0 is default) for
every one second.
'enable_damage' if true monsters will attack players (default is true)
'only_peaceful_mobs' if true only animals will spawn in game (default is
false)
'mobs_attack_creatura' When True mobs redo mobs will attack Creatura mod mobs.
'mobs_disable_blood' if false blood effects appear when mob is hit (default
is false)
'mob_hit_effect' False by default, when True and mobs are hit then
damage_texture_modifier is used to highlight mob.
'mobs_spawn_protected' if set to false then mobs will not spawn in protected
areas (default is true)
'mobs_spawn_monster_protected' if set to false then monsters will not spawn in
@ -720,8 +766,6 @@ External Settings for "minetest.conf"
spawn number e.g. mobs_animal:cow = 1000,5
'mob_difficulty' sets difficulty level (health and hit damage
multiplied by this number), defaults to 1.0.
'mob_show_health' if false then punching mob will not show health status
(true by default)
'mob_chance_multiplier' multiplies chance of all mobs spawning and can be set
to 0.5 to have mobs spawn more or 2.0 to spawn less.
e.g. 1 in 7000 * 0.5 = 1 in 3500 so better odds of
@ -738,6 +782,17 @@ External Settings for "minetest.conf"
mob for obstructions before spawning, otherwise it
defaults to checking the height of the mob only.
'mob_smooth_rotate' Enables smooth rotation when mobs turn by default.
'mob_height_fix' Enabled by default, increases smaller mob heights so they wont
glitch through certain nodes.
'mob_pathfinding_enable' Enable pathfinding.
'mob_pathfinder_enable' Use pathfinder mod if available.
'mob_pathfinding_stuck_timeout' How long before stuck mobs start searching. (default 3.0)
'mob_pathfinding_stuck_path_timeout' How long will mob follow path before giving up. (default 5.0)
'mob_pathfinding_algorithm' Which pathfinding algorithm to use Dijkstra (default), A*_noprefetch (AStar_noprefetch) or A* (AStar)
(A* names differ cause Minetest doesn´t allow "*" in settings)
'mob_pathfinding_searchdistance' max search distance from search positions (default 16)
'mob_pathfinding_max_jump' max jump height for pathfinding (default 4)
'mob_pathfinding_max_drop' max drop height for pathfinding (default 6)
Players can override the spawn chance for each mob registered by adding a line
to their minetest.conf file with a new value, the lower the value the more each

View File

@ -53,6 +53,7 @@ minetest.register_tool("mobs:lasso", {
})
if minetest.get_modpath("farming") then
minetest.register_craft({
output = "mobs:lasso",
recipe = {
@ -73,6 +74,7 @@ minetest.register_tool("mobs:net", {
})
if minetest.get_modpath("farming") then
minetest.register_craft({
output = "mobs:net",
recipe = {
@ -148,7 +150,9 @@ minetest.register_craft({
-- make sure we can register fences
if minetest.get_modpath("default") and default.register_fence then
local mod_def = minetest.get_modpath("default")
if mod_def and default.register_fence then
-- mob fence (looks like normal fence but collision is 2 high)
default.register_fence("mobs:fence_wood", {
@ -156,7 +160,7 @@ default.register_fence("mobs:fence_wood", {
texture = "default_wood.png",
material = "default:fence_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults(),
sounds = mod_def and default.node_sound_wood_defaults(),
collision_box = {
type = "fixed",
fixed = {
@ -174,7 +178,7 @@ minetest.register_node("mobs:fence_top", {
paramtype = "light",
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults(),
sounds = mod_def and default.node_sound_wood_defaults(),
node_box = {
type = "fixed",
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
@ -244,6 +248,7 @@ minetest.register_craft({
-- this tool spawns same mob and adds owner, protected, nametag info
-- then removes original entity, this is used for fixing any issues.
-- also holding sneak while punching mob lets you change texture name.
local tex_obj
@ -353,23 +358,49 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
end)
-- Meat Block (thanks to painterlypack.net for allowing me to use these textures)
-- Meat Block
minetest.register_node("mobs:meatblock", {
description = S("Meat Block"),
tiles = {"mobs_meat_top.png", "mobs_meat_bottom.png", "mobs_meat_side.png"},
paramtype2 = "facedir",
groups = {choppy = 1, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default and default.node_sound_leaves_defaults(),
sounds = mod_def and default.node_sound_leaves_defaults(),
on_place = minetest.rotate_node,
on_use = minetest.item_eat(20)
})
minetest.register_craft({
output = "mobs:meatblock",
-- type = "shapeless",
recipe = {
{"group:food_meat", "group:food_meat", "group:food_meat"},
{"group:food_meat", "group:food_meat", "group:food_meat"},
{"group:food_meat", "group:food_meat", "group:food_meat"}
}
})
-- Meat Block (raw)
minetest.register_node("mobs:meatblock_raw", {
description = S("Raw Meat Block"),
tiles = {"mobs_meat_raw_top.png", "mobs_meat_raw_bottom.png", "mobs_meat_raw_side.png"},
paramtype2 = "facedir",
groups = {choppy = 1, oddly_breakable_by_hand = 1, flammable = 2},
sounds = mod_def and default.node_sound_leaves_defaults(),
on_place = minetest.rotate_node,
on_use = minetest.item_eat(20)
})
minetest.register_craft({
output = "mobs:meatblock_raw",
recipe = {
{"group:food_meat_raw", "group:food_meat_raw", "group:food_meat_raw"},
{"group:food_meat_raw", "group:food_meat_raw", "group:food_meat_raw"},
{"group:food_meat_raw", "group:food_meat_raw", "group:food_meat_raw"}
}
})
minetest.register_craft({
type = "cooking",
output = "mobs:meatblock",
recipe = "mobs:meatblock_raw",
cooktime = 30
})

View File

@ -8,3 +8,4 @@ lucky_block?
cmi?
toolranks?
pathfinder?
player_api?

View File

@ -19,3 +19,19 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Textures under CC0 license by TenPlus1
ShadowNinja (CC BY-SA 3.0):
tnt_smoke.png
mobs_swing.ogg by qubodup (CC0)
- http://freesound.org/people/qubodup/sounds/60012/
mobs_spell.ogg by littlerobotsoundfactory (CC0)
- http://freesound.org/people/LittleRobotSoundFactory/sounds/270396/
mobs_punch.ogg by Merrick079 (CC0)
- https://freesound.org/people/Merrick079/sounds/566436/

View File

@ -492,6 +492,7 @@ function mobs.fly(entity, _, speed, shoots, arrow, moving_anim, stand_anim)
ent.switch = 1 -- for mob specific arrows
ent.owner_id = tostring(entity.object) -- so arrows dont hurt entity you are riding
local vec = {x = dir.x * 6, y = dir.y * 6, z = dir.z * 6}
yaw = entity.driver:get_look_horizontal()

479
readme.MD
View File

@ -1,98 +1,415 @@
MOBS REDO for MINETEST
======================
Built from PilzAdam's original Simple Mobs with additional mobs by KrupnoPavel, Zeg9, ExeterDad and AspireMint.
This mod contains the API only for adding your own mobs into the world, so
please use the additional modpacks to add animals, monsters, and npcs.
https://forum.minetest.net/viewtopic.php?f=11&t=9917
Information
-----------
This mod contains the API only for adding your own mobs into the world, so please use the additional modpacks to add animals, monsters etc.
Built from PilzAdam's original Simple Mobs with additional mobs by KrupnoPavel,
Zeg9, ExeterDad and AspireMint.
## Crafts
- **Nametag**. Can be crafted by paper, black dye, and string. Can be used
to right-click on a tamed mob to give them a name.
- **Net**. Used to right-click tamed mobs to pick them up and place inside
inventory as a spawn egg.
- **Magic lasso**. Similar to nets but with a better chance of picking up
larger mobs.
- **Shears**. Used to right-click sheep and return 1-3 wool.
- **Protection Rune**. Protects tamed mobs from being harmed by other players.
- **Mob Fence and Fence Top**. Stops mobs escaping or glitching throughfences.
**Lucky Blocks**: 12
## Changelog
### Version 1.57
* Added 'injured' animation when mob hurt
* Fixed yaw clamping to stop spinning mobs
* Added 'mob_node_timer_interval' and 'mob_main_timer_interval' settings
* Added ability for mobs to die only in natural daylight
* Refactored do_jump and added get_nodes function
* Many bug fixes and tweaks to improve performance
* Added 'mobs_attack_creatura' setting so that monsters can attack Creatura mobs
### Version 1.56
* Added `arrow_override` function to mob definition to tweak arrow entity settings
* Added injured animation and mob hit effect
* Tamed monsters no longer despawn when outside loaded map area
* `looting_level` can be read from tool definition or tool meta to add extra
drops when mob killed
### Version 1.55
* Added `peaceful_player` privilege and setting so mobs don't attack specific
players (thanks sfence)
* Added support for MarkBu's `pathfinder` mod, remove need for default mod
### Version 1.54
* **New support for swimming mobs**
- `on_flop` (for mobs not in water)
- `air_damage` added
* Added editable settings (thanks Wuzzy)
* Simplified animal breeding function
* Child mobs now take twenty minutes to grow up
* Reverted to simple mob spawning with setting to use area checks
### Version 1.53
* Added `on_map_load` settings to `mobs:spawn` so that mobs will only spawn
when new areas of map are loaded.
### Version 1.52
* Added `mob_active_limit` in settings to set number of mobs in game. The
default is 0, for unlimited mobs.
* Removed `{immortal}` from mob armor
* Fluid viscocity slows mobs (for example, water)
### Version 1.51
* Added node checks for dangerous nodes
* Add `mob_nospawn_range` setting
* Jumping and falling tweaks
* Spawn area check (thanks for idea wuzzy)
* Re-enabled mob suffocation
### Version 1.50
* Added new `line_of_sight` function that uses raycasting if Minetest 5.0 is
found, (thanks Astrobe)
* Added Chinese local
* Removed ability to spawn mobs if world anchor nearby (`technic` or
`simple_anchor` mods)
### Version 1.49
* Added `mobs:force_capture(self, player)` function
* API functions now use metatables thanks to bell07
### Version 1.48
* Added `mobs:set_velocity(self, velocity)` global function
### Version 1.47
* Added minimum and maximum light level for damage
* Mob damage changes
* Ignition sources checked for lava damage
### Version 1.46
* Mobs only drop rare items when killed by player. You can make change the
drops to rare items by using `drops.min = 0`
* Pathfinding no longer sees through walkable nodes
### Version 1.45
* Added fence top to add on top of any fence to stop mobs escaping
* New `line_of_sight` tweaked by `Astrobe`
### Version 1.44
* Added `ToolRanks` support for swords when attacking mobs
### Version 1.43
* Added general attack function and settings
* Better Minetest 0.4.16 compatibility
### Version 1.42
* Added `"all"` option to `immune_to` definition table
* Tidied floating mobs to be less intensive
### Version 1.41
* Mob pathfinding has been updated thanks to `Elkien3`
### Version 1.40
* Updated to use newer functions, requires Minetest 0.4.16+ to work
### Version 1.39
* **New custom functions**:
- `on_breed` (called when mobs have just been bred)
- `on_grown` (called when baby mobs have grown up)
- `do_punch` (called when the mob has been punched or damaged by another mob)
### Version 1.38
* Better entity checking
* Nametag setting
* `on_spawn` function added to mob registry
* Tweaked light damage
### Version 1.37
* Added support for `Raymoo`'s CMI (common mob interface) mod. See
https://forum.minetest.net/viewtopic.php?f=9&t=15448 for details
### Version 1.36
* Added death check. If the mob dies in fire/lava/with lava pick, then drops
are cooked
### Version 1.35
* Added `owner_loyal` flag for owned mobs to attack player enemies
* Fixed `group_attack`
### Version 1.34
* Added function to fly mob using directional movement (thanks D00Med for
flying code)
### Version 1.33
* Added functions to mount ride mobs:
- `mobs.attach`
- `mobs.detach`
- `mobs.drive`. Many thanks to `Blert2112`
### Version 1.32
* Added new spawn check to count specific mobs AND new `minetest.conf` setting
to chance spawn chance and numbers
* Added ability to protect tamed mobs
### Version 1.31
* Added `attack_animals` and `specific_attack` flags for custom monster
attacks
* Added 'mob_difficulty' .conf setting to make mobs harder
### Version 1.30
* Added support for `invisibility` mod
* Tweaked and tidied code
### Version 1.29
* Split original Mobs Redo into a modpack to make it easier to disable mob sets
(animal, monster, npc) or simply use the API itself for your own mod
### Version 1.28
* Added new damage system with ability for mob to be immune to weapons or
healed by them :)
### Version 1.27
* Added new sheep, lava flan and spawn egg textures
* New Lava Pick tool smelts what you dig
* New `atan` checking function
### Version 1.26
* Pathfinding feature added thanks to rnd
* When monsters attack they become scary smart in finding you :)
* Beehive produces honey now :)
### Version 1.25
* Mobs no longer spawn within 12 blocks of player or despawn within same
range
* Spawners now have player detection
* Tidy and tweak code
### Version 1.24
* Added feature where certain animals run away when punched
(`runaway = true` in mob definition)
### Version 1.23
* Added mob spawner block for admin to setup spawners in-game (place and
right-click to enter settings)
### Version 1.22
* Added ability to name tamed animals and NPCs using nametags
* NPCs will attack anyone who punches them apart from owner
### Version 1.21
* Added some more error checking to reduce `serialize.h` error and added height
checks for falling off cliffs (thanks `cmdskp`)
### Version 1.20
* Error checking added to remove bad mobs
* Out of map limit mobs and stop `serialize.h` error
### Version 1.19
* Chickens now drop egg items instead of placing the egg
* Throwing eggs result in ⅛ chance of spawning chick
### Version 1.18
* Added `docile_by_day` flag so that monsters will not attack automatically
during daylight hours unless hit first
### Version 1.17
* Added `dogshoot` attack type. Mobs now shoot when out of reach
* Melee attack when in reach, also API tweaks and `self.reach` added
### Version 1.16
* Mobs follow multiple items now
* NPCs can now breed
### Version 1.15
* Added feeding, taming, and breeding function
* Right-click to pick up any sheep with X mark on them and replace with new one
to fix compatibility.
### Version 1.14
* All variables saved in staticdata
* Fixed health bug
### Version 1.13
* Added capture function (thanks `blert2112`) chance of picking up mob with a
hand, a net, or a magic lasso
* Replaced some `.x` models with newer `.b3d` ones
### Version 1.12
* Added animal ownership so that players cannot steal your tamed animals
### Version 1.11
* Added flying and swimming mobs
* `fly=true` and `fly_in="air"` or `"default:water_source"` for fishy
### Version 1.10
* Added explosion routine for exploding mob
* Footstep removed (use replace)
### Version 1.09
https://forum.minetest.net/viewtopic.php?f=11&t=9917
* Added mob rotation value
* Added footstep feature
* Added jumping mobs with sounds feature
* Aadded magic lasso for picking up animals
* Reworked breeding routine
### Version 1.08
### Crafts:
* Added drops that appear when mob is killed
* New custom function: `on_die` function
* Mob throwing attack has been rehauled so that they can damage one another,
- Nametag (paper, black dye, string) can be used right-click on a tamed mob to give them a name.
- Nets can be used to right-click tamed mobs to pick them up and place inside inventory as a spawn egg.
- Magic Lasso is similar to nets but with a better chance of picking up larger mobs.
- Shears are used to right-click sheep and return 1-3 wool.
- Protection Rune lets you protect tamed mobs from harm by other players
- Mob Fence and Fence Top (to stop mobs escaping/glitching through fences)
### Version 1.07
Lucky Blocks: 9
* NPCs can now be set to follow player or stand by using `order` and `owner`
variables
* BETA: Npc mob added. They kill monsters (maybe as guards) and attack players
when punched by them. Right-clicking them with food will heal them, and
giving them gold lump will make them drop a random item.
## Changelog:
### Version 1.06
* Changed recovery times after breeding. Time taken to grow up can be sped up
by feeding the baby animal.
### Version 1.05
* Added `ExeterDad`'s bunniess which can be picked up and tamed with four carrots from `farming_redo` or `farming_plus`
* Added shears to get wool from sheep
* Added Jordach/BSD's kitten
### Version 1.04
* Added mating for sheep, cows and hogs
* Added feature to feed animals to make horny and hope for a baby which is half
size, they will grow up quick though :)
### Version 1.03
* Added mob drop/replace feature so that chickens can drop eggs and cow/sheep
can eat grass/wheat etc.
### Version 1.02
* Sheared sheep are remembered and spawn shaven
* Warthogs will attack when threatened
* API additions
### Version 1.01
* Mobs that suffer fall damage or die in water/lava/sunlight will now drop
items
### Version 1.0
* More work on API so that certain mobs can float in water while some sink like
a brick :)
### Version 0.9
* Spawn eggs added for all mobs (admin only, cannot be placed in protected
areas)
* Tweaked API
### Version 0.8
* Added sounds to monster mobs (thanks `Cyberpangolin` for the `sfx`)
* Added chicken sound
### Version 0.7
* `mobs.protected` switch added to `api.lua`. When set to 1 mobs no longer
spawn in protected areas
* Minor bugfixes
### Version 0.6
* API now supports multi-textured mobs, e.g oerkki, dungeon master, rats and
chickens have random skins when spawning (sheep fix TODO)
* Added new Honey block
### Version 0.5
* Mobs now float in water, die from falling
* Minor code improvements
### Version 0.4
* Added new sheep sound :)
* Dungeon Masters and Mese Monsters have much better aim due to `shoot_offset`
* They can both shoot through nodes that aren't walkable (flowers, grass, etc.)
### Version 0.3
* Added `LOTT`'s Spider mob
* Added Cobwebs
* Added KPavel's Bee with Honey and Beehives (made texture)
* Warthogs now have sound and can be tamed
* Taming of shaved sheep or milked cow with 8 wheat so it will not despawn
* Multiple bug fixes :)
### Version 0.2
* Cooking bucket of milk into cheese now returns empty bucket
### Version 0.1
- Initial Release
- 1.56 - Added arrow_override function to mob definition to tweak arrow entity settings, tamed monsters no longer despawn when outside loaded map area.
- 1.55 - Add 'peaceful_player' privelage and setting so mobs don't attack specific players (thanks sfence), add support for MarkBu's pathfinder mod, remove need for default mod
- 1.54 - Simplified animal breeding function, added editable settings (thanks Wuzzy), Child mobs now take 20 mins to grow up, reverted to simple mob spawning with setting to use area checks, on_flop added, air_damage added.
- 1.53 - Added 'on_map_load' settings to mobs:spawn so that mobs will only spawn when new areas of map are loaded.
- 1.52 - Added 'mob_active_limit' in settings to set number of mobs in game,
(default is 0 for unlimited), removed {immortal} from mob armor, fluid viscocity slows mobs
- 1.51 - Added some node checks for dangerous nodes, jumping and falling tweaks, spawn area check (thx for idea wuzzy), re-enabled mob suffocation, add 'mob_nospawn_range' setting
- 1.50 - Added new line_of_sight function that uses raycasting if mt5.0 is found, (thanks Astrobe), dont spawn mobs if world anchor nearby (technic or simple_anchor mods), chinese local added
- 1.49- Added mobs:force_capture(self, player) function, api functions now use metatables thanks to bell07
- 1.48- Add mobs:set_velocity(self, velocity) global function
- 1.47- Mob damage changes, min and max light level for damage added, ignition sources checked for lava damage
- 1.46- Mobs only drop rare items when killed by player (drops.min = 0 makes them rare), code tweak, pathfinding no longer sees through walkable nodes
- 1.45- Added Fence Top to add on top of any fence to stop mobs escaping, new line_of_sight tweaked by Astrobe
- 1.44- Added ToolRanks support for swords when attacking mobs
- 1.43- Better 0.4.16 compatibility, added general attack function and settings
- 1.42- Added "all" option to immune_to table, tidied floating mobs to be less intensive
- 1.41- Mob pathfinding has been updated thanks to Elkien3
- 1.40- Updated to use newer functions, requires Minetest 0.4.16+ to work.
- 1.39- Added 'on_breed', 'on_grown' and 'do_punch' custom functions per mob
- 1.38- Better entity checking, nametag setting and on_spawn function added to mob registry, tweaked light damage
- 1.37- Added support for Raymoo's CMI (common mob interface) mod: https://forum.minetest.net/viewtopic.php?f=9&t=15448
- 1.36- Death check added, if mob dies in fire/lava/with lava pick then drops are cooked
- 1.35- Added owner_loyal flag for owned mobs to attack player enemies, also fixed group_attack
- 1.34- Added function to fly mob using directional movement (thanks D00Med for flying code)
- 1.33- Added functions to mount ride mobs (mobs.attach, mobs.detach, mobs.drive) many thanks to Blert2112
- 1.32- Added new spawn check to count specific mobs AND new minetest.conf setting to chance spawn chance and numbers, added ability to protect tamed mobs
- 1.31- Added 'attack_animals' and 'specific_attack' flags for custom monster attacks, also 'mob_difficulty' .conf setting to make mobs harder.
- 1.30- Added support for invisibility mod (mobs cant attack what they cant see), tweaked and tidied code
- 1.29- Split original Mobs Redo into a modpack to make it easier to disable mob sets (animal, monster, npc) or simply use the Api itself for your own mod
- 1.28- New damage system added with ability for mob to be immune to weapons or healed by them :)
- 1.27- Added new sheep, lava flan and spawn egg textures. New Lava Pick tool smelts what you dig. New atan checking function.
- 1.26- Pathfinding feature added thanks to rnd, when monsters attack they become scary smart in finding you :) also, beehive produces honey now :)
- 1.25- Mobs no longer spawn within 12 blocks of player or despawn within same range, spawners now have player detection, Code tidy and tweak.
- 1.24- Added feature where certain animals run away when punched (runaway = true in mob definition)
- 1.23- Added mob spawner block for admin to setup spawners in-game (place and right click to enter settings)
- 1.22- Added ability to name tamed animals and npc using nametags, also npc will attack anyone who punches them apart from owner
- 1.21- Added some more error checking to reduce serialize.h error and added height checks for falling off cliffs (thanks cmdskp)
- 1.20- Error checking added to remove bad mobs, out of map limit mobs and stop serialize.h error
- 1.19- Chickens now drop egg items instead of placing the egg, also throwing eggs result in 1/8 chance of spawning chick
- 1.18- Added docile_by_day flag so that monsters will not attack automatically during daylight hours unless hit first
- 1.17- Added 'dogshoot' attack type, shoots when out of reach, melee attack when in reach, also api tweaks and self.reach added
- 1.16- Mobs follow multiple items now, Npc's can breed
- 1.15- Added Feeding/Taming/Breeding function, right-click to pick up any sheep with X mark on them and replace with new one to fix compatibility.
- 1.14- All .self variables saved in staticdata, Fixed self.health bug
- 1.13- Added capture function (thanks blert2112) chance of picking up mob with hand; net; magic lasso, replaced some .x models with newer .b3d one's
- 1.12- Added animal ownership so that players cannot steal your tamed animals
- 1.11- Added flying mobs (and swimming), fly=true and fly_in="air" or "deafult:water_source" for fishy
- 1,10- Footstep removed (use replace), explosion routine added for exploding mobs.
- 1.09- reworked breeding routine, added mob rotation value, added footstep feature, added jumping mobs with sounds feature, added magic lasso for picking up animals
- 1.08- Mob throwing attack has been rehauled so that they can damage one another, also drops and on_die function added
- 1.07- Npc's can now be set to follow player or stand by using self.order and self.owner variables
- beta- Npc mob added, kills monsters, attacks player when punched, right click with food to heal or gold lump for drop
- 1.06- Changed recovery times after breeding, and time taken to grow up (can be sped up by feeding baby animal)
- 1.05- Added ExeterDad's bunny's which can be picked up and tamed with 4 carrots from farming redo or farming_plus, also shears added to get wool from sheep and lastly Jordach/BSD's kitten
- 1.04- Added mating for sheep, cows and hogs... feed animals to make horny and hope for a baby which is half size, will grow up quick though :)
- 1.03- Added mob drop/replace feature so that chickens can drop eggs, cow/sheep can eat grass/wheat etc.
- 1.02- Sheared sheep are remembered and spawn shaven, Warthogs will attack when threatened, Api additions
- 1.01- Mobs that suffer fall damage or die in water/lava/sunlight will now drop items
- 1.0 - more work on Api so that certain mobs can float in water while some sink like a brick :)
- 0.9 - Spawn eggs added for all mobs (admin only, cannot be placed in protected areas)... Api tweaked
- 0.8 - Added sounds to monster mobs (thanks Cyberpangolin for the sfx) and also chicken sound
- 0.7 - mobs.protected switch added to api.lua, when set to 1 mobs no longer spawn in protected areas, also bug fixes
- 0.6 - Api now supports multi-textured mobs, e.g oerkki, dungeon master, rats and chickens have random skins when spawning (sheep fix TODO), also new Honey block
- 0.5 - Mobs now float in water, die from falling, and some code improvements
- 0.4 - Dungeon Masters and Mese Monsters have much better aim due to shoot_offset, also they can both shoot through nodes that aren't walkable (flowers, grass etc) plus new sheep sound :)
- 0.3 - Added LOTT's Spider mob, made Cobwebs, added KPavel's Bee with Honey and Beehives (made texture), Warthogs now have sound and can be tamed, taming of shaved sheep or milked cow with 8 wheat so it will not despawn, many bug fixes :)
- 0.2 - Cooking bucket of milk into cheese now returns empty bucket
- 0.1 - Initial Release

View File

@ -1,3 +1,12 @@
# Enable setting so that Mobs Redo mobs can attack Creatura mobs
mobs_attack_creatura (Attack Creatura Mobs) bool false
# How often mobs get nodes around them (default is 0.25, 1/4 second)
mob_node_timer_interval (Mob Node Timer Interval) float 0.25
# How often mobs run main functions (default is 1.00, 1 second)
mob_main_timer_interval (Mob Node Timer Interval) float 1.00
# If false then mobs no longer spawn in world without spawner or spawn egg
mobs_spawn (Spawn Mobs) bool true
@ -7,6 +16,9 @@ only_peaceful_mobs (Only spawn peaceful Mobs) bool false
# If enabled then punching mobs no longer shows blood effects
mobs_disable_blood (Disable Mob blood) bool false
# If enabled the mobs will be highlighted when hit
mob_hit_effect (Highlight Mob when Hit) bool false
# If disabled then Mobs no longer destroy world blocks
mobs_griefing (Griefing Mobs) bool true
@ -22,9 +34,6 @@ remove_far_mobs (Remove far Mobs) bool true
# Sets Mob difficulty level by multiplying punch damage
mob_difficulty (Mob difficulty) float 1.0
# If disabled health status no longer appears above Mob when punched
mob_show_health (Show Mob health) bool true
# Contains a value used to multiply Mob spawn values
mob_chance_multiplier (Mob chance multiplier) float 1.0
@ -45,3 +54,28 @@ enable_peaceful_player (Mobs do not attack peaceful player without reason) bool
# Enable mobs smooth rotation
mob_smooth_rotate (Smooth rotation for mobs) bool true
# Fix Mob Height if too low so they cannot escape through specific nodes
mob_height_fix (Fix Mob Height) bool true
[Pathfinding]
# Enable pathfinding (default Enabled)
mob_pathfinding_enable (Enable pathfinding) bool true
# Use pathfinder mod if available (default Enabled)
mob_pathfinder_enable (Use pathfinder mod if available) bool true
# How long before stuck mobs starts searching (default 3.0)
mob_pathfinding_stuck_timeout (How long before stuck mobs start searching) float 3.0
# How long will mob follow path before giving up (default 5.0)
mob_pathfinding_stuck_path_timeout (How long will mob follow path before giving up) float 5.0
# Which pathfinding algorithm to use
# - Dijkstra (default)
# - A*_noprefetch (AStar_noprefetch)
# - A* (AStar)
# (A* names differ cause Minetest doesn´t allow "*" in settings)
mob_pathfinding_algorithm (pathfinding algorithm) enum Dijkstra Dijkstra,AStar_noprefetch,AStar
# max search distance from search positions (default 16)
mob_pathfinding_searchdistance (path search distance) int 16
# max jump height for pathfinding (default 4)
mob_pathfinding_max_jump (path max jump height) int 4
# max drop height for pathfinding (default 6)
mob_pathfinding_max_drop (path max drop height) int 6

Binary file not shown.

View File

@ -1,7 +0,0 @@
Creative Commons sounds from Freesound.org
mobs_swing.ogg by qubodup
- http://freesound.org/people/qubodup/sounds/60012/
mobs_spell.ogg by littlerobotsoundfactory
- http://freesound.org/people/LittleRobotSoundFactory/sounds/270396/

BIN
sounds/mobs_punch.ogg Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 734 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 287 B

After

Width:  |  Height:  |  Size: 748 B