Page 1 of 1

Please allow modding map gen presets without overwriting

Posted: Fri Nov 22, 2019 2:41 pm
by Yehn
Currently, if you try to define a new set of map presets, you will receive the following error:

Image

This means the only option left is to overwrite the defaults. While I don't know of anyone else doing mod development that affects map presets, but should someone else wish to add their own presets, this also means there will be no way to avoid a mod conflict with the current API.

Re: Please allow modding map gen presets without overwriting

Posted: Fri Nov 22, 2019 6:44 pm
by eradicator
Already exists.

You're doing it wrong, you have to add your preset to the default preset prototype:

Code: Select all

  data.raw['map-gen-presets'].default['your-new-preset-name'] = {
    order = 'whatever',
    basic_settings = {
      height = 100,
      width = 100,
      }
    }