Forcing placement of mining drill

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
imajor
Fast Inserter
Fast Inserter
Posts: 164
Joined: Thu Aug 14, 2014 11:02 am
Contact:

Forcing placement of mining drill

Post 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.
lobster2b
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed Oct 14, 2015 8:59 am
Contact:

Re: Forcing placement of mining drill

Post 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)
imajor
Fast Inserter
Fast Inserter
Posts: 164
Joined: Thu Aug 14, 2014 11:02 am
Contact:

Re: Forcing placement of mining drill

Post by imajor »

Thanks. Indeed I tried this, but Factorio won't allow me placing the ghost of the drill if there are no ores.
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Forcing placement of mining drill

Post 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.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
imajor
Fast Inserter
Fast Inserter
Posts: 164
Joined: Thu Aug 14, 2014 11:02 am
Contact:

Re: Forcing placement of mining drill

Post 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?
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Forcing placement of mining drill

Post 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?)
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
Rockstar04
Fast Inserter
Fast Inserter
Posts: 171
Joined: Sun Feb 17, 2013 4:31 pm
Contact:

Re: Forcing placement of mining drill

Post 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.
imajor
Fast Inserter
Fast Inserter
Posts: 164
Joined: Thu Aug 14, 2014 11:02 am
Contact:

Re: Forcing placement of mining drill

Post 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.
Post Reply

Return to “Gameplay Help”