Page 1 of 1

Custom mining drill behavior?

Posted: Sun Nov 20, 2016 10:27 pm
by Reika
I am hoping to implement "Dirty Mining Drills", i.e. drills that (in-universe) dig deeper and less cleanly to yield a greater total yield of resources, i.e. pulling up more ore but also rock, mud, and so on. This 'dirty ore' would need to be pre-processed into the vanilla/default ore items (washing, removing stone, etc).

This led me to what appears to be a roadblock: Is it possible to do this with a drill? I would need A) the ability to specify a custom output item (as a function of ore, or the ore's normal drop items) and B) a way of increasing yields (preferably by a built-in productivity bonus, but also possibly by something like a "consume ore entity only one in N times" behavior).

Do such controls exist for a drill?

Re: Custom mining drill behavior?

Posted: Mon Nov 21, 2016 5:58 am
by lettherebelight
A mod like this already exists, see https://mods.factorio.com/mods/SeelenJa ... T-DirtyOre. Looks like it was implemented in the ore, not the drill.

Re: Custom mining drill behavior?

Posted: Mon Nov 21, 2016 8:36 am
by Reika
lettherebelight wrote:A mod like this already exists, see https://mods.factorio.com/mods/SeelenJa ... T-DirtyOre. Looks like it was implemented in the ore, not the drill.
I want this to be a late-mid game tech, and want it to work on pre-existing worlds. Both of those mean doing it on the ores will not work. That mod also does not work anything near like what I want to achieve.

Re: Custom mining drill behavior?

Posted: Mon Nov 21, 2016 12:20 pm
by Klonan
Reika wrote:
lettherebelight wrote:A mod like this already exists, see https://mods.factorio.com/mods/SeelenJa ... T-DirtyOre. Looks like it was implemented in the ore, not the drill.
I want this to be a late-mid game tech, and want it to work on pre-existing worlds. Both of those mean doing it on the ores will not work. That mod also does not work anything near like what I want to achieve.
You can set a script so that when your special mining drill is placed over ore, it will spawn in some new ore of yours that is 'dirty'

Re: Custom mining drill behavior?

Posted: Mon Nov 21, 2016 6:59 pm
by Reika
Klonan wrote:
Reika wrote:
lettherebelight wrote:A mod like this already exists, see https://mods.factorio.com/mods/SeelenJa ... T-DirtyOre. Looks like it was implemented in the ore, not the drill.
I want this to be a late-mid game tech, and want it to work on pre-existing worlds. Both of those mean doing it on the ores will not work. That mod also does not work anything near like what I want to achieve.
You can set a script so that when your special mining drill is placed over ore, it will spawn in some new ore of yours that is 'dirty'
Clever. Can I make it revert if the drill is removed/destroyed/etc? Also, unless I reduce both vanilla and my drills mining radius to 3x3 (which I do not want to do), how can I prevent a normal drill placed alongside from also yielding dirty ore?

Re: Custom mining drill behavior?

Posted: Mon Nov 21, 2016 7:08 pm
by Klonan
Reika wrote:
Klonan wrote:
Reika wrote:
lettherebelight wrote:A mod like this already exists, see https://mods.factorio.com/mods/SeelenJa ... T-DirtyOre. Looks like it was implemented in the ore, not the drill.
I want this to be a late-mid game tech, and want it to work on pre-existing worlds. Both of those mean doing it on the ores will not work. That mod also does not work anything near like what I want to achieve.
You can set a script so that when your special mining drill is placed over ore, it will spawn in some new ore of yours that is 'dirty'
Clever. Can I make it revert if the drill is removed/destroyed/etc? Also, unless I reduce both vanilla and my drills mining radius to 3x3 (which I do not want to do), how can I prevent a normal drill placed alongside from also yielding dirty ore?
You could just spawn the special ore in the center of the custom drill, such that even adjacent miners can't reach the ore.

For removal, you can check when a drill is mined, and remove any of your custom ore from underneath it

Re: Custom mining drill behavior?

Posted: Mon Nov 21, 2016 8:45 pm
by Earendel
If you swap out the resource it would still get picked up by large area mining drills.

You could place a dummy chest inside the custom mining drill and adjust the drill's output location to feed into the dummy chest, then if anything gets put into the chest you could convert it to the dirty ore and move it to what would normally be the output location.

Re: Custom mining drill behavior?

Posted: Mon Nov 21, 2016 8:54 pm
by Reika
Earendel wrote:If you swap out the resource it would still get picked up by large area mining drills.

You could place a dummy chest inside the custom mining drill and adjust the drill's output location to feed into the dummy chest, then if anything gets put into the chest you could convert it to the dirty ore and move it to what would normally be the output location.
That sounds like it might work. How would I go about doing that?