Page 1 of 1

Mining requires fluid depending on drill

Posted: Tue Nov 26, 2024 1:15 am
by mergele
Hello
I would like to make big mining drills consume steam as additional input for mining things as currently I find them a bit of a boring upgrade.
My current investigation has led me to believe that to not be possible to do, but since I am new to Factorio modding I thought I'd ask the experts in case I am overlooking something.

My reasoning is:
As far as I can see mining stuff is special and not a recipe, so I can't just make it an ingredient.
The required_fluid property for ores is associated fix with the ore and can not vary depending on the mining drill it is used in.
I could turn big electric mining drills energy_source to fluid, but then I would lose the electrical power draw and I can't have them require both.

If there is an approach I am overlooking I would be grateful to be pointed there (or for confirmation that my reasoning is correct).

Re: Mining requires fluid depending on drill

Posted: Tue Nov 26, 2024 11:49 pm
by DaveMcW
Not easily.

An advanced trick would be to daisy chain 3 entities, big mining drill -> assembling machine -> inserter. Then add the supporting control.lua code to set that up every time a mining drill is built.

Re: Mining requires fluid depending on drill

Posted: Wed Nov 27, 2024 1:34 am
by wizmut
Or maybe an assembler prototype that uses a custom recipe of 1 steam => nothing. Would need some way to catch when the recipe was done, and then find a random tile in range and spit out the appropriate ore. Or have a recipe for each ore.

Re: Mining requires fluid depending on drill

Posted: Wed Nov 27, 2024 9:27 am
by Natha
Place an assembler upon placing the drill. You can set LuaEntity:active based on LuaEntity:status of the assembler.
And then you can even set custom_status for the drill to indicate that there is no fluid

Re: Mining requires fluid depending on drill

Posted: Wed Nov 27, 2024 12:24 pm
by mergele
Oh combining an assembler and a drill sounds like a very good approach so far!
I assume I would have to check the status of the assembly machine every [duration of recipe] ticks? I don't think I saw any on_finished_crafting event or such.

Re: Mining requires fluid depending on drill

Posted: Wed Dec 04, 2024 1:03 pm
by Natha
mergele wrote: Wed Nov 27, 2024 12:24 pm Oh combining an assembler and a drill sounds like a very good approach so far!
I assume I would have to check the status of the assembly machine every [duration of recipe] ticks? I don't think I saw any on_finished_crafting event or such.
Yes but that shoudnt be a big deal regarding performance