forked from mtcontrib/plantlife_modpack
Rarity / fertility tweaks for various mods (#8)
For bushes, molehills and youngtrees: Changes to rarity and minimum fertility. Also added use of rarity_fertility. Result is more balanced and less homogeneous, i.e. over a large area you'll see variation. For vines, some further tweaks to rarity, and using tries field to improve vines distribution.
This commit is contained in:
parent
cb2373f089
commit
4953b1ba54
|
@ -10,6 +10,15 @@
|
|||
local S = minetest.get_translator("bushes")
|
||||
abstract_bushes = {}
|
||||
|
||||
local bushes_bush_rarity = tonumber(minetest.settings:get("bushes_bush_rarity")) or 99.9
|
||||
local bushes_bush_rarity_fertility = tonumber(minetest.settings:get("bushes_bush_rarity_fertility")) or 1.5
|
||||
local bushes_bush_fertility = tonumber(minetest.settings:get("bushes_bush_fertility")) or -1
|
||||
|
||||
local bushes_youngtrees_rarity = tonumber(minetest.settings:get("bushes_youngtrees_rarity")) or 100
|
||||
local bushes_youngtrees_rarity_fertility = tonumber(minetest.settings:get("bushes_youngtrees_rarity_fertility")) or 0.6
|
||||
local bushes_youngtrees_fertility = tonumber(minetest.settings:get("bushes_youngtrees_fertility")) or -0.5
|
||||
|
||||
|
||||
minetest.register_node("bushes:youngtree2_bottom", {
|
||||
description = S("Young Tree 2 (bottom)"),
|
||||
drawtype="nodebox",
|
||||
|
@ -160,9 +169,8 @@ abstract_bushes.grow_bush = function(pos)
|
|||
abstract_bushes.grow_bush_node(pos,5,leaf_type)
|
||||
end
|
||||
|
||||
|
||||
abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
|
||||
|
||||
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
|
||||
|
||||
|
@ -206,10 +214,10 @@ biome_lib.register_on_generate({
|
|||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = 15, --10,15
|
||||
rarity = 101 - 4, --3,4
|
||||
rarity = bushes_bush_rarity,
|
||||
rarity_fertility = bushes_bush_rarity_fertility,
|
||||
plantlife_limit = bushes_bush_fertility,
|
||||
min_elevation = 1, -- above sea level
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_bushes.grow_bush
|
||||
)
|
||||
|
@ -219,9 +227,8 @@ biome_lib.register_on_generate({
|
|||
abstract_bushes.grow_youngtree_node2(pos,height)
|
||||
end
|
||||
|
||||
|
||||
abstract_bushes.grow_youngtree_node2 = function(pos, height)
|
||||
|
||||
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
|
||||
local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z}
|
||||
|
@ -239,7 +246,6 @@ abstract_bushes.grow_youngtree_node2 = function(pos, height)
|
|||
minetest.swap_node(three_above_right_here, {name="bushes:BushLeaves1" })
|
||||
minetest.swap_node(three_above_right_here_south, {name="bushes:BushLeaves1" })
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -251,12 +257,10 @@ biome_lib.register_on_generate({
|
|||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = 55, --10,15
|
||||
rarity = 101 - 4, --3,4
|
||||
rarity = bushes_youngtrees_rarity,
|
||||
rarity_fertility = bushes_youngtrees_rarity_fertility,
|
||||
plantlife_limit = bushes_youngtrees_fertility,
|
||||
min_elevation = 1, -- above sea level
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_bushes.grow_youngtree2
|
||||
)
|
||||
|
||||
--http://dev.minetest.net/Node_Drawtypes
|
||||
|
|
17
bushes/settingtypes.txt
Normal file
17
bushes/settingtypes.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
#Bush rarity %
|
||||
bushes_bush_rarity (Bush rarity %) float 99.9 0 100
|
||||
|
||||
#How much the rarity is reduced by fertility %
|
||||
bushes_bush_rarity_fertility (Bush rarity fertility reduction %) float 1.5 0 100
|
||||
|
||||
#Bush minimum fertility (-1 to +1)
|
||||
bushes_bush_fertility (Bush minimum fertility) float -0.7 -1 1
|
||||
|
||||
#Youngtree (from bushes mod) rarity %
|
||||
bushes_youngtrees_rarity (Youngtree bush rarity %) float 100 0 100
|
||||
|
||||
#How much the rarity is reduced by fertility %
|
||||
bushes_youngtrees_rarity_fertility (Youngtree bush rarity fertility reduction %) float 0.6 0 100
|
||||
|
||||
#Youngtree (from bushes mod) minimum fertility (-1 to +1)
|
||||
bushes_youngtrees_fertility (Youngtree bush minimum fertility) float -0.5 -1 1
|
|
@ -1,14 +1,13 @@
|
|||
-----------------------------------------------------------------------------------------------
|
||||
local title = "Mole Hills"
|
||||
local version = "0.0.3"
|
||||
local mname = "molehills"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Idea by Sokomine
|
||||
-- Code & textures by Mossmanikin
|
||||
|
||||
abstract_molehills = {}
|
||||
|
||||
dofile(minetest.get_modpath("molehills").."/molehills_settings.txt")
|
||||
local molehills_rarity = tonumber(minetest.settings:get("molehills_rarity")) or 99.5
|
||||
local molehills_rarity_fertility = tonumber(minetest.settings:get("molehills_rarity_fertility")) or 1
|
||||
local molehills_fertility = tonumber(minetest.settings:get("molehills_fertility")) or -0.6
|
||||
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("molehills")
|
||||
|
@ -64,17 +63,13 @@ end
|
|||
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
max_count = Molehills_Max_Count,
|
||||
rarity = Molehills_Rarity,
|
||||
rarity = molehills_rarity,
|
||||
rarity_fertility = molehills_rarity_fertility,
|
||||
plantlife_limit = molehills_fertility,
|
||||
min_elevation = 1,
|
||||
max_elevation = 40,
|
||||
avoid_nodes = {"group:tree","group:liquid","group:stone","group:falling_node"--[[,"air"]]},
|
||||
avoid_radius = 4,
|
||||
plantlife_limit = -0.3,
|
||||
},
|
||||
abstract_molehills.place_molehill
|
||||
)
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
print("[Mod] "..title.." ["..version.."] ["..mname.."]".."Loaded...")
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
-- Settings for generation of stuff (at map-generation time)
|
||||
|
||||
Molehills_Max_Count = 320 -- absolute maximum number in an area of 80x80x80 nodes
|
||||
|
||||
Molehills_Rarity = 95 -- larger values make molehills more rare (100 means chance of 0 %)
|
||||
|
8
molehills/settingtypes.txt
Normal file
8
molehills/settingtypes.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
#Molehills rarity %
|
||||
molehills_rarity (Molehills rarity %) float 99.5 0 100
|
||||
|
||||
#How much the rarity is reduced by fertility %
|
||||
molehills_rarity_fertility (Molehills rarity fertility reduction %) float 1 0 100
|
||||
|
||||
#Molehills minimum fertility (-1 to +1)
|
||||
molehills_fertility (Molehills minimum fertility) float -0.6 -1 1
|
|
@ -11,8 +11,8 @@ local enable_side = minetest.settings:get_bool("vines_enable_side", true)
|
|||
local enable_jungle = minetest.settings:get_bool("vines_enable_jungle", true)
|
||||
local enable_willow = minetest.settings:get_bool("vines_enable_willow", true)
|
||||
|
||||
local default_rarity = 75
|
||||
local rarity_roots = tonumber(minetest.settings:get("vines_rarity_roots")) or default_rarity
|
||||
local rarity_roots = tonumber(minetest.settings:get("vines_rarity_roots")) or 70
|
||||
local default_rarity = 95
|
||||
local rarity_standard = tonumber(minetest.settings:get("vines_rarity_standard")) or default_rarity
|
||||
local rarity_side = tonumber(minetest.settings:get("vines_rarity_side")) or default_rarity
|
||||
local rarity_jungle = tonumber(minetest.settings:get("vines_rarity_jungle")) or default_rarity
|
||||
|
@ -371,6 +371,7 @@ if enable_roots ~= false then
|
|||
spawn_on_bottom = true,
|
||||
plantlife_limit = -0.6,
|
||||
rarity = rarity_roots,
|
||||
tries = 3,
|
||||
humidity_min = 0.4,
|
||||
temp_min = 0.4,
|
||||
})
|
||||
|
@ -395,6 +396,7 @@ if enable_standard ~= false then
|
|||
spawn_on_bottom = true,
|
||||
plantlife_limit = -0.9,
|
||||
rarity = rarity_standard,
|
||||
tries = 1,
|
||||
humidity_min = 0.7,
|
||||
temp_min = 0.4,
|
||||
})
|
||||
|
@ -419,6 +421,7 @@ if enable_side ~= false then
|
|||
spawn_on_side = true,
|
||||
plantlife_limit = -0.9,
|
||||
rarity = rarity_side,
|
||||
tries = 1,
|
||||
humidity_min = 0.4,
|
||||
temp_min = 0.4,
|
||||
})
|
||||
|
@ -451,6 +454,7 @@ if enable_jungle ~= false then
|
|||
spawn_on_side = true,
|
||||
plantlife_limit = -0.9,
|
||||
rarity = rarity_jungle,
|
||||
tries = 1,
|
||||
humidity_min = 0.2,
|
||||
temp_min = 0.3,
|
||||
})
|
||||
|
@ -473,6 +477,7 @@ if enable_willow ~= false then
|
|||
spawn_on_side = true,
|
||||
surface = {"moretrees:willow_leaves"},
|
||||
rarity = rarity_willow,
|
||||
tries = 1,
|
||||
humidity_min = 0.5,
|
||||
temp_min = 0.5,
|
||||
})
|
||||
|
|
|
@ -8,31 +8,31 @@ vines_enable_rope (Enable vine ropes) bool true
|
|||
vines_enable_roots (Enable root vines) bool true
|
||||
|
||||
#Rarity of root vines, from 1 to 100, higher numbers are rarer.
|
||||
vines_rarity_roots (Rarity of roots vines) int 75 1 100
|
||||
vines_rarity_roots (Rarity of roots vines) float 95 0 100
|
||||
|
||||
#Enables the standard type of vines.
|
||||
vines_enable_standard (Enable standard vines) bool true
|
||||
|
||||
#Rarity of standard vines, from 1 to 100, higher numbers are rarer.
|
||||
vines_rarity_standard (Rarity of standard vines) int 75 1 100
|
||||
vines_rarity_standard (Rarity of standard vines) float 95 0 100
|
||||
|
||||
#Enables the type of vines that grow on the sides of leaf blocks.
|
||||
vines_enable_side (Enable side vines) bool true
|
||||
|
||||
#Rarity of side vines, from 1 to 100, higher numbers are rarer.
|
||||
vines_rarity_side (Rarity of side vines) int 75 1 100
|
||||
vines_rarity_side (Rarity of side vines) float 95 0 100
|
||||
|
||||
#Enables jungle style vines.
|
||||
vines_enable_jungle (Enable jungle vines) bool true
|
||||
|
||||
#Rarity of jungle vines, from 1 to 100, higher numbers are rarer.
|
||||
vines_rarity_jungle (Rarity of jungle vines) int 75 1 100
|
||||
vines_rarity_jungle (Rarity of jungle vines) float 95 0 100
|
||||
|
||||
#Enables willow vines.
|
||||
vines_enable_willow (Enable willow vines) bool true
|
||||
|
||||
#Rarity of willow vines, from 1 to 100, higher numbers are rarer.
|
||||
vines_rarity_willow (Rarity of willow vines) int 75 1 100
|
||||
vines_rarity_willow (Rarity of willow vines) float 95 0 100
|
||||
|
||||
#Vine growth speed, minimum number of seconds between each growth.
|
||||
vines_growth_min (Minimum number of seconds between growth) int 180 1 3600
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
-- support for i18n
|
||||
local S = minetest.get_translator("youngtrees")
|
||||
|
||||
abstract_youngtrees = {}
|
||||
|
||||
local youngtrees_youngtrees_rarity = tonumber(minetest.settings:get("youngtrees_youngtrees_rarity")) or 100
|
||||
local youngtrees_youngtrees_rarity_fertility = tonumber(minetest.settings:get("youngtrees_youngtrees_rarity_fertility")) or 0.5
|
||||
local youngtrees_youngtrees_fertility = tonumber(minetest.settings:get("youngtrees_youngtrees_fertility")) or -0.3
|
||||
|
||||
|
||||
minetest.register_node("youngtrees:bamboo", {
|
||||
description = S("Young Bamboo Tree"),
|
||||
drawtype="nodebox",
|
||||
|
@ -63,7 +67,6 @@ minetest.register_node("youngtrees:youngtree_top", {
|
|||
drop = 'trunks:twig_1'
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("youngtrees:youngtree_middle", {
|
||||
description = S("Young Tree (middle)"),
|
||||
drawtype = "plantlike",
|
||||
|
@ -82,8 +85,6 @@ minetest.register_node("youngtrees:youngtree_middle", {
|
|||
drop = 'trunks:twig_1'
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("youngtrees:youngtree_bottom", {
|
||||
description = S("Young Tree (bottom)"),
|
||||
drawtype = "plantlike",
|
||||
|
@ -108,9 +109,8 @@ minetest.register_node("youngtrees:youngtree_bottom", {
|
|||
abstract_youngtrees.grow_youngtree_node(pos,height)
|
||||
end
|
||||
|
||||
|
||||
abstract_youngtrees.grow_youngtree_node = function(pos, height)
|
||||
|
||||
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
|
||||
|
||||
|
@ -140,10 +140,10 @@ biome_lib.register_on_generate({
|
|||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = 55, --10,15
|
||||
rarity = 101 - 4, --3,4
|
||||
rarity = youngtrees_youngtrees_rarity,
|
||||
rarity_fertility = youngtrees_youngtrees_rarity_fertility,
|
||||
plantlife_limit = youngtrees_youngtrees_fertility,
|
||||
min_elevation = 1, -- above sea level
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_youngtrees.grow_youngtree
|
||||
)
|
||||
|
|
8
youngtrees/settingtypes.txt
Normal file
8
youngtrees/settingtypes.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
#Youngtree rarity %
|
||||
youngtrees_youngtrees_rarity (Youngtree rarity %) float 100 0 100
|
||||
|
||||
#How much the rarity is reduced by fertility %
|
||||
youngtrees_youngtrees_rarity_fertility (Youngtree rarity fertility reduction %) float 0.5 0 100
|
||||
|
||||
#Youngtree minimum fertility (-1 to +1)
|
||||
youngtrees_youngtrees_fertility (Youngtree minimum fertility) float -0.3 -1 1
|
Loading…
Reference in New Issue
Block a user