NamedNoiseFunction 'noise-function' Example code
| Inherits from Prototype « PrototypeBase |
| parameters | :: array[string] | The order of the parameters matters because functions can also be called with positional arguments. [...] |
The order of the parameters matters because functions can also be called with positional arguments. [...] | ||
| expression | :: NoiseExpression | |
| local_expressions optional | :: dictionary[string → NoiseExpression] | A map of expression name to expression. [...] |
A map of expression name to expression. [...] | ||
| local_functions 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. [...] | ||
| custom_tooltip_fields optional | :: array[CustomTooltipField] | Allows to add extra description items to the tooltip and Factoriopedia. |
Allows to add extra description items to the tooltip and Factoriopedia. | ||
| 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 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_description optional | :: LocalisedString | Provides additional description used in factoriopedia. |
Provides additional description used in factoriopedia. | ||
| subgroup optional | :: ItemSubGroupID | The name of an ItemSubGroup. |
The name of an ItemSubGroup. | ||
| hidden optional | :: boolean | |
| hidden_in_factoriopedia optional | :: boolean | |
| parameter optional | :: boolean | 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_simulation 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. | ||
Properties
parameters :: array[string] 
expression :: NoiseExpression
local_expressions :: dictionary[string → NoiseExpression] optional 
local_functions :: dictionary[string → NoiseFunction] optional 
Examples 
{
type = "noise-function",
name = "random_between",
parameters = {"from", "to"},
expression = "random_penalty{x = x, y = y, source = to, amplitude = to - from}"
}
{
type = "noise-function",
name = "finish_elevation",
parameters = {"elevation", "segmentation_multiplier"},
expression = "min((elevation - water_level) / segmentation_multiplier, <more stuff>, starting_lake_distance / 16 + starting_lake_noise / 2)",
local_expressions =
{
starting_lake_distance = "distance_from_nearest_point{x = x, y = y, points = starting_lake_positions, maximum_distance = 1024}",
starting_lake_noise = "quick_multioctave_noise_persistence{<more stuff>}"
}
}

