Post your mapgen questions here (modding or engine)
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
mgv7_np_mountain = -0.6, 1, (850, 1450, 850), 5333, 5, 0.68, 2.0
Mountain noise is a 3D noise, the scale of the structures is controlled and stretched by the 'spread' numbers:
(850, 1450, 850)
You can see that the y scale is much larger than the x, z scales, so the shapes are stretched upwards, this is intentional in mgv7 but you should try increasing the x and z spreads.
(1450, 1450, 1450) Will create wider unstretched shapes.
For fewer floaty bits reduce 'persistence' (0.68) to around 0.6 or 0.5.
Mountain noise is a 3D noise, the scale of the structures is controlled and stretched by the 'spread' numbers:
(850, 1450, 850)
You can see that the y scale is much larger than the x, z scales, so the shapes are stretched upwards, this is intentional in mgv7 but you should try increasing the x and z spreads.
(1450, 1450, 1450) Will create wider unstretched shapes.
For fewer floaty bits reduce 'persistence' (0.68) to around 0.6 or 0.5.
- BrandonReese
- Member
- Posts: 839
- Joined: Wed Sep 12, 2012 00:44
- GitHub: bremaweb
- IRC: BrandonReese
- In-game: BrandonReese
- Location: USA
Re: Post your mapgen questions here (modding or engine)
That helps thanks.
- demon_boy
- Member
- Posts: 48
- Joined: Thu Apr 09, 2015 10:53
- GitHub: vlapsley
- In-game: demon_boy
- Location: Melbourne, Australia
Re: Post your mapgen questions here (modding or engine)
I've spent a few months refactoring my Australia mod and I'm not far from completion.burli wrote:Another question. I want to make realistic lakes/ponds. Any idea how to make them?
I've used a combination of some plantlife mods, Valleys Mapgen plants API and some of DuaneR code to get something close to what you are might call realistic.
What I have managed to achieve is a riparian zone. I have trees and plants following rivers. Some only spawn by rivers. Note the bare landscape away from the river.

Also, I've got green grass growing near rivers, reeds and juncus on the banks. A few lillies nearby.

- TumeniNodes
- Member
- Posts: 2879
- Joined: Fri Feb 26, 2016 19:49
- GitHub: TumeniNodes
- IRC: tumeninodes
- In-game: TumeniNodes
- Location: in the dark recesses of the mind
- Contact:
Re: Post your mapgen questions here (modding or engine)
Really nice work demon_boy. Much attention to details
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
Re: Post your mapgen questions here (modding or engine)
Looks really nice. But I also mean lakes/ponds with an more or less natural shape. But I think with the current mapgens it is impossible
- Serh Arien
- Member
- Posts: 68
- Joined: Tue Nov 03, 2015 19:53
Re: Post your mapgen questions here (modding or engine)
Hi i need to make a big ocean as burly made but without stone above the water (sand would be better )burli wrote:Maybe someone find this useful. This is the most simple Lua mapgen. Just generates stone and water
And maybe someone can replace the example in the get_perlin_map Wiki page. It does not work. I need a while until I found that get2dMap_flat doesn't want 3d coordinates
Code: Select all
minetest.set_mapgen_params({mgname="singlenode"}) minetest.register_on_generated(function(minp, maxp, seed) local c_stone = minetest.get_content_id("default:stone") local c_water = minetest.get_content_id("default:water_source") local c_air = minetest.get_content_id("air") local c_ignore = minetest.get_content_id("ignore") local vm, emin, emax = minetest.get_mapgen_object("voxelmanip") local data = vm:get_data() local a = VoxelArea:new({MinEdge = emin, MaxEdge = emax}) local csize = vector.add(vector.subtract(maxp, minp), 1) local write = false local noise_1 = minetest.get_perlin_map({offset = 5, scale = 15, seed = 1234, spread = {x = 250, y = 250, z = 250}, octaves = 5, persist = 0.6, lacunarity = 2, flags = "defaults"}, csize):get2dMap_flat({x=minp.x, y=minp.z}) local index2d = 0 for z = minp.z, maxp.z do for y = minp.y, maxp.y do for x = minp.x, maxp.x do index2d = (z - minp.z) * csize.x + (x - minp.x) + 1 local ivm = a:index(x, y, z) if y < noise_1[index2d] then data[ivm] = c_stone write = true elseif y > noise_1[index2d] and y < 1 then data[ivm] = c_water write = true end end end end if write then vm:set_data(data) vm:set_lighting({day = 0, night = 0}) vm:calc_lighting() vm:update_liquids() vm:write_to_map() end end
How am i suppose to do?
Or do anyone know a mod to get the all map a ocean?
Thx
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
Mgv7 can do that, disable mountains and 'ridges' (rivers), and use custom noise parameters to lower the 2 smooth terrains below water_level. See an earlier post in this thread explaining the mgv7 noise parameters.
Re: Post your mapgen questions here (modding or engine)
I would like to see some kind of FAQ topic about at least v7 mapgen, about basic stuff with basic questions, like:
+ how to shift terrain down/up? (changing water level)
+ how to stretch terrain horizontally/vertically?
+ how to make single biome world?
+ how to make biomes bigger/smaller?
+ how to shift general climate to colder/hotter?
+ how to shift humidity to arid/humid?
+ how to make ocean world?
+ how to make desert world?
+ how to turn off caves/rivers/hills
+ how to make hills bigger and oceans deeper?
+ how to make big hills with low slopes?
+ how to make slightly hilly world?
+ how to shift terrain down/up? (changing water level)
+ how to stretch terrain horizontally/vertically?
+ how to make single biome world?
+ how to make biomes bigger/smaller?
+ how to shift general climate to colder/hotter?
+ how to shift humidity to arid/humid?
+ how to make ocean world?
+ how to make desert world?
+ how to turn off caves/rivers/hills
+ how to make hills bigger and oceans deeper?
+ how to make big hills with low slopes?
+ how to make slightly hilly world?
- BirgitLachner
- Member
- Posts: 391
- Joined: Thu May 05, 2016 10:18
- In-game: Bibs
Re: Post your mapgen questions here (modding or engine)
This looks nice ... it is in my opinion a good idea to have changes for the water in some of the biomes. And specially for the dry bioms there should be green plants close to the water like on your second picture. There should be an oasis if there is a bigger amount of water in the dessert.demon_boy wrote:
I've spent a few months refactoring my Australia mod and I'm not far from completion.
I've used a combination of some plantlife mods, Valleys Mapgen plants API and some of DuaneR code to get something close to what you are might call realistic.
What I have managed to achieve is a riparian zone. I have trees and plants following rivers. Some only spawn by rivers. Note the bare landscape away from the river.
Also, I've got green grass growing near rivers, reeds and juncus on the banks. A few lillies nearby.
The problem will be of cause that in dry areas there should be less water. But therefore you need to have smaller rivers oder a lower water level. But changing/deleting the blocks is a Problem, isn't it?
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
To save you some frustration, here is how to use the new 'minetest.set_mapgen_setting_noiseparams()' to set noise params in a mod. Hmmmm's intention is to move the setting of noise params out of .conf and into lua mods.
The documentation on this is confusing as it suggests the use of 'override_meta = true' as the 3rd argument, whereas it is simply 'true' or 'false'.
The documentation on this is confusing as it suggests the use of 'override_meta = true' as the 3rd argument, whereas it is simply 'true' or 'false'.
Code: Select all
minetest.set_mapgen_setting_noiseparams(
"mg_biome_np_heat",
{
offset = 50,
scale = 50,
spread = {x = 1000, y = 1000, z = 1000},
seed = 5349,
octaves = 3,
persistence = 0.5,
lacunarity = 2.0,
flags = "defaults"
},
true
)
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
Update on the use of the 'override_meta' bool.
The biome heat / humidity noise parameters are written to map_meta.txt on new world creation in main menu, but the noise parameters for the individual mapgens (mgv5, v6. v7, valleys etc.) are written when leaving a newly-generated world.
So, 'override meta' must be true when setting biome heat / humidity noise parameters for a newly created world.
'Override_meta' can be left as the default of false when setting individual mapgen noise parameters for a newly created world.
Also of course overriding meta allows you to change any noise parameters for an existing world.
The biome heat / humidity noise parameters are written to map_meta.txt on new world creation in main menu, but the noise parameters for the individual mapgens (mgv5, v6. v7, valleys etc.) are written when leaving a newly-generated world.
So, 'override meta' must be true when setting biome heat / humidity noise parameters for a newly created world.
'Override_meta' can be left as the default of false when setting individual mapgen noise parameters for a newly created world.
Also of course overriding meta allows you to change any noise parameters for an existing world.
- duane
- Member
- Posts: 1703
- Joined: Wed Aug 19, 2015 19:11
- GitHub: duane-r
- Location: Oklahoma City
- Contact:
Re: Post your mapgen questions here (modding or engine)
Is this going to be the only way to change noises? It's hard enough explaining how to modify them in minetest.conf. A lot of people won't bother if they have to write a mod just to make mountains higher.paramat wrote:To save you some frustration, here is how to use the new 'minetest.set_mapgen_setting_noiseparams()' to set noise params in a mod. Hmmmm's intention is to move the setting of noise params out of .conf and into lua mods.
The documentation on this is confusing as it suggests the use of 'override_meta = true' as the 3rd argument, whereas it is simply 'true' or 'false'.
Code: Select all
minetest.set_mapgen_setting_noiseparams( "mg_biome_np_heat", { offset = 50, scale = 50, spread = {x = 1000, y = 1000, z = 1000}, seed = 5349, octaves = 3, persistence = 0.5, lacunarity = 2.0, flags = "defaults" }, true )
Believe in people and you don't need to believe anything else.
- azekill_DIABLO
- Member
- Posts: 7497
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
No, one of three ways, sorry my use of 'move' was unclear, i mean hmmmm prefers noises to be set in mods since .conf is so cluttered. There is also .conf and advanced settings, no plans to deprecate setting noise in those.
However, advanced settings and single-line noise parameters in .conf cannot set noise flags (eaeed noise, absolute-octave noise). To set noise flags in .conf requires a noise table like the above to be added, so putting the noise table in a mod is barely any more complex. It's more convenient to do this in a mod than in .conf, you can just enable / disable the mod instead of adding / deleting lines in .conf. Also mods can be published and shared.
However, advanced settings and single-line noise parameters in .conf cannot set noise flags (eaeed noise, absolute-octave noise). To set noise flags in .conf requires a noise table like the above to be added, so putting the noise table in a mod is barely any more complex. It's more convenient to do this in a mod than in .conf, you can just enable / disable the mod instead of adding / deleting lines in .conf. Also mods can be published and shared.
Re: Post your mapgen questions here (modding or engine)
How does yslice_prob work?
If I want to make a trunk have a 50% chance of being 2 nodes 25% being 3 nodes and 25% being 1 node what would I do?
If I want to make a trunk have a 50% chance of being 2 nodes 25% being 3 nodes and 25% being 1 node what would I do?
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
Yslice is counted from 0 from schematic base to top.
The schematic is added to the world in y slices from base to top, the yslice_prob decides whether each slice is included or skipped. The lowest slice is always at ground level so is like a 1 node 'root'.
I think that yslices 2 and 3 with prob 127 (50% chance) would do it, as you have 4 possibilities, 2 of which result in a 2 node high trunk.
The schematic is added to the world in y slices from base to top, the yslice_prob decides whether each slice is included or skipped. The lowest slice is always at ground level so is like a 1 node 'root'.
I think that yslices 2 and 3 with prob 127 (50% chance) would do it, as you have 4 possibilities, 2 of which result in a 2 node high trunk.
Re: Post your mapgen questions here (modding or engine)
Maybe I'm thick headed.
I still don't understand how the odds work.
I read the manual to.
What odds would the following code give me?
I still don't understand how the odds work.
I read the manual to.
What odds would the following code give me?
Code: Select all
yslice_prob = {
{ypos = 1, prob = 127},
{ypos = 2, prob = 63}
}
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
Probability is out of 255, so 127 is 50%, 63 is 25%.
Re: Post your mapgen questions here (modding or engine)
What would happen if I did...
Code: Select all
yslice_prob = {
{ypos = 1, prob = 255},
{ypos = 2, prob = 255}
}
Re: Post your mapgen questions here (modding or engine)
And how do I make a biome rare?
Re: Post your mapgen questions here (modding or engine)
by giving it very low or high parameters.pithy wrote:And how do I make a biome rare?
heat=50 is much more common than 0 or 100 ;)
a 50-50 biome will probably be the most common, with 100-50, 0-50, 50-100 and 50-0 in second.
putting values like 100-100, 0-0, 100-0 and 0-100 will make it rarer than the others.
how rare it is exactly will also depend on it's "size", which is determined by the relative positions of the other biomes.
so a biome with a 0 parameter and another one with a 50 will collide at 25, so any place with a value below 25 will feature the biome with the 0. if you move the other biome to 30 or add yet another biome in between 0 and 50, then the 0 biome will become more rare.
✨🏳️🌈♣️✨
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
prob = 255 is 100% chance so no point in defining a y_slice.
To make biome rare its voronoi cell needs to be small on the heat-humidity voronoi diagram.
See viewtopic.php?f=47&t=11603
and this is the diagram for ethereal mapgen https://www.geogebra.org/m/u2ngcd5F
You would 'clear registered biomes' then re-register them with new 'biome points' (heat and humidity parameters).
GeoGebra is very useful for designing a new voronoi diagram, see viewtopic.php?p=230857#p230857
To make biome rare its voronoi cell needs to be small on the heat-humidity voronoi diagram.
See viewtopic.php?f=47&t=11603
and this is the diagram for ethereal mapgen https://www.geogebra.org/m/u2ngcd5F
You would 'clear registered biomes' then re-register them with new 'biome points' (heat and humidity parameters).
GeoGebra is very useful for designing a new voronoi diagram, see viewtopic.php?p=230857#p230857
Re: Post your mapgen questions here (modding or engine)
@paramat - I'm still thinking of re-doing ethereal biomes to spread them out more instead of realistic temps.
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
This thread has useful information about the Biome API, heat and humidity points, and how biome is chosen for a particular point in the world viewtopic.php?f=47&t=11603
- nomohakon
- Member
- Posts: 219
- Joined: Fri Aug 10, 2012 16:34
- IRC: nomohakon
- In-game: nomohakon
- Location: VanessaE's servers
Re: Post your mapgen questions here (modding or engine)
Where can i find some examples of singlenode mapgen? So far i seen it only mentioned, also how do i set different node than air to be generated by it? Simple but complete file would be great.
Who is online
Users browsing this forum: No registered users and 1 guest