autoplace_controls for new surface doesn't work
Posted: Tue Mar 05, 2019 12:40 pm
Hello,
I'm trying to change the MapGenSettings for a new surface. But I don't get it working with 0.17. With 0.16 I didn't had any problem. So I think I need to change something, but I can't find what.
Here is how I create my new surface:
The surface is then created and I also have only my moon-sand terrain. But no resources are getting generated. When I change the default_enable_all_autoplace_controls to true it works, but then also the vanilla terrain is available.
Anyone knows what I'm doing wrong?
Thank you for helping and best wishes.
I'm trying to change the MapGenSettings for a new surface. But I don't get it working with 0.17. With 0.16 I didn't had any problem. So I think I need to change something, but I can't find what.
Here is how I create my new surface:
Code: Select all
local settings = game.surfaces[1].map_gen_settings
settings.autoplace_controls = {
["moon-sand"] = { size = "normal", frequency="normal" },
["iron-ore"] = { size = 3, frequency = 0.125, richness = 2 },
["copper-ore"] = { size = 3, frequency = 0.125, richness = 2 },
["stone"] = { size = 3, frequency = 0.125, richness = 2 },
["uranium-ore"] = { size = 3, frequency = 0.125, richness = 2 },
["helium3"] = { size = 3, frequency = 0.25, richness = 2 },
["ice"] = { size = 3, frequency = 0.125, richness = 2 },
}
settings.autoplace_settings = {
entity =
{
treat_missing_as_default = false,
settings =
{
frequency = "none",
size = "none",
richness = "none"
}
},
decorative =
{
treat_missing_as_default = false,
settings =
{
frequency = "none",
size = "none",
richness="none"
}
}
}
settings.terrain_segmentation = "none"
settings.default_enable_all_autoplace_controls = false
settings.water = "none"
settings.starting_area = "none"
settings.height = 100000
settings.width = 100000
global.planets['moon'] = game.create_surface('moon', settings)
Anyone knows what I'm doing wrong?
Thank you for helping and best wishes.