Page 1 of 1

Recipe Difficulty with --map-settings

Posted: Thu Jun 08, 2017 8:30 pm
by EntroperZero
Hi there,

I'm trying to create a set of JSON files for map-gen-settings and map-settings, that are the same as the presets the game gives you in the UI. I'm having trouble figuring out the right settings for recipe difficulty.

map-settings-example.json looks like:

Code: Select all

"difficulty_settings":
{
    "recipe_difficulty": 1,
    "technology_difficulty": 1,
    "technology_price_multiplier": 1
},
And map-gen-presets.lua:

Code: Select all

["marathon"] =
{
  order = "c",
  advanced_settings =
  {
    difficulty_settings =
    {
      recipe_difficulty = defines.difficulty_settings.recipe_difficulty.expensive,
      technology_difficulty = defines.difficulty_settings.technology_difficulty.expensive,
      technology_price_multiplier = 4
    }
  }
},
From this I took a guess that normal recipes = 1, and expensive = 2, but that seems not to be the case. If I use 2, the server says: 0.000 Error Util.cpp:62: Unknown recipe difficulty.

Are the correct values documented somewhere?

Re: Recipe Difficulty with --map-settings

Posted: Thu Jun 08, 2017 10:00 pm
by daniel34
0 will set it to normal recipe difficulty and 1 to expensive recipe difficulty.

Not sure why the example is set to 1, probably an oversight by the devs.

Re: Recipe Difficulty with --map-settings

Posted: Fri Jun 09, 2017 1:24 am
by EntroperZero
Okay, seems to work. Thanks!