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

g Cliffs issue

10 months ago

It seems that the current version of the mod is unable to disable cliffs? Is this indented or might get fixed later? Updated some map generation settings on my cliff less world and it caused cliffs to spawn on newly generated chunks;/

10 months ago

It is definitely not intended that it make cliffs start spawning. I didn't change the cliff code and thought it would continue working from before. I will look at this now!

10 months ago

Setting Continuity to 0 should get rid of cliffs, which is also what /editor does, and worked in 1.1.

I think there may be UI bugs that default it back to 1, and then apply the 1 and turn cliffs on. I am looking into this now. But as long as Continuity is 0 there should not be cliffs.

10 months ago
(updated 10 months ago)

I was trying to adjust the value of continuity and frequency but I was not able to set them to 0 as the mod would run in to some unexpected error and close the save. As I looked through the code, it seems that UI has a default set to 1:1 for both frequency and continuity it is just interesting how it's able to set those values but not bellow 0. Maybe Factorio 2.0 changed the way of how cliffs are enabled/disabled completely? I don't have any experience in lua and Factorio modding so can't really be helpful on debug here. The error with values being 0:0:

Error while running event EditMapSettings::on_gui_click (ID 1)
Value (inf) outside of range. The data type allows values from -3.40282e+38 to 3.40282e+38 in property tree at ROOT.cliff_settings.cliff_elevation_interval
stack traceback:
[C]: in function 'newindex'
__EditMapSettings
/control.lua:169: in function 'edit_map_gen_settings'
EditMapSettings/control.lua:199: in function <EditMapSettings/control.lua:179>

10 months ago
(updated 10 months ago)

I get errors setting Frequency to 0, but Continuity works.

The whole thing has to be redone because there are different kinds of cliffs on different planets now, but I would like to fix whatever small UI issue is defaulting them to 1 before looking into that. (It is not this bad, as each surface can only have one type of cliff. The UI won't have to change, just some code.)

2.0 did change where a lot of the cliff data is. I may just have to redo the whole thing now, which would take 3 hours.

10 months ago

After some more tests, it seems like no more errors while changing continuity ONLY to 0. So I was able to "fix" my world. And yeah adopting legacy code is a huge lift. Thanks for all of your efforts on porting this mod to 2.0!

10 months ago
(updated 10 months ago)

It should be fixed now. Thanks for reporting this.
I still didn't add error-checking to the textfields, as Tuesday is the worst day for me, and I wanted to fix badly-set data before other things. Although I think it can only crash when putting a 0 Frequency in 1.1 data, and it will try to convert to 2.0 data after, so this almost never happens.
I'd rather it clamp bad values to acceptable ranges immediately, not need error-checking afterwards.

10 months ago

Sounds great! Appreciate for fast fix!<3

New response