LuaSurface map_gen_settings width and height cannot be changed

Place to get help with not working mods / modding interface.
Post Reply
User avatar
SupplyDepoo
Filter Inserter
Filter Inserter
Posts: 286
Joined: Sat Oct 29, 2016 8:42 pm
Contact:

LuaSurface map_gen_settings width and height cannot be changed

Post 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".

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2252
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: LuaSurface map_gen_settings width and height cannot be changed

Post 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

User avatar
SupplyDepoo
Filter Inserter
Filter Inserter
Posts: 286
Joined: Sat Oct 29, 2016 8:42 pm
Contact:

Re: LuaSurface map_gen_settings width and height cannot be changed

Post 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.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2252
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: LuaSurface map_gen_settings width and height cannot be changed

Post 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
111074.png (993.06 KiB) Viewed 275 times

User avatar
SupplyDepoo
Filter Inserter
Filter Inserter
Posts: 286
Joined: Sat Oct 29, 2016 8:42 pm
Contact:

Re: LuaSurface map_gen_settings width and height cannot be changed

Post by SupplyDepoo »

Ok, it works perfectly. I didn't realize that those chunks were generated with out-of-map tiles.

Bilka
Factorio Staff
Factorio Staff
Posts: 3140
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: LuaSurface map_gen_settings width and height cannot be changed

Post by Bilka »

Moved to modding help.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Modding help”