Page 1 of 1

How to spawn stone?

Posted: Sun Apr 17, 2016 7:40 pm
by RektSalad69
I'm pretty far in a save and there was almost no stone, now I've already mined all of it, can I spawn in some via console?

Re: How to spawn stone?

Posted: Sun Apr 17, 2016 7:57 pm
by daniel34
You can do it the easy way:

Code: Select all

/c game.local_player.insert{name="stone", count=500}
will give you 500 stone.

The hard way:

Code: Select all

/c game.local_player.surface.create_entity{name="stone", position = game.local_player.position}
/c game.local_player.selected.amount = 1000
The first line will create a stone patch with 50 stone wherever the player stands, the second one will change the amount of ore in that patch to 1000. (Enter the second one while you're highlighting the ore patch with your mouse.)

Re: How to spawn stone?

Posted: Mon Apr 18, 2016 10:58 am
by RektSalad69
daniel34 wrote:You can do it the easy way:

Code: Select all

/c game.local_player.insert{name="stone", count=500}
will give you 500 stone.

The hard way:

Code: Select all

/c game.local_player.surface.create_entity{name="stone", position = game.local_player.position}
/c game.local_player.selected.amount = 1000
The first line will create a stone patch with 50 stone wherever the player stands, the second one will change the amount of ore in that patch to 1000. (Enter the second one while you're highlighting the ore patch with your mouse.)
Thanks a lot, worked like a charm.