Prototype/NamedNoiseExpression: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m (Alternate expressions can be made available in the map generator GUI by blah blah blah)
(Removed old prototype docs)
Tag: Replaced
 
(11 intermediate revisions by 2 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/prototypes/NamedNoiseExpression.html https://lua-api.factorio.com/latest/prototypes/NamedNoiseExpression.html]
Prototype type: '''noise-expression'''


 
</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>
A [[Types/NoiseExpression]] together with a name.
 
Named noise expressions are used to specify functions for elevation, temperature, moisture, aux, and cliffiness.
 
e.g. the "elevation" expression is used to calculate elevation for every point on a map.
 
[http://lua-api.factorio.com/latest/Concepts.html#MapGenSettings MapGenSettings]
can override which named expression is used to calculate a given property by having an entry in
<code>property_expression_names</code>.  e.g. <code>elevation = "0.16-elevation"</code>
Alternate expressions can be made available in the map generator GUI by setting their
<code>intended_property</code> to the name of the property they should override.
 
== Mandatory properties ==
Inherits all properties from [[Prototype]].
 
=== expression ===
'''Type''': [[Types/NoiseExpression]]
 
The expression itself.
 
== Optional properties ==
=== intended_property ===
'''Type''': [[Types/string]]
 
Names the property that this expression is intended to provide a value for, if any.
This will make the expression show up as an option in the map generator GUI, unless it is the only expression with that
intended property, in which case it will be hidden and selected by default.
 
For example if a noise expression is intended to be used as an alternative temperature generator, <code>intended_property</code> should be "temperature".
 
=== order ===
'''Type''': [[Types/Order]]
 
Used to order alternative expressions in the map generator GUI.
For a given property (e.g. 'temperature'), the NamedNoiseExpression with that property's name as its <code>intended_property</code>
with the lowest order will be chosen as the default in the GUI.
 
If no order is specified, it defaults to "2000" if the property name matches the expression name
(making it the 'technical default' generator for the property if none is specified in MapGenSettings),
or "3000" otherwise.  A generator defined with an order less than "2000" but with a unique name
can thereby override the default generator used when creating a new map through the GUI without automatically overriding
the 'technical default' generator, which is probably used by existing maps.

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/prototypes/NamedNoiseExpression.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.