Types/AutoplaceSpecification: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Created page with "Autoplace specification is used to determine which entities are placed when generating map. Currently (0.7.3) it is used for enemy bases, resources and other entities (trees, ...")
 
(Removed old prototype docs)
Tag: Replaced
 
(46 intermediate revisions by 7 users not shown)
Line 1: Line 1:
Autoplace specification is used to determine which entities are placed when generating map.
<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/AutoplaceSpecification.html https://lua-api.factorio.com/latest/types/AutoplaceSpecification.html]
Currently (0.7.3) it is used for enemy bases, resources and other entities (trees, fishes, ...).


 
</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>
== General structure ==
Autoplace specification consists of a set of peaks that describe conditions for placing the entity and
several parameters.
 
== Properties ==
 
=== sharpness ===
'''Type''': [[Types/double]]
 
'''Default''': 0
[[File:sharpness.png|thumb|Example of sharpness filter with value 0.5]]
 
Parameter of the sharpness filter for post-processing probability of entity placement. Value of 0 disables the filter, with value 1, the filter is a step function centered around 0.5.
See [[#Probability calculation]].
 
=== richness_base ===
'''Type''': [[Types/double]]
 
'''Default''': 0
 
See [[#Richness calculation]].
 
=== richness_multiplier ===
'''Type''': [[Types/double]]
 
'''Default''': 0
 
See [[#Richness calculation]].
 
=== control ===
'''Type''': [[Types/string]]
 
'''Default''': ""
 
ID of [[Prototype/AutoplaceControl|autoplace control]] that applies to this entity.
 
=== peaks ===
'''Type''': list of [[#Autoplace Peaks]]
 
If this property is missing, then the whole autoplace specification is interpreted as a single peak
 
== Autoplace Peaks ==
 
=== influence ===
'''Type''': [[Types/double]]
 
'''Default''': 1
 
Influence multiplier.
See [[#Influence calculation]].
 
=== max_influence ===
'''Type''': [[Types/double]]
 
'''Default''': max double
 
Influence ceiling.
See [[#Influence calculation]].
 
=== min_influence ===
'''Type''': [[Types/double]]
 
'''Default''': min double
 
Minimal influence (after all calculations) of current peak.
See [[#Influence calculation]].
 
=== max_influence ===
'''Type''': [[Types/double]]
 
'''Default''': max double
 
Maximal influence (after all calculations) of current peak.
See [[#Influence calculation]].
 
=== richness_influence ===
'''Type''': [[Types/double]]
 
'''Default''': 0
 
Bonus for influence multiplier when calculating richness.
See [[#Influence calculation]].
 
=== noise_layer ===
'''Type''': [[Types/string]]
 
'''Default''': ""
 
ID of [[Prototype/NoiseLayer|noise layer]] to use for this peak.
If empty, then no noise is added to this peak.
 
See http://freespace.virgin.net/hugo.elias/models/m_perlin.htm.
 
=== noise_persistence ===
'''Type''': [[Types/double]]
 
'''Default''': 0.5
 
'''Min''': 0
 
'''Max''': 1
 
Persistence of the noise.
 
=== noise_octaves_difference ===
'''Type''': [[Types/int]]
 
'''Default''': 0
 
Difference between number of octaves of the world and of the noise.
 
=== *_optimal ===
'''Type''': [[Types/double]]
 
Optimal value of a tile property. If the property is close to this value, peak influence is 1.
See [[#Dimensions]].
 
=== *_range ===
'''Type''': [[Types/double]]
 
'''Default''': 0
 
Distance from the optimal parameters that is still considered optimal.
See [[#Dimensions]].
 
=== *_max_range ===
'''Type''': [[Types/double]]
 
Distance from the optimal parameters that get zero weight.
See [[#Dimensions]].
 
=== *_top_property_limit ===
'''Type''': [[Types/double]]
 
'''Default''': max double
 
Limit distance from the optimum on a single (positive) side. This is pure magic.
See [[#Dimensions]].

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/AutoplaceSpecification.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.