
Running commands in factorio
-
- Burner Inserter
- Posts: 14
- Joined: Sun May 15, 2016 7:47 pm
- Contact:
Running commands in factorio
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 

-
- Burner Inserter
- Posts: 14
- Joined: Sun May 15, 2016 7:47 pm
- Contact:
Re: Running commands in factorio
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
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
Re: Running commands in factorio
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}.
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!
-
- Burner Inserter
- Posts: 14
- Joined: Sun May 15, 2016 7:47 pm
- Contact:
Re: Running commands in factorio
thanks a lotprg 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}.
