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
11 months ago
2.0
16.6K
Environment

g Crash during init

2 months 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>

2 months 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.

2 months 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
2 months ago

Yes, exactly.

2 months ago

thanks

5 days ago

Soo I edited that file to make sshika's now I get this error:

EditMapSettings/gui.lua:3: EditMapSettings/map_gen_settings_gui.lua:1: <eof> expected near 'elseif'
stack traceback:
[C]: in function 'require'
EditMapSettings/gui.lua:3: in main chunk
[C]: in function 'require'
EditMapSettings/control.lua:1: in main chunk

I just want to lower evolution down a bit to play around building but still have bugs later. But commands kill achievements apparently. Not that those are a big deal but still would be nice. But I have no idea what that error means. I see the files but past that, no idea.

New response