Is it possible to make a fluid recipe such that 100 of A -> 100 of A at 99% of the time and 100 of A -> 99 of A at 1 % of the time?
Alternatively, 100 of A -> 100 of B at 99% and 100 of A -> (99 of B and 1 of C) at 1% of the time?
Both of the above are not equivalent to (100 of A -> 99 of B and 1 of C) or (100 of A -> 99 of A), which are fixed ratios.
Probabilistic fluid recipe
Probabilistic fluid recipe
Maintainer and developer of Atomic Power. See here for more information.
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: Probabilistic fluid recipe
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
Re: Probabilistic fluid recipe
I'm aware of all of that. I've used that even before it was documented. What I am asking doesn't seem do able from all that I know.Helfima wrote:see here http://lua-api.factorio.com/latest/Conc ... ml#Product
If that is the case, what I want is not possible with the current probabilistic implementation as outputs are rolled independently.Arch666Angel wrote:I think you are looking for what was suggested here?
viewtopic.php?f=23&t=47597&p=276271#p276271
Maintainer and developer of Atomic Power. See here for more information.
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x
Re: Probabilistic fluid recipe
I have solved my own problem.
For the first case, 100 of A -> 100 of A at 99% of the time and 100 of A -> 99 of A at 1 % of the time, make the following recipe.
100 of A -> 99 of A + 1 of A at probability = 99%
For the second case, 100 of A -> 100 of B at 99% and 100 of A -> (99 of B and 1 of C) at 1% of the time, make the following recipe.
100 of A -> 99 of B + 1 of B at probability = 99% + 1 of C at probability = 1%
For the first case, 100 of A -> 100 of A at 99% of the time and 100 of A -> 99 of A at 1 % of the time, make the following recipe.
100 of A -> 99 of A + 1 of A at probability = 99%
Code: Select all
ingredients =
{
{type="fluid", name="A", amount=100},
},
results=
{
{type="fluid", name="A", amount=99},
{type="fluid", name="A", amount=1, probability=0.99},
},
100 of A -> 99 of B + 1 of B at probability = 99% + 1 of C at probability = 1%
Code: Select all
ingredients =
{
{type="fluid", name="A", amount=100},
},
results=
{
{type="fluid", name="B", amount=99},
{type="fluid", name="B", amount=1, probability=0.99},
{type="fluid", name="C", amount=1, probability=0.01},
},
Maintainer and developer of Atomic Power. See here for more information.
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x