Page 1 of 1
Forcing placement of mining drill
Posted: Fri Oct 16, 2015 10:54 am
by imajor
I want to place a mining drill to an area where there are no resources.Why? I want to create a blueprint for a generic mining outpost. Is there any other way than finding a huge deposit, and creating the blueprint there? It would be great if at least I could place ghost mining drills. Thanks.
Re: Forcing placement of mining drill
Posted: Fri Oct 16, 2015 1:36 pm
by lobster2b
Shift click to place ghosts.
copy as bluprint
profit
...
(I do apologise if you have tried this and found it not working, its just a theory of mine, works with normal buildings)
Re: Forcing placement of mining drill
Posted: Fri Oct 16, 2015 1:41 pm
by imajor
Thanks. Indeed I tried this, but Factorio won't allow me placing the ghost of the drill if there are no ores.
Re: Forcing placement of mining drill
Posted: Fri Oct 16, 2015 3:03 pm
by prg
You can still use create_entity to create entities in invalid locations, so place a chest or something where you want the mining drill to be, then point the cursor at it and run something like
Code: Select all
local p = game.local_player
local s = p.selected
local pos = s.position
p.insert{name=s.name, count=1}
s.destroy()
p.surface.create_entity{name="basic-mining-drill", position=pos, force=p.force}
to turn it into a mining drill.
Re: Forcing placement of mining drill
Posted: Tue Nov 03, 2015 9:05 am
by imajor
Thanks a lot. That sounds like a good solution. How can I run these multi line scripts? At the console I can only run a single command. What was even better: is there a way to assign a hotkey to a script like this?
Re: Forcing placement of mining drill
Posted: Tue Nov 03, 2015 9:12 am
by prg
imajor wrote:Thanks a lot. That sounds like a good solution. How can I run these multi line scripts? At the console I can only run a single command. What was even better: is there a way to assign a hotkey to a script like this?
You can paste multiple lines into the console, those will be concatenated into a single line. Don't think assigning a hotkey is possible (yet?)
Re: Forcing placement of mining drill
Posted: Tue Nov 03, 2015 2:12 pm
by Rockstar04
I used the map editor to create a large patch of resources, and then made my mining outpost. Using the bluepring string mod I could "Import" that outpost into my main save.
Thats a very roundabout way of getting at it, but it worked out pretty well.
Re: Forcing placement of mining drill
Posted: Tue Nov 03, 2015 2:29 pm
by imajor
Thanks. That is a good idea, I didn't think of the map editor. Too bad I already created a huge mining drill field by executing that script for all the instances. Took a while.