Mapgen Parameters

All map generator algorithms have a few common parameters, plus any mapgen-specific options such as noise parameters or threshhold values. Only mapgen-generic parameters are listed here; mapgen-specific ones are listed in the corresponding mapgen wiki page. = Mapgen parameter source precedence = There are several sources which the map generator may retrieve parameters from. In order from highest precedence to lowest they are:
 * Hard-coded
 * Lua mods
 * map_meta.txt
 * Game-specific config file
 * Global config file
 * Default settings (set in defaultsettings.cpp)
 * Default object constructor values

= List of mapgen parameters =

Mapgen name
The name of the map generator algorithm being used. Currently supported: example:

Seed
A 64-bit unsigned integer value. At this time, only the lower 32 bits are currently used for randomization. example:

Water level
The y coordinate at which water starts being placed, for mapgens that do place water.

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. example:

Mapgen Limit
Limit of map generation, in nodes, in all 6 directions from (0, 0, 0). example :
 * Only mapchunks completely within the mapgen limit are generated.
 * Value is stored per-world.
 * type: int min: 0 max: 31000

Flags parameter
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.

Like all other config and Lua flag fields, they are represented as a comma-delimited string. E.g. the flag string "trees, caves, flat" would direct the Mapgen to create flat terrain with trees and caves.

An exhaustive list of currently recognized Mapgen flags:

Other fine-tuning parameters are available for each map generator, and can be found in lua_api.txt.

Chunk size
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.

Don't mess around with this if you don't know what you're doing! This parameter cannot be modified through the Lua API.

= Mapgen Parameter Lua API = The task of getting and setting mapgen parameters is much trickier than it seems it should be. For this reason there exists a small but effective set of API for accomplishing this.