Page 1 of 1

Multiple results from one ore?

Posted: Sat Jul 16, 2016 9:22 pm
by Duane
How are ores that give multiple ores/rocks on one mining action supposed to be defined properly?

Currently, I have the following:

Code: Select all

{
          name = "rich-iron-ore",
          amount_min = 2,
          amount_max = 3,
          probability = 1,
        },
		        {
          name = "iron-gravel",
          amount_min = 3,
          amount_max = 5,
          probability = 0.3,
        },
		        {
          name = "raw-silica",
          amount_min = 1,
          amount_max = 3,
          probability = 0.2,
        },
I've also used

Code: Select all

		        {
          name = "rich-iron-ore",
          amount_min = 2,
          amount_max = 3,
          probability = .5,
        },
		        {
          name = "iron-gravel",
          amount_min = 3,
          amount_max = 5,
          probability = 0.3,
        },
		        {
          name = "raw-silica",
          amount_min = 1,
          amount_max = 3,
          probability = 0.2,
        },
The first code snippet simply never gives the alternate results. It always, 100% gives Rich Iron and 100% always gives 2 of it.

The second code snippet has a chance to give nothing - a redundancy I couldn't change even with 3 90% chances (which would still randomly give 'nothing'.)

For what it's worth, I've tried cutting apart mods and the only mod I found that does something like this is older Dytech. Unfortunately that guy's code is psychopathic and I can't read it, it's just defined/generated in a way I can't comprehend. Wonder where he is.

Re: Multiple results from one ore?

Posted: Sun Jul 17, 2016 5:51 am
by DaveMcW
There is a hidden property, storage_slots. If the mining drill's storage gets too full it will not produce all the resources.

Code: Select all

data.raw["mining-drill"]["electric-mining-drill"].storage_slots = 11