Why is my resource not spawning?

Place to get help with not working mods / modding interface.
User avatar
Pid
Burner Inserter
Burner Inserter
Posts: 13
Joined: Fri Nov 14, 2025 3:07 pm
Contact:

Why is my resource not spawning?

Post by Pid »

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
}
})
Bilka
Factorio Staff
Factorio Staff
Posts: 3761
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Why is my resource not spawning?

Post by Bilka »

You need to add it to the map_gen_settings.autoplace_settings in the nauvis planet prototype (or wherever else you want it to spawn).
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
User avatar
Pid
Burner Inserter
Burner Inserter
Posts: 13
Joined: Fri Nov 14, 2025 3:07 pm
Contact:

Re: Why is my resource not spawning?

Post by Pid »

Bilka wrote: Wed Jun 03, 2026 8:15 pm You need to add it to the map_gen_settings.autoplace_settings in the nauvis planet prototype (or wherever else you want it to spawn).
I just tried it and it says it only works for tiles, entities, and decoratives.
User avatar
Pid
Burner Inserter
Burner Inserter
Posts: 13
Joined: Fri Nov 14, 2025 3:07 pm
Contact:

Re: Why is my resource not spawning?

Post by Pid »

I eventually figured it out on my own by looking at another mod and trying many times.
Post Reply

Return to “Modding help”