Items for mining, same support as fluids for mining

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Items for mining, same support as fluids for mining

Post by darkfrei »

Hi!

It it possible to add new type of mining tool for hard ores? By uranium ore we are need sulfur acid as chemical mining tool.

Can we have also another mining tools, for example items? Some ores can be also hard enough and you are need to change the drills every 50 mining results.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Items for mining, same support as fluids for mining

Post by bobingabout »

Mining power vs ore hardness determines if a machine can mine that ore or not. the value on pickaxes determines the mining power they provide, there's a formula on the wiki.
So one way to mine harder materials is to give the tool/machine a higher power value.

Though if you look at ores vs oil, there is also such a thing as category, you could shift uranium to another category and give it it's own new drill.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Items for mining, same support as fluids for mining

Post by darkfrei »

bobingabout wrote:Though if you look at ores vs oil, there is also such a thing as category, you could shift uranium to another category and give it it's own new drill.
I want to extract uranium not with sulfur-acid, but with barrelled-sulfur-acid, so the mining drill must accept not only fluids, but items too.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Items for mining, same support as fluids for mining

Post by darkfrei »

Another example is extracting pure-water with pumpjack, but only if it get some amount of coal.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Items for mining, same support as fluids for mining

Post by eradicator »

@Bob: OP is only using "hardness" as an in-lore explanation, unrelated to the actual hardness value that the engine knows.
Being able to have non-fluid (=item) requirements for mining sounds like a nice idea that otherwise has to be "emulated" with weird hidden assembling-machine trickery. Even better if the mechanism supported item durability so one can use "0.1 drill head per ore" (though that could be balanced in processing recipes later too).

Code: Select all

    minable =
    {
      hardness = 10,
      mining_particle = "stone-particle",
      mining_time = 4,
      result = "unobtanium-ore",
      --fluid_amount = 10,
      --required_fluid = "sulfuric-acid"
      item_amount = 1, --new
      required_item = "diamond-drill-head" --new
    },
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Items for mining, same support as fluids for mining

Post by bobingabout »

Sorry, I misunderstood.
I just took a quick look at the source, the current implementation for consuming fluids seems simple enough (Though I haven't traced it through), so adding an option for items shouldn't be too difficult.
The hard part would be convincing someone to do it. (and if someone with source access does it, you still need to convince a dev to pull it)
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Items for mining, same support as fluids for mining

Post by darkfrei »

And item amount can be lower than 1: for 10 ores we are need only one drill-head.

Code: Select all

    minable =
    {
      hardness = 10,
      mining_particle = "stone-particle",
      mining_time = 4,
      result = "hard-ore",
      item_amount = 0.1, --new
      required_item = "drill-head" --new
    },
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Items for mining, same support as fluids for mining

Post by bobingabout »

darkfrei wrote:And item amount can be lower than 1: for 10 ores we are need only one drill-head.

Code: Select all

    minable =
    {
      hardness = 10,
      mining_particle = "stone-particle",
      mining_time = 4,
      result = "hard-ore",
      item_amount = 0.1, --new
      required_item = "drill-head" --new
    },
you can't do it that way with an item, you'd need to use something like a tool (It's an item with special logic) that has durability to have a fraction of an item.
you could also do it the other way around, add amount_mining_cycles_per_item.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Post Reply

Return to “Modding interface requests”