Make Resource more rare?

Place to get help with not working mods / modding interface.
BlockCommander
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Dec 26, 2016 9:04 am
Contact:

Make Resource more rare?

Post by BlockCommander »

I actually found out how to create a new ore, which works wonderful. But my problem now is,
the new ore isn't rare. There is more from this ore than from iron.
So now - How do i make it more rare?
Here my code:

Code: Select all

data:extend({
    {
      type = "noise-layer",
      name = "magical essence"
    },
    {
      type = "autoplace-control",
      name = "magical essence",
      richness = true,
      order = "b-f"
    },
    {
      type = "resource",
      name = "magical essence",
      icon = "__Magical__/graphics/magical-essence.png",
      flags = {"placeable-neutral"},
      order="a-b-d",
      minable =
      {
        hardness = 1,
        mining_particle = "coal-particle",
        mining_time = 2,
        result = "magical-essence-item"
      },
      collision_box = {{ -0.1, -0.1}, {0.1, 0.1}},
      selection_box = {{ -0.5, -0.5}, {0.5, 0.5}},
      autoplace =
      {
        control = "magical essence",
        sharpness = 1,
        richness_multiplier = 1,
        richness_base = 1,
        size_control_multiplier = 1,
        peaks = {
          {
            influence = 0.2,
            starting_area_weight_optimal = 0,
            starting_area_weight_range = 0,
            starting_area_weight_max_range = 2,
          },
          {
            influence = 0.65,
            noise_layer = "magical essence",
            noise_octaves_difference = -1.9,
            noise_persistence = 0.3,
            starting_area_weight_optimal = 0,
            starting_area_weight_range = 0,
            starting_area_weight_max_range = 2,
          },
          {
            influence = 0.3,
            starting_area_weight_optimal = 1,
            starting_area_weight_range = 0,
            starting_area_weight_max_range = 2,
          },
          {
            influence = 0.55,
            noise_layer = "magical essence",
            noise_octaves_difference = -2.3,
            noise_persistence = 0.4,
            starting_area_weight_optimal = 1,
            starting_area_weight_range = 0,
            starting_area_weight_max_range = 2,
          },
          {
            influence = -0.2,
            max_influence = 0,
            noise_layer = "iron-ore",
            noise_octaves_difference = -2.3,
            noise_persistence = 0.45,
          },
          {
            influence = -0.2,
            max_influence = 0,
            noise_layer = "coal",
            noise_octaves_difference = -2.3,
            noise_persistence = 0.45,
          },
          {
            influence = -0.2,
            max_influence = 0,
            noise_layer = "stone",
            noise_octaves_difference = -3,
            noise_persistence = 0.45,
          },
          {
            influence = -0.2,
            max_influence = 0,
            noise_layer = "copper-ore",
            noise_octaves_difference = -3,
            noise_persistence = 0.45,
          },
        },
      },
      stage_counts = {1},
      stages =
      {
        sheet =
        {
          filename = "__Magical__/graphics/magical-essence.png",
          priority = "extra-high",
          width = 38,
          height = 38,
          frame_count = 1,
          variation_count = 1
        },
      },
      map_color = {r=255, g=51, b=204}
    }
  })
I hope you can help me.

Thank you
- BlockCommander
orzelek
Smart Inserter
Smart Inserter
Posts: 3928
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Make Resource more rare?

Post by orzelek »

I don't see coverage parameter in your definition.
It's a recent addition in 0.14 I think and it might do what you need. Take a look at definition of base ores to see how it's used.
Post Reply

Return to “Modding help”