Resources not generating in existing game

Place to get help with not working mods / modding interface.
vedrit
Filter Inserter
Filter Inserter
Posts: 293
Joined: Sun Aug 03, 2014 2:25 am
Contact:

Resources not generating in existing game

Post by vedrit »

Hi all, I've been notified that players using my mod, which recently added a world resource, are not seeing the resource generate after updating. Since I'm not terribly familiar with the resource spawning system, any help would be appreciated.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Resources not generating in existing game

Post by aubergine18 »

Does it work in new games? Also, could you post your prototypes for the resource, autoplace-control, etc.?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
vedrit
Filter Inserter
Filter Inserter
Posts: 293
Joined: Sun Aug 03, 2014 2:25 am
Contact:

Re: Resources not generating in existing game

Post by vedrit »

Yeah, resource generation works in new games

Code: Select all

data:extend(
{
  {
    type = "noise-layer",
    name = "alien-biomass"
  },
  {
    type = "autoplace-control",
    name = "alien-biomass",
    richness = true,
    order = "b-e"
  },
  {
    type = "resource",
    name = "alien-biomass",
    icon = "__AlienWall__/graphics/icons/biomass/alien-artifacts.png",
    flags = {"placeable-neutral"},
    order="a-b-a",
    minimum = 10,
    normal = 100,

    minable =
    {
      hardness = 0.9,
      mining_particle = "copper-ore-particle",
      mining_time = 2,
      result = "alien-biomass"
    },
    collision_box = {{ -0.1, -0.1}, {0.1, 0.1}},
    selection_box = {{ -0.5, -0.5}, {0.5, 0.5}},
    autoplace =
    {
      control = "alien-biomass",
      sharpness = 1,
      richness_multiplier = 1500,
      richness_base = 50,
      size_control_multiplier = 0.06,
      peaks = {
        {
          influence = 0.2,
          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.3,
          noise_layer = "alien-biomass",
          noise_octaves_difference = -2.3,
          noise_persistence = 0.4,
          starting_area_weight_optimal = 0.5,
          starting_area_weight_range = 0,
          starting_area_weight_max_range = 1,
        },
        {
          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,
        },
      },
    },
    stage_counts = {1000, 600, 400, 200, 100, 50, 20, 1},
    stages =
	{
		sheet = 
		{
			filename = "__AlienWall__/graphics/entity/biomass/alien-artifacts.png",
		priority = "extra-high",
		width = 38,
		height = 38,
		frame_count = 4,
		variation_count = 8
		},
    },
    map_color = {r=0.128, g=0.26, b=0.188}
  },
})
I think that has everything
vedrit
Filter Inserter
Filter Inserter
Posts: 293
Joined: Sun Aug 03, 2014 2:25 am
Contact:

Re: Resources not generating in existing game

Post by vedrit »

Anyone? Is there something I need to put in the migration script?
Post Reply

Return to “Modding help”