Page 1 of 1
Error in assignID, autoplace-control
Posted: Sat Jun 08, 2019 11:36 am
by 15Nova22
Hello there, fellow modders.
I have a problem with my little mod I´m creating and I´m too dumb to find the problem ><.
Hope you have better eyes than me and you can spot the error I made.
Error: Error in assignId, autoreplace-control with name 'novaore' does not exist.
Entity Code: Select all
local novaore = {
type = "resource",
name = "novaore",
icon = "__Test__/graphics/icons/Ore.png",
icon_size= 32,
flags = {"placeable-neutral"},
category = "basic-solid",
order = "c",
infinite = false,
highlight = false,
minimum = 5000,
normal = 10000,
infinite_depletion_amount = 1,
resource_patch_search_radius = 15,
minable = {
mining_time = 1,
mining_particle = "iron-ore-particle",
result = "novaore",
},
autoplace = resource_autoplace.resource_autoplace_settings{
name = "novaore",
order = "c",
base_density = 10.0,
base_spots_per_km2 = 2.0,
random_probability = 1/50,
random_spot_size_minimum = 1,
random_spot_size_maximum = 1,
has_starting_area_placement = true,
--resource_index = resource_autoplace.resource_indexes["novaore"],
regular_rq_factor_mulitplier = 1
},
stage_counts = {0},
stages = {
sheet = {
filename = "__Test__/graphics/entity/Ore.png",
priority = "extra-high",
width = 32,
height = 32,
frame_count = 1,
variation_count = 1
}
},
map_color = {r=0, g=0,b=1},
map_grid = false
}
data:extend({
novaore
})
Item Code: Select all
local nova_ore = {
type = "item",
name = "novaore",
icon = "__Test__/graphics/icons/Ore.png",
icon_size = 32,
subgroup = "raw-resource",
stack_size = 50
}
local nova_plate = {
type = "item",
name = "novaplate",
icon = "__Test__/graphics/icons/Plate.png",
icon_size = 32,
subgroup = "raw-resource",
stack_size = 100
}
data:extend({
nova_ore,
nova_plate,
})
Re: Error in assignID, autoplace-control
Posted: Sat Jun 08, 2019 5:00 pm
by 15Nova22
I fixed it, in case anyone has the same issue,this is the fix:
local auto = {
type = "autoplace-control",
name = "novaore",
richness = true,
order = "c",
category = "resource"
}
and then add ist to data:extend