Recipe Difficulty with --map-settings

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
EntroperZero
Inserter
Inserter
Posts: 20
Joined: Wed Apr 26, 2017 4:54 am
Contact:

Recipe Difficulty with --map-settings

Post 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?

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Recipe Difficulty with --map-settings

Post 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.
quick links: log file | graphical issues | wiki

EntroperZero
Inserter
Inserter
Posts: 20
Joined: Wed Apr 26, 2017 4:54 am
Contact:

Re: Recipe Difficulty with --map-settings

Post by EntroperZero »

Okay, seems to work. Thanks!

Post Reply

Return to “Technical Help”