How to make my own map preset

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
aklesey1
Smart Inserter
Smart Inserter
Posts: 1862
Joined: Sun May 18, 2014 3:45 pm
Contact:

How to make my own map preset

Post by aklesey1 »

In game there are already certain presets for maps like dangerous world or rail world but that I if you want to make own preset to choose it and to play with habitual settings settings?
Nickname on ModPortal - Naron79

User avatar
withers
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Apr 08, 2016 4:54 pm
Contact:

Re: How to make my own map preset

Post by withers »

Here;s an example of map presets I made for my own use.... Just put in data.lua

Code: Select all

data:extend(
{
  {
    type = "map-gen-presets",
    name = "default",
    -- default changes nothing
    default =
    {
      default = true,
      order = "a"
    },
    ["rich-resources"] =
    {
      order = "b",
      basic_settings =
      {
        autoplace_controls =
        {
          ["iron-ore"] = { richness = "very-good"},
          ["copper-ore"] = { richness = "very-good"},
          ["stone"] = { richness = "very-good"},
          ["coal"] = { richness = "very-good"},
          ["uranium-ore"] = { richness = "very-good"},
          ["crude-oil"] = { richness = "very-good"}
        }
      }
    },
    ["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
        }
      }
    },
    ["dangerous"] =
    {
      order = "d",
      basic_settings =
      {
        autoplace_controls =
        {
          ["enemy-base"] = { frequency = "very-high"}
        }
      },
      advanced_settings =
      {
        enemy_evolution =
        {
          time_factor = 0.00002,
          pollution_factor = 0.00002
        }
      }
    },
    ["death-world"] =
    {
      order = "d",
      basic_settings =
      {
        autoplace_controls =
        {
          ["enemy-base"] = { frequency = "very-high"}
        }
      },
      advanced_settings =
      {
        enemy_evolution =
        {
          time_factor = 0.00002,
          pollution_factor = 0.00002
        },
        difficulty_settings =
        {
          recipe_difficulty = defines.difficulty_settings.recipe_difficulty.expensive,
          technology_difficulty = defines.difficulty_settings.technology_difficulty.expensive,
          technology_price_multiplier = 4
        }
      }
    },
    ["rail-world"] =
    {
      order = "e",
      basic_settings =
      {
        autoplace_controls = {
          coal = {
            frequency = "very-low",
            size = "high"
          },
          ["copper-ore"] = {
            frequency = "very-low",
            size = "high"
          },
          ["crude-oil"] = {
            frequency = "low",
            size = "high"
          },
          ["uranium-ore"] = {
            frequency = "low",
            size = "high"
          },
          ["enemy-base"] = {
            frequency = "low",
          },
          ["iron-ore"] = {
            frequency = "very-low",
            size = "high"
          },
          stone = {
            frequency = "very-low",
            size = "high"
          }
        },
        terrain_segmentation = "very-low",
        water = "high",
      },
      advanced_settings =
      {
        enemy_evolution =
        {
          time_factor = 0.000002
        },
        enemy_expansion =
        {
         enabled = false
        }
      }
    },
     ["wear-tear"] =
    {
      order = "f",
      basic_settings =
      {
        autoplace_controls =
        {
          ["angels-ore1"] = { frequency = "low", size = "high", richness = "good"},
          ["angels-ore2"] = { frequency = "low", size = "high", richness = "good"},
          ["angels-ore3"] = { frequency = "low", size = "high", richness = "good"},
          ["angels-ore4"] = { frequency = "low", size = "high", richness = "good"},
          ["angels-ore5"] = { frequency = "low", size = "high", richness = "good"},
          ["angels-ore6"] = { frequency = "low", size = "high", richness = "good"},
          ["angels-fissure"] = { frequency = "low", size = "high", richness = "very-good"},
          ["angels-natural-gas"] = { frequency = "low", size = "high", richness = "very-good"},
          ["coal"] = { frequency = "low", size = "high", richness = "very-good"},
          ["crude-oil"] = { frequency = "low", size = "high", richness = "very-good"}
         }, terrain_segmentation = "low", water = "very-high",
      },
     advanced_settings = {enemy_evolution = {time_factor = 0, pollution_factor = 0.000008}}
    }
  }
})

User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: How to make my own map preset

Post by impetus maximus »

will editing the data.lua file break multi-player?

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

Re: How to make my own map preset

Post by daniel34 »

impetus maximus wrote:will editing the data.lua file break multi-player?
Yes. It will say "Mod mismatch detected!".

You can make a mod that includes that data.lua and you can generate a new map with that mod enabled, but you'll have to disable the mod for other players to be able to connect. However generated maps will stay the same after you disabled the mod, so you could generate a new map with a changed data.lua or with a mod and save it, then revert/uninstall the data.lua change or mod, then start the map as vanilla and others will be able to join you.
quick links: log file | graphical issues | wiki

User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: How to make my own map preset

Post by impetus maximus »

many thanks daniel34. :)
hope we will see user presets in vanilla.

Post Reply

Return to “Gameplay Help”