I am not able to write in English myself, so I am using ChatGPT for help. Please excuse any awkward phrasing.
I’m trying to limit the size of a planetary surface that I’m developing.
To do this, I set the width and height values in the planet’s map_gen_settings.
However, when I check in-game, it seems that these values have no effect at all.
All other members besides width, height, and seed seem to be applied correctly in my code. So I wondered if these values simply aren’t applied at the prototype stage. I tried setting width and height again during the on_surface_created event, but I got the same result.
How can I set the width and height of a surface? I have checked the documentation, but I haven’t been able to figure out how to do it on my own. If this is a technical limitation of Factorio, I would greatly appreciate any guidance or help.
[2.0.69] map_gen_settings width height not work
[2.0.69] map_gen_settings width height not work
I am not able to write in English myself, so I am using ChatGPT for help. Please excuse any awkward phrasing.
Re: [2.0.69] map_gen_settings width height not work
You need to write the modified map gen settings back to the surfaceXeon257 wrote: Sun Oct 12, 2025 9:53 amI tried setting width and height again during the on_surface_created event, but I got the same result.
Code: Select all
local settings = surface.map_gen_settings
settings.width = 50
settings.height = 50
surface.map_gen_settings = settings
Re: [2.0.69] map_gen_settings width height not work
Ah, thank you very much for your answer. Could you explain why the above variables can only be set at runtime? If this is intentional, I would also be curious to know the reasoning behind it.
I am not able to write in English myself, so I am using ChatGPT for help. Please excuse any awkward phrasing.
Re: [2.0.69] map_gen_settings width height not work
Those variables are part of the map generation settings that the player controls when making a new game and so the values from the GUI are used to make all planets runtime.
If you want to get ahold of me I'm almost always on Discord.
Re: [2.0.69] map_gen_settings width height not work
Ah, it seems that the user-defined map settings are being overwritten by the Lua object, which makes it look like they aren’t working. Thank you for the clarification!
I am not able to write in English myself, so I am using ChatGPT for help. Please excuse any awkward phrasing.

