Page 1 of 1

Modifying "mining recipes"

Posted: Mon Oct 28, 2019 1:33 pm
by Rems19
Hi there,

I'm starting to look into modding and to begin with I wanted to implement what I thought would be simple enough: a clean mining drill that takes water in addition to power and pollutes less than the basic electric mining drill.
The issue I have is that I can't find where in the API are defined the "recipes" of mining drills. Are they not configurable? Actually it seems that the fluid requirement for mining a resource is defined by the resource itself.
Example for the uranium:

Code: Select all

{
    type = "resource",
    name = "uranium-ore",
    ...
    minable =
    {
      mining_particle = "stone-particle",
      mining_time = 2,
      result = (not data.is_demo) and "uranium-ore" or nil,
      fluid_amount = 10,
      required_fluid = "sulfuric-acid"
    },
    ...
}


Is there a way to define special recipes that require water for a custom mining drill?

Thanks in advance

Re: Modifying "mining recipes"

Posted: Mon Oct 28, 2019 5:40 pm
by DaveMcW
It does not seem possible to have multiple required_fluids for a resource.

A hack could be to duplicate all ores during map generation and add a hidden modded ore with a different fluid. Then periodically synchronize the ore amounts so they deplete at the same rate. This is not a beginner-level trick.

You could also ask for it in Modding Interface Requests forum.

Re: Modifying "mining recipes"

Posted: Tue Oct 29, 2019 12:08 pm
by Rems19
DaveMcW wrote: Mon Oct 28, 2019 5:40 pm It does not seem possible to have multiple required_fluids for a resource.
Ideally, I'd like to avoid modifying the resource since it has more to do with the miner itself.
DaveMcW wrote: Mon Oct 28, 2019 5:40 pm A hack could be to duplicate all ores during map generation and add a hidden modded ore with a different fluid. Then periodically synchronize the ore amounts so they deplete at the same rate. This is not a beginner-level trick.
That seems kind of advanced indeed. I'm not quite ready for that yet.
DaveMcW wrote: Mon Oct 28, 2019 5:40 pm You could also ask for it in Modding Interface Requests forum.
I'll try to identify what would work best and see what's missing so I can make a proper request. At this time, I think a recipe-like system for mining would be an ideal solution so you could add multiple ways of mining ores, and even modify the result.

Thanks for your help!

Re: Modifying "mining recipes"

Posted: Wed Oct 30, 2019 1:51 pm
by Rems19
Well... Sounds like it's never gonna happen (see viewtopic.php?f=221&t=77368).