autoplace_controls | :: dictionary[string → AutoplaceControl] | Indexed by autoplace control prototype name. |
Indexed by autoplace control prototype name. | ||
default_enable_all_autoplace_controls | :: boolean | Whether undefined |
Whether undefined | ||
autoplace_settings | :: dictionary["entity" or "tile" or "decorative" → AutoplaceSettings] | Each setting in this dictionary maps the string type to the settings for that type. |
Each setting in this dictionary maps the string type to the settings for that type. | ||
seed | :: uint | The random seed used to generated this map. |
The random seed used to generated this map. | ||
width | :: uint | Width in tiles. If |
Width in tiles. If | ||
height | :: uint | Height in tiles. If |
Height in tiles. If | ||
starting_area | :: MapGenSize | Size of the starting area. |
Size of the starting area. | ||
starting_points | :: array[MapPosition] | Positions of the starting areas. |
Positions of the starting areas. | ||
peaceful_mode | :: boolean | Whether enemy creatures will not attack unless the player first attacks them. |
Whether enemy creatures will not attack unless the player first attacks them. | ||
no_enemies_mode | :: boolean | Whether enemy creatures will not naturally spawn from spawners, map gen, or trigger effects. |
Whether enemy creatures will not naturally spawn from spawners, map gen, or trigger effects. | ||
property_expression_names | :: PropertyExpressionNames | Overrides for tile property value generators. |
Overrides for tile property value generators. | ||
cliff_settings | :: CliffPlacementSettings | Map generation settings for entities of the type "cliff". |
Map generation settings for entities of the type "cliff". | ||
territory_settings | :: TerritorySettings |
-- Assuming a NamedNoiseExpression with the name "my-alternate-grass1-probability" is defined...
local surface = game.player.surface
local mgs = surface.map_gen_settings
mgs.property_expression_names["tile:grass1:probability"] = "my-alternate-grass1-probability"
surface.map_gen_settings = mgs
-- ...would override the probability of grass1 being placed at any given point on the current surface.
-- To make there be no deep water on (newly generated chunks) a surface
local surface = game.player.surface
local mgs = surface.map_gen_settings
mgs.property_expression_names["tile:deepwater:probability"] = -1000
surface.map_gen_settings = mgs
-- This does not require a NamedNoiseExpression to be defined, since literal numbers (and strings naming literal
-- numbers, e.g. `"123"`) are understood to stand for constant value expressions.