Page 1 of 1

Items for mining, same support as fluids for mining

Posted: Wed Sep 05, 2018 7:10 am
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.

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

Posted: Wed Sep 05, 2018 8:15 am
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.

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

Posted: Wed Sep 05, 2018 10:36 am
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.

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

Posted: Wed Sep 05, 2018 10:38 am
by darkfrei
Another example is extracting pure-water with pumpjack, but only if it get some amount of coal.

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

Posted: Wed Sep 05, 2018 4:10 pm
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
    },

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

Posted: Thu Sep 06, 2018 8:27 am
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)

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

Posted: Thu Sep 06, 2018 10:26 am
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
    },

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

Posted: Fri Sep 07, 2018 7:51 am
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.