Page 1 of 1

Allow changing of default preset for basic_settings in map-gen-presets

Posted: Sun Feb 10, 2019 7:23 pm
by Raelf
Hello,

I tried to change the basic_settings for alle defines map-gen-presets. My intension for this is that I'm implementing a second planet with different terrains and additional resources.
For changing the default settings I tried this:

Code: Select all

data.raw["map-gen-presets"].default["default"].basic_settings = { autoplace_controls = { ["helium3"] = {size = "none"}, ["moon-sand"] = {size = "none"} } }
I'm getting this error when I starting Factorio now:

Code: Select all

Error while loading map-gen-presets prototype "default": The default preset can't have any settings defined.
I see how this is making sense for nearly all mods, but for me it makes it harder now.

Would there be any posibility to remove that check or adding a setting that I can allow overriding it?
For example something like:

Code: Select all

data.raw["map-gen-presets"].default["default"].allow_basic_settings = true
Thanks for helping and best wishes,
Ralf

Re: Allow changing of default preset for basic_settings in map-gen-presets

Posted: Sun Feb 10, 2019 7:36 pm
by steinio
Then it wouldn't be a default anymore.

Re: Allow changing of default preset for basic_settings in map-gen-presets

Posted: Sun Feb 10, 2019 11:34 pm
by Raelf
Why not? Sure, it wouldn’t be the Factorio default value anymore.
But it would be nice if I could set the default values for my mod by myself.

To achieve it now, I need to manipulate the presets after starting a game. So it’s already kinda possible to modify the default values. Just that the player is not seeing what’s going on. Additionally the map preview generation will not show the then generated surface.

Re: Allow changing of default preset for basic_settings in map-gen-presets

Posted: Mon Feb 11, 2019 12:39 am
by Rseding91
Default in the map gen presets is "not changed by anyone or anything".

No one is allowed to change any values on the default preset.

Re: Allow changing of default preset for basic_settings in map-gen-presets

Posted: Mon Feb 11, 2019 12:47 am
by Raelf
Is it somehow possible to add a default value at the resource entity itself.
But then it would be also a change of the default value.
Seems like I need to stay with the update of the surface settings after the game start.
Thank you for answering.