<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://olddev.minetest.org/index.php?action=history&amp;feed=atom&amp;title=Mapgen_Parameters</id>
	<title>Mapgen Parameters - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://olddev.minetest.org/index.php?action=history&amp;feed=atom&amp;title=Mapgen_Parameters"/>
	<link rel="alternate" type="text/html" href="https://olddev.minetest.org/index.php?title=Mapgen_Parameters&amp;action=history"/>
	<updated>2026-04-14T23:53:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.7</generator>
	<entry>
		<id>https://olddev.minetest.org/index.php?title=Mapgen_Parameters&amp;diff=107&amp;oldid=prev</id>
		<title>&gt;Rubenwardy: lua_api.txt -&gt; lua_api.md</title>
		<link rel="alternate" type="text/html" href="https://olddev.minetest.org/index.php?title=Mapgen_Parameters&amp;diff=107&amp;oldid=prev"/>
		<updated>2023-05-01T11:18:21Z</updated>

		<summary type="html">&lt;p&gt;lua_api.txt -&amp;gt; lua_api.md&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;All map generator algorithms have a few common parameters, plus any mapgen-specific options such as noise parameters or threshhold values.&lt;br /&gt;
= Mapgen parameter source precedence =&lt;br /&gt;
There are several sources which the map generator may retrieve parameters from.  In order from highest precedence to lowest they are:&lt;br /&gt;
* Hard-coded&lt;br /&gt;
* Lua mods&lt;br /&gt;
* map_meta.txt&lt;br /&gt;
* Game-specific config file&lt;br /&gt;
* Global config file&lt;br /&gt;
* Default settings (set in defaultsettings.cpp)&lt;br /&gt;
* Default object constructor values&lt;br /&gt;
&lt;br /&gt;
= List of mapgen parameters =&lt;br /&gt;
== Mapgen name ==&lt;br /&gt;
The name of the map generator algorithm being used.&lt;br /&gt;
Currently supported:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Mapgen name !! Developer responsible !! Description&lt;br /&gt;
|-&lt;br /&gt;
| v5 || missing info || Description needed&lt;br /&gt;
|-&lt;br /&gt;
| v6 || kwolekr, celeron55 || The current default map generator.  Uses an improved Mapgen v2 algorithm for base terrain; terrain is generated entirely using 2D Perlin noise.&lt;br /&gt;
|-&lt;br /&gt;
| v7 || kwolekr || The next generation map generator with an emphasis on generating interesting and playable terrain.  Has full support for the internal biome infrastructure and uses a mixture of 2D and both positive and negative 3D noise for terrain.&lt;br /&gt;
|-&lt;br /&gt;
| valleys || missing info || Description needed&lt;br /&gt;
|-&lt;br /&gt;
| carpathian || missing info || Description needed&lt;br /&gt;
|-&lt;br /&gt;
| fractal || missing info || Generates maps based on Mandelbrot fractal series&lt;br /&gt;
|-&lt;br /&gt;
| flat || missing info || Generates completely flat world. Replaces the flat flag in mg_flags. Caves, dungeons, decorations, and biomes need to be explicitly excluded to make a flat and empty world.&lt;br /&gt;
|-&lt;br /&gt;
| singlenode || celeron55 || Places only a single node everywhere, namely the one aliased to mapgen_singlenode (by default air).  Intended to be used by mods that perform total mapgen takeovers.&lt;br /&gt;
|}&lt;br /&gt;
example: &amp;lt;code&amp;gt;mg_name = v7&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Seed ==&lt;br /&gt;
A 64-bit unsigned integer value.  At this time, only the lower 32 bits are currently used for randomization.&amp;lt;br&amp;gt;&lt;br /&gt;
example: &amp;lt;code&amp;gt;seed = 1246106421&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Water level ==&lt;br /&gt;
The y coordinate at which water starts being placed, for mapgens that do place water.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
This is also the position at which blocks are assumed to be underground if no block above is present, and thus is not given sunlight.&amp;lt;br&amp;gt;&lt;br /&gt;
example: &amp;lt;code&amp;gt; water_level = 1 &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mapgen Limit ==&lt;br /&gt;
Limit of map generation, in nodes, in all 6 directions from (0, 0, 0).&lt;br /&gt;
* Only mapchunks completely within the mapgen limit are generated.&lt;br /&gt;
* Value is stored per-world.&lt;br /&gt;
* type: int min: 0 max: 31000&amp;lt;br&amp;gt;&lt;br /&gt;
example : &amp;lt;code&amp;gt;mapgen_limit = 4500&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Flags parameter ==&lt;br /&gt;
The flags parameter is a set of booleans indicating whether or not a certain option is enabled.  Global flags applying to all map generators are listed in [[mg_flags]]. Other map generator-specific flags are shown below.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Like all other config and Lua flag fields, they are represented as a comma-delimited string.&lt;br /&gt;
E.g. the flag string &amp;quot;trees, caves, flat&amp;quot; would direct the Mapgen to create flat terrain with trees and caves.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
An exhaustive list of currently recognized Mapgen flags:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Lua/config flag name !! Defaults  !! Allowed values&lt;br /&gt;
|-&lt;br /&gt;
| mgv5_spflags || caverns || caverns, nocaverns&lt;br /&gt;
|-&lt;br /&gt;
| mgv6_spflags || jungles,biomeblend,mudflow,snowbiomes,trees || jungles, biomeblend, mudflow, snowbiomes, flat, trees, nojungles, nobiomeblend, nomudflow, nosnowbiomes, noflat, notrees&lt;br /&gt;
|-&lt;br /&gt;
| mgv7_spflags || mountains,ridges,nofloatlands,caverns || mountains, ridges, floatlands, caverns, nomountains, noridges, nofloatlands, nocaverns&lt;br /&gt;
|-&lt;br /&gt;
| mgcarpathian_spflags || caverns || caverns, nocaverns&lt;br /&gt;
|-&lt;br /&gt;
| mgflat_spflags || nolakes,nohills || lakes, hills, nolakes, nohills&lt;br /&gt;
|-&lt;br /&gt;
| mgvalleys_spflags || altitude_chill,humid_rivers,vary_river_depth,altitude_dry || altitude_chill, noaltitude_chill, humid_rivers, nohumid_rivers, vary_river_depth, novary_river_depth, altitude_dry, noaltitude_dry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Other fine-tuning parameters are available for each map generator, and can be found in lua_api.md.&lt;br /&gt;
&lt;br /&gt;
== Chunk size ==&lt;br /&gt;
The side length (in MapBlocks) of the cubic area that is generated at once.  Default is 5; larger values take longer to generate but blocks generate quicker on average and could produce larger, more intricate caves and dungeons.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Don't mess around with this if you don't know what you're doing!  This parameter cannot be modified through the Lua API.&lt;br /&gt;
&lt;br /&gt;
{{Incomplete}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Core Engine]]&lt;/div&gt;</summary>
		<author><name>&gt;Rubenwardy</name></author>
	</entry>
</feed>