Code: Select all
/c local surface = game.player.surface;
local ore = nil
local size = 5
local density = 10
for y=-size,size do
for x=-size,size do
a = (((size+1) - math.abs(x))*10)
b = (((size+1) - math.abs(y))*10)
if a < b then
ore = math.random(((a*density)-(a*(density-8))),((a*density)+(a*(density-8))))
end
if b < a then
ore = math.random(((b*density)-(b*(density-8))),((b*density)+(b*(density-8))))
end
surface.create_entity({name="copper-ore", amount=ore, position={game.player.position.x+x, game.player.position.y+y}})
end
end
I first tried with the change of "stone" to "copper-ore". Then I just copied the command from the wiki before taking the screenshot. That command also didn't work.
What is the correct command to create new ore patches?
Edit: I'm using Factorio 0.15.28