Added more documantation to settings
parent
ab897492ca
commit
879e448227
12
planets.lua
12
planets.lua
|
@ -1,9 +1,19 @@
|
|||
planetoids.planets = {}
|
||||
local p = planetoids.planets
|
||||
local coal = {
|
||||
--Relative frequency to other planets of this group
|
||||
rarity = 30,
|
||||
--The material of the outer crust of the planet
|
||||
--If there is a crust_top_material - this is the material of the bottom
|
||||
--Only required of there is a crust_top_material set
|
||||
crust_material = "default:stone",
|
||||
--The material of the top of the outer crust of the planet
|
||||
--Not required
|
||||
crust_top_material = nil,
|
||||
--The thickness of the crust - this doesn't add to planet size
|
||||
crust_thickness = 2,
|
||||
--The material in the centre of the planet
|
||||
--If no crust - this is the only material of the planet
|
||||
filling_material = "default:stone_with_coal",
|
||||
}
|
||||
local lava = {
|
||||
|
@ -50,7 +60,9 @@ local mossy_cobble = {
|
|||
}
|
||||
|
||||
p.stone = {
|
||||
--Relative frequency compared to other planet groups
|
||||
rarity = 10,
|
||||
--Planet definitions included in this type
|
||||
coal,lava,iron,copper,diamond,mese,gravel,
|
||||
mossy_cobble,
|
||||
}
|
||||
|
|
|
@ -2,7 +2,10 @@ planetoids.populator = {}
|
|||
local p = planetoids.populator
|
||||
--basic populator tables
|
||||
local red_flower = {
|
||||
--The node to be placed
|
||||
node = "flowers:rose",
|
||||
--The relative frequency of this node being placed compared to other
|
||||
--nodes populating this node
|
||||
rarity = 1,
|
||||
}
|
||||
local blue_flower = {
|
||||
|
@ -31,8 +34,11 @@ local long_grass = {
|
|||
}
|
||||
|
||||
p.grass_pop = {
|
||||
--Node that is populated
|
||||
node = "default:dirt_with_grass",
|
||||
--Chance of each node being populated
|
||||
population_chance = 0.5,
|
||||
--List of nodes which can populate this node
|
||||
red_flower,blue_flower,yellow_flower,white_flower,
|
||||
purple_flower,orange_flower,long_grass,
|
||||
}
|
||||
|
|
50
settings.lua
50
settings.lua
|
@ -7,12 +7,21 @@ planetoids.settings = {
|
|||
--if not a factor of 80, there may be some artifacting at the edge
|
||||
--of voxel manip blocks
|
||||
scale = nil,
|
||||
--This sets the size of the blocks that it generates, performance
|
||||
--TECHNICAL SETTING - Each voxelmanip is sub-divided into smaller
|
||||
--areas for generation - this is used for a custom optimisation
|
||||
--improves with size only for smaller sizes: 1^3 < small > 80^3
|
||||
blocksize = {x=5,y=5,z=5},
|
||||
|
||||
--Used to choose "normal" planetoids, or "perlin" planetoids
|
||||
--normal are just raw-distance - perlin uses a perlin map to add
|
||||
--further shape
|
||||
mode = "normal",
|
||||
|
||||
--Sets the relative frequency of points
|
||||
--Each size of point must be included from maximum - 1
|
||||
--0 is supported, but doesn't need inclusion if not used
|
||||
--default is used if there is any issue finding a no. points
|
||||
--^ this should never happen however - so you set to nil
|
||||
point_distribution = {
|
||||
default = 1,
|
||||
[1] = 60,
|
||||
|
@ -20,35 +29,56 @@ planetoids.settings = {
|
|||
[3] = 40,
|
||||
[4] = 40,
|
||||
},
|
||||
--Set the possible planet sizes
|
||||
--All are equally likely
|
||||
planet_size = {
|
||||
minimum = 5,
|
||||
maximum = 15,
|
||||
--size of sector as multiple of maximum, must be > 2
|
||||
--Larger values increase the distance between planetoids
|
||||
--TECHNICAL SETTING - The world is divided into cubes to
|
||||
--generate planetoid positions
|
||||
--The size of each one is maximum * sector_scale
|
||||
--Sector_scale must be > 2 for algorithmic reasons
|
||||
sector_scale = 3,
|
||||
},
|
||||
--List of planet group tables
|
||||
--See planets.lua
|
||||
planet_types = {
|
||||
planets.stone,planets.soft,planets.tree,planets.glass,
|
||||
},
|
||||
--tables to add basic surface population - e.g. for long grass
|
||||
--Tables to add basic surface population - e.g. for long grass
|
||||
--See populator.lua
|
||||
surface_populator = {
|
||||
enabled = true,
|
||||
pop.grass_pop,pop.jungle_pop,pop.sand_pop,pop.stone_pop,
|
||||
pop.drygrass_pop,pop.desertsand_pop,
|
||||
},
|
||||
|
||||
--how distance from the centre of a biome is judged
|
||||
--changes he shape of generated biomes
|
||||
--How distance from the centre of a biome is judged
|
||||
--Changes he shape of generated biomes
|
||||
--"euclidean" - sphere
|
||||
--"manhattan" - diamond
|
||||
--"chebyshev" - cube
|
||||
--"oddprod" - cross - WARNING does NOT keep liquids enclosed
|
||||
geometry = "euclidean",
|
||||
}
|
||||
|
||||
--perlin specific settings
|
||||
--Override and additional settings for perlin mode
|
||||
if planetoids.settings.mode == "perlin" then
|
||||
--Perlin planets are smaller - this table is the MAXIMUM size now
|
||||
--On average ~1/2 radius
|
||||
planetoids.settings.planet_size = {
|
||||
minimum = 15,
|
||||
maximum = 30,
|
||||
--size of sector as multiple of maximum, must be > 2
|
||||
--This valus is reduced to offset the larger size of planets
|
||||
--in determining distance between them
|
||||
sector_scale = 2,
|
||||
}
|
||||
--Perlin ONLY settings below
|
||||
|
||||
|
||||
--Perlin map settings - see RubenWardy's modding book for explination
|
||||
--http://rubenwardy.com/minetest_modding_book/lua_api.html
|
||||
planetoids.settings.perlin_map = {
|
||||
lacunarity = 1.4,
|
||||
octaves = 2,
|
||||
|
@ -58,9 +88,15 @@ if planetoids.settings.mode == "perlin" then
|
|||
seeddiff = 5349,
|
||||
spread = {x=10,y=10,z=10},
|
||||
}
|
||||
--TECHNICAL SETTING - Minimum density for planetoids to be generated
|
||||
--Setting this higher can lead to larger planetoids - but if too high
|
||||
--will lead to planetoids with terrain shaped only by the geometry
|
||||
planetoids.settings.threshold = 0
|
||||
--Perlin planet crusts are thinner - crust_thickness is the MAXIMUM
|
||||
--This value is added to each crust thickness to counter this
|
||||
planetoids.settings.thickness_offset = 1
|
||||
end
|
||||
|
||||
|
||||
--This finalises the configuration - all settings must be above this
|
||||
planetoids.configure()
|
||||
|
|
Loading…
Reference in New Issue