Page 1 of 1
LuaSurface map_gen_settings width and height cannot be changed
Posted: Sat Feb 03, 2024 2:17 pm
by SupplyDepoo
I wanted to increase the surface width/height but it doesn't work, even though the description of map_gen_settings says
"these can be modified after surface generation".
Re: LuaSurface map_gen_settings width and height cannot be changed
Posted: Sat Feb 03, 2024 2:42 pm
by boskid
Cannot confirm. It works fine for me:
Code: Select all
/c
local s = game.surfaces.nauvis.map_gen_settings
s.width = 123
s.height = 123
game.surfaces.nauvis.map_gen_settings = s
Re: LuaSurface map_gen_settings width and height cannot be changed
Posted: Sat Feb 03, 2024 2:55 pm
by SupplyDepoo
That exact snippet has no effect for me in 1.1.101. I can see that the width and height is written without error, but that's it.
Re: LuaSurface map_gen_settings width and height cannot be changed
Posted: Sat Feb 03, 2024 3:00 pm
by boskid
Map generator settings are primarily affecting generations of new chunks, if a chunk was already generated then it will not magically decide to switch from out-of-map tiles to grass or something. You are not providing too many details about your issue. When i increased the width and height a lot then new generated chunks are correctly being generated with non out-of-map tiles.

- 111074.png (993.06 KiB) Viewed 841 times
Re: LuaSurface map_gen_settings width and height cannot be changed
Posted: Sat Feb 03, 2024 3:17 pm
by SupplyDepoo
Ok, it works perfectly. I didn't realize that those chunks were generated with out-of-map tiles.
Re: LuaSurface map_gen_settings width and height cannot be changed
Posted: Sat Feb 03, 2024 3:18 pm
by Bilka
Moved to modding help.