Edit Map Settings

by morsk

Allows you to change your map and map generation settings at any time you want. Fork of Bilka's "Change Map Settings". Note that map generation changes only apply to new chunks.

Utilities
9 months ago
2.0
14.9K
Environment

g Crash during init

13 days ago

I tried using the mod with Space Exploration and a bunch of other mods and got the following error whenever I want to load a save or start a new map:

The mod Edit Map Settings (0.1.6) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event EditMapSettings::on_init()
EditMapSettings/map_gen_settings_gui.lua:474: attempt to index field '?' (a nil value)
stack traceback:
EditMapSettings/map_gen_settings_gui.lua:474: in function 'set_to_current'
EditMapSettings/control.lua:40: in function 'set_to_current_map_gen_settings'
EditMapSettings/control.lua:58: in function 'set_to_current_all'
EditMapSettings/control.lua:255: in function <EditMapSettings/control.lua:252>

13 days ago

The issue seems to be planet-size. I added 'and name ~= "planet-size"' to the if statement in line 473 and it the map loaded.

12 days ago

like this ?

if control_prototype.category == "resource" then
  checkbox = resource_table[ENTIRE_PREFIX .. name .. "-check-wrapper"].check
elseif control_prototype.category == "terrain" and name ~= "planet-size" then
  checkbox = controls_with_scale_table[ENTIRE_PREFIX .. name .. "-check-wrapper"].check
elseif control_prototype.category == "enemy" then
  checkbox = enemies_table[ENTIRE_PREFIX .. name .. "-check-wrapper"].check
end
12 days ago

Yes, exactly.

12 days ago

thanks

New response