Custom mining drill behavior?

Place to get help with not working mods / modding interface.
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 583
Joined: Tue May 19, 2015 1:56 am
Contact:

Custom mining drill behavior?

Post 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?
Image
lettherebelight
Burner Inserter
Burner Inserter
Posts: 11
Joined: Wed Nov 02, 2016 2:57 pm
Contact:

Re: Custom mining drill behavior?

Post 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.
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 583
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Custom mining drill behavior?

Post 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.
Image
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5266
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Custom mining drill behavior?

Post 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'
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 583
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Custom mining drill behavior?

Post 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?
Image
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5266
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Custom mining drill behavior?

Post 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
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 716
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: Custom mining drill behavior?

Post 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.
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 583
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Custom mining drill behavior?

Post 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?
Image
Post Reply

Return to “Modding help”