Types/MapGenPreset: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m (→‎autoplace_controls: better example)
(Removed old prototype docs)
 
(18 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Basics ==
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/types/MapGenPreset.html https://lua-api.factorio.com/latest/types/MapGenPreset.html]
A map gen preset. Used in [[Prototype/MapGenPresets]].


== Mandatory properties ==
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>
 
=== order ===
'''Type''': [[Types/Order]]
 
Specifies the ordering in the [[world 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]]
 
All properties can be omitted, if not set they will just use the existing values.
 
==== terrain_segmentation ====
'''Type''': [[Types/MapGenSize]]
 
Shown as water frequency in the world generator GUI.
 
==== water ====
'''Type''': [[Types/MapGenSize]]
 
Shown as water size in the world generator GUI.
 
==== default_enable_all_autoplace_controls ====
'''Type''': [[Types/bool]]
 
==== 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 = 2, size = 0.5, frequency=2},
    ["enemy-base"] = { size = 1},
    ["trees"] = { richness = 4}
  }</syntaxhighlight>
 
==== autoplace_settings ====
'''Type''': [[Types/table]]
 
==== property_expression_names ====
'''Type''': [[Types/table]]
 
Map of property name (e.g. "elevation") to name of noise expression that will provide it. Entries may be ommitted.
 
==== starting_points ====
'''Type''': [[Types/table]] of [[Types/Position]]
 
Array of the positions of the starting areas.
 
==== seed ====
'''Type''': [[Types/uint32]]
 
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 ===
'''Type''': [[Types/table]]
 
All properties can be omitted, if not set they will just use the existing values.
 
==== pollution ====
'''Type''': [[Types/table]]
 
{| class="wikitable"
|-
! 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]]
|-
|}
 
==== enemy_evolution ====
'''Type''': [[Types/table]]
 
{| class="wikitable"
|-
! Property name !! Type
|-
| enabled || [[Types/bool]]
|-
| time_factor || [[Types/double]]
|-
| destroy_factor || [[Types/double]]
|-
| pollution_factor || [[Types/double]]
|-
|}
 
==== enemy_expansion ====
'''Type''': [[Types/table]]
 
{| class="wikitable"
|-
! 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.
|-
|}
 
==== difficulty_settings ====
'''Type''': [[Types/table]]
 
{| class="wikitable"
|-
! Property name !! Type !! Comment
|-
| recipe_difficulty || [[Types/uint8]] || 0 is normal, 1 is expensive
|-
| technology_difficulty || [[Types/uint8]] || 0 is normal, 1 is expensive
|-
| technology_price_multiplier || [[Types/double]]
|-
| research_queue_setting || [[Types/string]] || Either "after-victory", "always" or "never".
|-
|}

Latest revision as of 14:32, 25 October 2024

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/types/MapGenPreset.html

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.