Multiple results from one ore?

Place to get help with not working mods / modding interface.
Duane
Burner Inserter
Burner Inserter
Posts: 19
Joined: Fri Jul 17, 2015 3:56 pm
Contact:

Multiple results from one ore?

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

Re: Multiple results from one ore?

Post 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
Post Reply

Return to “Modding help”