simpify ore_chance setting
This commit is contained in:
parent
e301634441
commit
8519043614
@ -23,7 +23,7 @@ See the comments in this file for how to adjust:
|
||||
2. Whether map-generation is currently active for individual layers.
|
||||
3. Whether player gravity changes for each layer (off by default).
|
||||
4. Whether crafting recipes are enabled.
|
||||
5. Multiply ore chance within asteroids (default is 0.0), 0.5 doubles chance, 2 halves.
|
||||
5. Set the chance of finding ores in asteroids (default is 27 [0 to 100]).
|
||||
|
||||
Note: It is advised to turn off map-generation after you have generated the required number of asteroids.
|
||||
|
||||
|
@ -17,7 +17,7 @@ local ICET = 0.05 -- Comet ice threshold
|
||||
local ATMOT = -0.2 -- Comet atmosphere threshold
|
||||
local FISTS = 0.01 -- Fissure noise threshold at surface. Controls size of fissures and amount / size of fissure entrances
|
||||
local FISEXP = 0.3 -- Fissure expansion rate under surface
|
||||
local ORECHA = 3*3*3 -- Ore 1/x chance per stone node
|
||||
local ORECHA = otherworlds.settings.ore_chance.value -- Ore 1/x chance per stone node
|
||||
local CPCHU = 0 -- Maximum craters per chunk
|
||||
local CRMIN = 5 -- Crater radius minimum, radius includes dust and obsidian layers
|
||||
local CRRAN = 8 -- Crater radius range
|
||||
@ -26,10 +26,6 @@ local random = math.random
|
||||
local floor = math.floor
|
||||
local abs = math.abs
|
||||
|
||||
-- check setting for anything other than 0 and amend if needed
|
||||
if otherworlds.settings.ore_chance.value ~= 0 then
|
||||
ORECHA = ORECHA * otherworlds.settings.ore_chance.value
|
||||
end
|
||||
|
||||
-- Note: for fewer large objects: increase the 'spread' numbers in 'np_large' noise parameters. For fewer small objects do the same in 'np_small'. Then tune size with 'ASCOT'
|
||||
|
||||
@ -199,7 +195,7 @@ function otherworlds.asteroids.create_on_generated(ymin, ymax, content_ids)
|
||||
if noise1dep >= STOT or noise4dep >= STOT then
|
||||
|
||||
-- stone/ores
|
||||
if random(ORECHA) == 2 then
|
||||
if random(ORECHA) == 1 then
|
||||
|
||||
if nvals5[ni] > 0.6 then
|
||||
data[vi] = c_goldore
|
||||
|
@ -39,5 +39,5 @@ otherworlds.settings.gravity = {
|
||||
-- increase or decrease change of ores appearing in asteroids
|
||||
otherworlds.settings.ore_chance = {
|
||||
-- default ore chance is multiplied by following value
|
||||
value = tonumber(minetest.settings:get("otherworlds.ore_chance") or 0)
|
||||
value = tonumber(minetest.settings:get("otherworlds.ore_chance") or 27)
|
||||
}
|
||||
|
@ -10,4 +10,4 @@ otherworlds.redsky.ymax (Redsky asteroid max height) int 7000
|
||||
|
||||
otherworlds.gravity (Enable gravity) bool false
|
||||
|
||||
otherworlds.ore_chance (Multiply ore chance by) float 0
|
||||
otherworlds.ore_chance (Chance of finding ores) int 27
|
||||
|
Loading…
x
Reference in New Issue
Block a user