Page 1 of 1

All runtime MapGenSettings properties are optional.

Posted: Mon May 11, 2026 5:38 pm
by Osmo
https://lua-api.factorio.com/latest/con ... tings.html doesn't list any property as optional, however you can create a surface with an empty MapGenSettings /c game.create_surface("some-surface", {})
As such, all properties should be marked as optional. It'd also be good to specify what the defaults are, as only default_enable_all_autoplace_controls currently specifies a default. In particular, defaults for autoplace_settings and starting_area properties are ambiguous.

Re: All runtime MapGenSettings properties are optional.

Posted: Fri May 15, 2026 6:04 pm
by Bilka
They're optional when used e.g. in create_surface but always set when reading them from the game. I've adjusted the docs accordingly and added the starting_area default. For autoplace_settings the default depends too much on context to document it generically on the type. If you have a specific method where you'd like to know the default, you could tell me that and I could attempt to detangle the code for that specific method.

Re: All runtime MapGenSettings properties are optional.

Posted: Fri May 15, 2026 6:44 pm
by Osmo
Thanks. For autoplace_settings, i was just curious/evaluating the options i had, if its complicated i'd need to test it anyway, no need to dig deep into it.