Running commands in factorio

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
exstreamrider
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sun May 15, 2016 7:47 pm
Contact:

Running commands in factorio

Post by exstreamrider »

in factorio there has always been something that caused me to have issues. Commands.... i really want to play around with them but they aren't horribly accessible such as converting a save to a map where you can add stuff to the map so perhaps a bit of help with that i really would gladly appreciate any suggestions on how to work with commands :?

exstreamrider
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sun May 15, 2016 7:47 pm
Contact:

Re: Running commands in factorio

Post by exstreamrider »

to be more specific i wish to spawn in some oil in my world due to the lack of it anywhere
EDIT- i found this code but an error occurs in the code when using it since the update
/c local surface = game.local_player.surface;
for y=-5, 5 do
for x=-5, 5 do
surface.create_entity({name="Oil", amount=15000, position={game.local_player.position.x+x, game.local_player.position.y+y}})
end
end

User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Running commands in factorio

Post by prg »

It's now just "player" instead of "local_player" and the entity has always been called "crude-oil" instead of "Oil".

Also you might want to increase the spacing between the patches a bit, like position={game.player.position.x+3*x, game.player.position.y+3*y}.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!

exstreamrider
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sun May 15, 2016 7:47 pm
Contact:

Re: Running commands in factorio

Post by exstreamrider »

prg wrote:It's now just "player" instead of "local_player" and the entity has always been called "crude-oil" instead of "Oil".

Also you might want to increase the spacing between the patches a bit, like position={game.player.position.x+3*x, game.player.position.y+3*y}.
thanks a lot :D

Post Reply

Return to “Gameplay Help”