Page 1 of 1

[0.16.36] Crash changing map_gen_settings in on_chunk_genera

Posted: Thu Apr 05, 2018 9:46 pm
by justarandomgeek
With the following event handler in a scenario, or entered in game on the command line:

Code: Select all

script.on_event(defines.events.on_chunk_generated, function(event)
  local surface = event.surface
  if surface.name == "nauvis" then
    local mgs = surface.map_gen_settings
    mgs.seed = mgs.seed+1
    surface.map_gen_settings = mgs
  end
end)

Re: [0.16.36] Crash changing map_gen_settings in on_chunk_genera

Posted: Sat Apr 14, 2018 5:13 pm
by Rseding91
Thanks for the report however in this case you simply can't do that.

Changing map_gen_settings requires all chunks being generated are finished immediately which fires the chunk_generated event which recursively repeats.