Why is my resource not spawning?
Posted: Wed Jun 03, 2026 7:59 pm
I made a resource that has "autoplace = {probability_expression = 1}" so that it should spawn everywhere it can, just to test how autoplace works, but it is not being placed in the world at all.
The full code for my resource:
data:extend({
{
type = "resource",
name = "rubber-tree",
icon = "__Pid__/graphics/icons/rubber.png",
icon_size = 32,
infinite = true,
highlight = true,
minimum = 1,
normal = 10,
infinite_depletion_amount = 0,
resource_patch_search_radius = 15,
tree_removal_probability = 1,
tree_removal_max_distance = 1,
minable = {
mining_time = 1,
results = {
{
type = "fluid",
name = "rubber-sap",
amount_min = 10,
amount_max = 10,
probability = 1
}
}
},
collision_box = {{-1.5, -1.5}, {1.5, 1.5}},
selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
autoplace = {probability_expression = 1},
stage_counts = {},
map_color = {r = 0.9, g = 0.9, b = 0.9},
map_grid = false
}
})
The full code for my resource:
data:extend({
{
type = "resource",
name = "rubber-tree",
icon = "__Pid__/graphics/icons/rubber.png",
icon_size = 32,
infinite = true,
highlight = true,
minimum = 1,
normal = 10,
infinite_depletion_amount = 0,
resource_patch_search_radius = 15,
tree_removal_probability = 1,
tree_removal_max_distance = 1,
minable = {
mining_time = 1,
results = {
{
type = "fluid",
name = "rubber-sap",
amount_min = 10,
amount_max = 10,
probability = 1
}
}
},
collision_box = {{-1.5, -1.5}, {1.5, 1.5}},
selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
autoplace = {probability_expression = 1},
stage_counts = {},
map_color = {r = 0.9, g = 0.9, b = 0.9},
map_grid = false
}
})