Modifying "mining recipes"

Place to get help with not working mods / modding interface.
Rems19
Burner Inserter
Burner Inserter
Posts: 5
Joined: Mon Oct 28, 2019 1:25 pm
Contact:

Modifying "mining recipes"

Post 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
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3730
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Modifying "mining recipes"

Post 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.
Rems19
Burner Inserter
Burner Inserter
Posts: 5
Joined: Mon Oct 28, 2019 1:25 pm
Contact:

Re: Modifying "mining recipes"

Post 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!
Rems19
Burner Inserter
Burner Inserter
Posts: 5
Joined: Mon Oct 28, 2019 1:25 pm
Contact:

Re: Modifying "mining recipes"

Post by Rems19 »

Well... Sounds like it's never gonna happen (see viewtopic.php?f=221&t=77368).
Post Reply

Return to “Modding help”