Page 1 of 1

Resources not generating in existing game

Posted: Wed Oct 05, 2016 12:05 am
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.

Re: Resources not generating in existing game

Posted: Wed Oct 05, 2016 12:09 am
by aubergine18
Does it work in new games? Also, could you post your prototypes for the resource, autoplace-control, etc.?

Re: Resources not generating in existing game

Posted: Wed Oct 05, 2016 12:35 am
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

Re: Resources not generating in existing game

Posted: Wed Oct 05, 2016 10:17 pm
by vedrit
Anyone? Is there something I need to put in the migration script?