Types/MapGenPreset: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m (Defaul typo)
(autoplace_settings description and type from runtime docs)
 
(13 intermediate revisions by 4 users not shown)
Line 7: Line 7:
'''Type''': [[Types/Order]]
'''Type''': [[Types/Order]]


Specifies the ordering in the [[world generator]] gui.
Specifies the ordering in the [[map generator]] gui.


== Optional properties ==
== Optional properties ==
Line 21: Line 21:
'''Type''': [[Types/table]]
'''Type''': [[Types/table]]


All properties can be omitted, if not set they will just use the existing values.
This is a table with the below key/value pairs. All key/value pairs are optional. If not set they will just use the default values.


==== terrain_segmentation ====
* terrain_segmentation - [[Types/MapGenSize]]
'''Type''': [[Types/MapGenSize]]
:: This is the inverse of "water scale" in the map generator GUI. So a water scale that shows as 50% in the GUI is a value of <code>1/0.5 = 2</code> for <code>terrain_segmentation</code>.
 
* water - [[Types/MapGenSize]]
Shown as water frequency in the world generator GUI.
:: Shown as water coverage in the map generator GUI.
 
* default_enable_all_autoplace_controls - [[Types/bool]] - Default: true
==== water ====
:: Whether undefined autoplace_controls should fall back to the default controls or not.
'''Type''': [[Types/MapGenSize]]
* autoplace_controls - [[Types/table]]
 
:: Table of [[Data.raw#autoplace-control]] name keys mapped to table values. Each table can have the following fields:
Shown as water size in the world generator GUI.
::* frequency - [[Types/MapGenSize]]
 
::* size - [[Types/MapGenSize]]
==== default_enable_all_autoplace_controls ====
::* richness - [[Types/MapGenSize]]
'''Type''': [[Types/bool]]
::Example:
 
::<syntaxhighlight lang="lua">autoplace_controls =
==== autoplace_controls ====
'''Type''': [[Types/table]]
 
Table of [[Data.raw#autoplace-control]] name keys mapped to table values. Each table can have the following fields:
* frequency - [[Types/MapGenSize]]
* size - [[Types/MapGenSize]]
* richness - [[Types/MapGenSize]]
 
Example:
 
<syntaxhighlight lang="lua">autoplace_controls =
   {
   {
     ["iron-ore"] = { richness = "very-good"},
     ["iron-ore"] = { richness = 2, size = 0.5, frequency=2},
     ["enemy-base"] = { size = "very-big"},
     ["enemy-base"] = { size = 1},
     ["trees"] = { richness = "very-good", size = "very-big", frequency="very-low"},
     ["trees"] = { richness = 4}
    ["dirt"] = { size = "very-big", frequency="very-low"}
   }</syntaxhighlight>
   }</syntaxhighlight>
 
* autoplace_settings - [[Types/table]] of [https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSettings AutoplaceSettings]
==== autoplace_settings ====
:: Each setting in this table maps the string type to the settings for that type. Valid types are "entity", "tile" and "decorative".
'''Type''': [[Types/table]]
* property_expression_names - [[Types/table]]
 
:: Map of property name (e.g. "elevation") to name of [[Prototype/NamedNoiseExpression|noise expression]] that will provide it. Entries may be omitted. A notable usage is changing autoplace behavior of an entity based on the preset, which cannot be read from a noise expression.
==== property_expression_names ====
* starting_points - [[Types/table]] of [[Types/Position]]
'''Type''': [[Types/table]]
:: Array of the positions of the starting areas.
 
* seed - [[Types/uint32]]
Map of property name (e.g. "elevation") to name of noise expression that will provide it. Entries may be ommitted.
:: Read by the game, but not used or set in the GUI.
 
* width - [[Types/uint32]]
==== starting_points ====
:: Amount of tiles from left to right. Silently limited to 2,000,000, +/- 1 million tiles from the center.
'''Type''': [[Types/table]] of [[Types/Position]]
* height - [[Types/uint32]]
 
:: Amount of tiles from top to bottom. Silently limited to 2,000,000, +/- 1 million tiles from the center.
Array of the positions of the starting areas.
* starting_area - [[Types/MapGenSize]]
 
:: Size of the starting area. The starting area only effects enemy placement, and has no effect on resources.
==== seed ====
* peaceful_mode - [[Types/bool]]
'''Type''': [[Types/uint32]]
* cliff_settings - [https://lua-api.factorio.com/latest/Concepts.html#CliffPlacementSettings CliffPlacementSettings]
 
Read by the game, but not used or set in the GUI.
 
==== width ====
'''Type''': [[Types/uint32]]
 
==== height ====
'''Type''': [[Types/uint32]]
 
==== starting_area ====
'''Type''': [[Types/MapGenSize]]
 
Size of the starting area.
 
==== peaceful_mode ====
'''Type''': [[Types/bool]]
 
==== cliff_settings ====
'''Type''': [https://lua-api.factorio.com/latest/Concepts.html#CliffPlacementSettings CliffPlacementSettings]


=== advanced_settings ===
=== advanced_settings ===
'''Type''': [[Types/table]]
'''Type''': [[Types/table]]


All properties can be omitted, if not set they will just use the existing values.
This is a table with the below key/value pairs. All key/value pairs are optional, if not set they will just use the existing values.
 
* pollution - [[Types/table]]
==== pollution ====
:{| class="wikitable"
'''Type''': [[Types/table]]
 
{| class="wikitable"
|-
|-
! Property name !! Type !! Comment
! Property name !! Type !! Comment
Line 114: Line 80:
|-
|-
|}
|}
 
* enemy_evolution - [[Types/table]]
==== enemy_evolution ====
:{| class="wikitable"
'''Type''': [[Types/table]]
 
{| class="wikitable"
|-
|-
! Property name !! Type
! Property name !! Type
Line 131: Line 94:
|-
|-
|}
|}
 
* enemy_expansion - [[Types/table]]
==== enemy_expansion ====
:{| class="wikitable"
'''Type''': [[Types/table]]
 
{| class="wikitable"
|-
|-
! Property name !! Type !! Comment
! Property name !! Type !! Comment
Line 153: Line 113:
|}
|}


==== difficulty_settings ====
* difficulty_settings - [[Types/table]]
'''Type''': [[Types/table]]
:{| class="wikitable"
 
{| class="wikitable"
|-
|-
! Property name !! Type !! Comment
! Property name !! Type !! Comment
|-
|-
| recipe_difficulty || [[Types/uint8]] || 0 is normal, 1 is expensive
| recipe_difficulty || [https://lua-api.factorio.com/latest/defines.html#defines.difficulty_settings defines.difficulty_settings.recipe_difficulty]
|-
|-
| technology_difficulty || [[Types/uint8]] || 0 is normal, 1 is expensive
| technology_difficulty || [https://lua-api.factorio.com/latest/defines.html#defines.difficulty_settings defines.difficulty_settings.technology_difficulty]
|-
|-
| technology_price_multiplier || [[Types/double]]
| technology_price_multiplier || [[Types/double]]

Latest revision as of 13:58, 8 April 2022

Basics

A map gen preset. Used in Prototype/MapGenPresets.

Mandatory properties

order

Type: Types/Order

Specifies the ordering in the map generator gui.

Optional properties

default

Type: Types/bool

Default: true

Whether this is the default preset. If set to true, this preset may not have any other properties besides this and order.

basic_settings

Type: Types/table

This is a table with the below key/value pairs. All key/value pairs are optional. If not set they will just use the default values.

This is the inverse of "water scale" in the map generator GUI. So a water scale that shows as 50% in the GUI is a value of 1/0.5 = 2 for terrain_segmentation.
Shown as water coverage in the map generator GUI.
  • default_enable_all_autoplace_controls - Types/bool - Default: true
Whether undefined autoplace_controls should fall back to the default controls or not.
Table of Data.raw#autoplace-control name keys mapped to table values. Each table can have the following fields:
Example:
autoplace_controls =
  {
    ["iron-ore"] = { richness = 2, size = 0.5, frequency=2},
    ["enemy-base"] = { size = 1},
    ["trees"] = { richness = 4}
  }
Each setting in this table maps the string type to the settings for that type. Valid types are "entity", "tile" and "decorative".
Map of property name (e.g. "elevation") to name of noise expression that will provide it. Entries may be omitted. A notable usage is changing autoplace behavior of an entity based on the preset, which cannot be read from a noise expression.
Array of the positions of the starting areas.
Read by the game, but not used or set in the GUI.
Amount of tiles from left to right. Silently limited to 2,000,000, +/- 1 million tiles from the center.
Amount of tiles from top to bottom. Silently limited to 2,000,000, +/- 1 million tiles from the center.
Size of the starting area. The starting area only effects enemy placement, and has no effect on resources.

advanced_settings

Type: Types/table

This is a table with the below key/value pairs. All key/value pairs are optional, if not set they will just use the existing values.

Property name Type Comment
enabled Types/bool
diffusion_ratio Types/double Must be <= 0.25.
ageing Types/double Also known as dissipation rate. Must be >= 0.5.
enemy_attack_pollution_consumption_modifier Types/double
min_pollution_to_damage_trees Types/double
pollution_restored_per_tree_damage Types/double
Property name Type
enabled Types/bool
time_factor Types/double
destroy_factor Types/double
pollution_factor Types/double
Property name Type Comment
enabled Types/bool
max_expansion_distance Types/double
settler_group_min_size Types/double
settler_group_max_size Types/double
min_expansion_cooldown Types/double In ticks.
max_expansion_cooldown Types/double In ticks.
Property name Type Comment
recipe_difficulty defines.difficulty_settings.recipe_difficulty
technology_difficulty defines.difficulty_settings.technology_difficulty
technology_price_multiplier Types/double
research_queue_setting Types/string Either "after-victory", "always" or "never".