Problems with probabilities in recipes
Posted: Sun Jul 09, 2017 10:19 am
So the coding is the same as the uranium processing, e.g.:
the problem is that this doesn't work right. Sometimes I'm getting nothing sometimes hydrogen and oxygen out of one hydropyrochlore. I think what happens is that I get by certain chance the results of the recipe. That means i could get by a slim chance all three items out of one ore. That's not what I want though. I want a certain chance for the ore to be smelted into one of the listed items and not sometimes none, sometimes two at a time, etc.
Can anyone please help me with this?
Code: Select all
results =
{
{
name = "niobium-plate",
probability = 0.069,
amount = 1
},
{
type = "fluid",
name = "hydrogen",
probability = 0.414,
amount = 1
},
{
type = "fluid",
name = "oxygen",
probability = 0.517,
amount = 1
}
}
Can anyone please help me with this?