Add new oil patch

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
Pascali
Fast Inserter
Fast Inserter
Posts: 170
Joined: Wed Aug 23, 2017 8:24 pm
Contact:

Add new oil patch

Post by Pascali »

hi,

you can do it like this:
/c for y=0,2 do
for x=0,2 do
game.player.surface.create_entity({name="crude-oil", amount=5000, position={game.player.position.x+x*7-7, game.player.position.y+y*7-7}})
end
end

but you get more then 1 oil patch. How can i add one oilpatch? And what is the normal amount of oil? 5000?

AlienX
Fast Inserter
Fast Inserter
Posts: 103
Joined: Wed May 17, 2017 7:13 pm
Contact:

Re: Add new oil patch

Post by AlienX »

If you want to create a single oil patch under the players feet, do the following:

Code: Select all

/c game.player.surface.create_entity({name="crude-oil", amount=5000, position={game.player.position.x, game.player.position.y}})
This will disable achievements though, so keep that in mind.

As for "What is the normal amount of oil" - I am unsure if i'm honest, however you can check the amount that's inside a already existing oil patch by doing the following:

1. Mouse Over the oil patch you want to check
2. Run the following:

Code: Select all

/c game.print(game.player.selected.amount)
You can then work out what amount values are used normally.

I hope this helps.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Add new oil patch

Post by Optera »

The mod Mining Tools adds dynamite to generate oil patches as well as ore.
It won't lock you out of achievements and generated resources will stay after removing the mod.

Pascali
Fast Inserter
Fast Inserter
Posts: 170
Joined: Wed Aug 23, 2017 8:24 pm
Contact:

Re: Add new oil patch

Post by Pascali »

perfect, thank you!

Post Reply

Return to “Technical Help”