A NoiseExpression with a name. The base game uses named noise expressions to specify functions for many map properties to be used in map generation; e.g. the "elevation" expression is used to calculate elevation for every point on a map. For a list of the built-in named noise expressions, see data.raw.
Named noise expressions can be used by MapGenSettings and MapGenPreset to override which named expression is used to calculate a given property by having an entry in property_expression_names
, e.g. elevation = "elevation_island"
.
Alternate expressions can be made available in the map generator GUI by setting their intended_property
to the name of the property they should override.
Named noise expressions can also be used as noise variables e.g. var("my-noise-expression")
.
Inherits from Prototype « PrototypeBase |
expression | :: NoiseExpression | The noise expression itself. [...] |
The noise expression itself. [...] | ||
local_expressionsnew optional | :: dictionary[string → NoiseExpression] | A map of expression name to expression. [...] |
A map of expression name to expression. [...] | ||
local_functionsnew optional | :: dictionary[string → NoiseFunction] | A map of function name to function. [...] |
A map of function name to function. [...] | ||
intended_property optional | :: string | Names the property that this expression is intended to provide a value for, if any. [...] |
Names the property that this expression is intended to provide a value for, if any. [...] |
factoriopedia_alternative optional | :: string | The ID type corresponding to the prototype that inherits from this. [...] |
The ID type corresponding to the prototype that inherits from this. [...] |
type | :: string | Specifies the kind of prototype this is. [...] |
Specifies the kind of prototype this is. [...] | ||
name | :: string | Unique textual identification of the prototype. [...] |
Unique textual identification of the prototype. [...] | ||
order[overridden] optional | :: Order | Used to order prototypes in inventory, recipes and GUIs. [...] |
Used to order prototypes in inventory, recipes and GUIs. [...] | ||
localised_name optional | :: LocalisedString | Overwrites the name set in the locale file. [...] |
Overwrites the name set in the locale file. [...] | ||
localised_description optional | :: LocalisedString | Overwrites the description set in the locale file. [...] |
Overwrites the description set in the locale file. [...] | ||
factoriopedia_descriptionnew optional | :: LocalisedString | Provides additional description used in factoriopedia. |
Provides additional description used in factoriopedia. | ||
subgroupnew optional | :: ItemSubGroupID | The name of an ItemSubGroup. |
The name of an ItemSubGroup. | ||
hiddennew optional | :: bool | |
hidden_in_factoriopedianew optional | :: bool | |
parameternew optional | :: bool | Whether the prototype is a special type which can be used to parametrize blueprints and doesn't have other function. |
Whether the prototype is a special type which can be used to parametrize blueprints and doesn't have other function. | ||
factoriopedia_simulationnew optional | :: SimulationDefinition | The simulation shown when looking at this prototype in the Factoriopedia GUI. |
The simulation shown when looking at this prototype in the Factoriopedia GUI. |
expression | :: NoiseExpression | The noise expression itself. [...] |
The noise expression itself. [...] | ||
intended_property optional | :: string | Names the property that this expression is intended to provide a value for, if any. [...] |
Names the property that this expression is intended to provide a value for, if any. [...] | ||
local_expressionsnew optional | :: dictionary[string → NoiseExpression] | A map of expression name to expression. [...] |
A map of expression name to expression. [...] | ||
local_functionsnew optional | :: dictionary[string → NoiseFunction] | A map of function name to function. [...] |
A map of function name to function. [...] |
factoriopedia_alternative optional | :: string | The ID type corresponding to the prototype that inherits from this. [...] |
The ID type corresponding to the prototype that inherits from this. [...] |
name | :: string | Unique textual identification of the prototype. [...] |
Unique textual identification of the prototype. [...] | ||
type | :: string | Specifies the kind of prototype this is. [...] |
Specifies the kind of prototype this is. [...] | ||
factoriopedia_descriptionnew optional | :: LocalisedString | Provides additional description used in factoriopedia. |
Provides additional description used in factoriopedia. | ||
factoriopedia_simulationnew optional | :: SimulationDefinition | The simulation shown when looking at this prototype in the Factoriopedia GUI. |
The simulation shown when looking at this prototype in the Factoriopedia GUI. | ||
hiddennew optional | :: bool | |
hidden_in_factoriopedianew optional | :: bool | |
localised_description optional | :: LocalisedString | Overwrites the description set in the locale file. [...] |
Overwrites the description set in the locale file. [...] | ||
localised_name optional | :: LocalisedString | Overwrites the name set in the locale file. [...] |
Overwrites the name set in the locale file. [...] | ||
order[overridden] optional | :: Order | Used to order prototypes in inventory, recipes and GUIs. [...] |
Used to order prototypes in inventory, recipes and GUIs. [...] | ||
parameternew optional | :: bool | Whether the prototype is a special type which can be used to parametrize blueprints and doesn't have other function. |
Whether the prototype is a special type which can be used to parametrize blueprints and doesn't have other function. | ||
subgroupnew optional | :: ItemSubGroupID | The name of an ItemSubGroup. |
The name of an ItemSubGroup. |
The noise expression itself. This is where most of the noise magic happens.
A map of expression name to expression.
Local expressions are meant to store data locally similar to local variables in Lua. Their purpose is to hold noise expressions used multiple times in the named noise expression, or just to tell the reader that the local expression has a specific purpose. Local expressions can access other local definitions, but recursive definitions aren't supported.
A map of function name to function.
Local functions serve the same purpose as local expressions - they aren't visible outside of the specific prototype and they have access to other local definitions.
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, intended_property
should be "temperature".
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 intended_property
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.