mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2024-12-24 01:30:22 +01:00
changed 'mob_spawn_amend' to 'mob_chance_multiplier'
This commit is contained in:
parent
e5baaa5e13
commit
93ca01de00
4
api.lua
4
api.lua
@ -61,7 +61,7 @@ local remove_far = minetest.settings:get_bool("remove_far_mobs")
|
||||
local difficulty = tonumber(minetest.settings:get("mob_difficulty")) or 1.0
|
||||
local show_health = minetest.settings:get_bool("mob_show_health") ~= false
|
||||
local max_per_block = tonumber(minetest.settings:get("max_objects_per_block") or 99)
|
||||
local mob_spawn_amend = tonumber(minetest.settings:get("mob_spawn_amend") or 1)
|
||||
local mob_chance_multiplier = tonumber(minetest.settings:get("mob_chance_multiplier") or 1)
|
||||
|
||||
-- Peaceful mode message so players will know there are no monsters
|
||||
if peaceful_only then
|
||||
@ -2835,7 +2835,7 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light,
|
||||
nodenames = nodes,
|
||||
neighbors = neighbors,
|
||||
interval = interval,
|
||||
chance = (chance * mob_spawn_amend),
|
||||
chance = min(1, (chance * mob_chance_multiplier)),
|
||||
catch_up = false,
|
||||
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
|
2
api.txt
2
api.txt
@ -13,7 +13,7 @@ The mob api is a function that can be called on by other mods to add new animals
|
||||
'mobname' can change specific mob chance rate (0 to disable) and 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_spawn_amend' defaults to 1.0 but can be set to 0.5 to half ALL spawn rates or 2.0 to double.
|
||||
'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 spawning.
|
||||
|
||||
mobs:register_mob(name, definition)
|
||||
|
||||
|
36
api_new.txt
36
api_new.txt
@ -531,23 +531,25 @@ Certain variables need to be set before using the above functions:
|
||||
External Settings for "minetest.conf"
|
||||
------------------------------------
|
||||
|
||||
'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_disable_blood' if false blood effects appear when mob is hit (default
|
||||
is false)
|
||||
'mobs_spawn_protected' if set to false then mobs will not spawn in protected
|
||||
areas (default is true)
|
||||
'remove_far_mobs' if true then mobs that are outside players visual
|
||||
range will be removed (default is false)
|
||||
'mobname' can change specific mob chance rate (0 to disable) and
|
||||
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_spawn_amend' defaults to 1.0 but can be set to 0.5 to half ALL spawn
|
||||
rates or 2.0 to double.
|
||||
'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_disable_blood' if false blood effects appear when mob is hit (default
|
||||
is false)
|
||||
'mobs_spawn_protected' if set to false then mobs will not spawn in protected
|
||||
areas (default is true)
|
||||
'remove_far_mobs' if true then mobs that are outside players visual
|
||||
range will be removed (default is false)
|
||||
'mobname' can change specific mob chance rate (0 to disable) and
|
||||
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
|
||||
spawning.
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user