The proposed format is:
LuaGameScript.evaluate_noise_expression(Position, NoiseExpression, MapGenSettings)
MapGenSettings would be optional and default to LuaGameScript.default_map_gen_settings
We could then do things like:
Code: Select all
game.evaluate_noise_expression(
{10,-53},
game.tile_prototypes["water"].autoplace_specification.probability_expression,
game.surfaces[2].map_gen_settings)
Code: Select all
game.evaluate_noise_expression(
{0,0},
{expression_id = "variable:elevation", type = "variable", variable_name = "elevation" },
{seed = 1, water=1.01})
- Debugging terrain generation, the actual climate value at a location.
- Gradually changing the terrain - use elevation values to determines what gets flooded or dried up.
- Evaluating an arbitrary expression for script-generated stuff in noise patterns.