e.g.

Code: Select all

```
results={ {type="item",name="iron-ore",amount=1,probability=0.1} }
```

But if i do

Code: Select all

```
results={ {type="item",name="iron-ore",amount=2,probability=0.1} }
```

And you can immediately see the problem.

I'm guessing factorio is trying to auto balance the probability recipes, such that a recipe with amount of 2 and probability of 0.1 should actually be 5% chance to produce two, which maintains the "true" probability factor.

If that was the intention, then this doesn't appear to be working correctly.

After 10 crafts, scenario 1 will produce 1 iron ore.

After 10 crafts, scenario 2 will produce 4 iron ore, even though the amount is only x2.

By applying the probability to each individual "amount" as factorio currently is, you are introducing a random/stray exponent into the equation.

... Why?

Continuing the chain it looks like this:

amount:3, probability: 0.1 = 30% chance to produce 3. After 10 crafts this will produce 9 items.

amount:4, probability: 0.1 = 40% chance to produce 4. After 10 crafts this will produce 16 items.

amount:5, probability: 0.1 = 50% chance to produce 5. After 10 crafts this will produce 25 items.

amount:6, probability: 0.1 = 60% chance to produce 6. After 10 crafts this will produce 36 items.

amount:7, probability: 0.1 = 70% chance to produce 7. After 10 crafts this will produce 49 items.

...

amount:10, probability:0.1 = A standard recipe that produces 10 items?

So amount_factor_after_10_crafts_with_0.1_probability=amount^2.

This gets a lot worse with higher probability factors.

* After further looking into this, this may just be a visual "bug" only because the overlay can't show the actual amounts relative to its probability.

Here's a screenshot of amount:10, probability: 0.1

With the right math, i could make it say you'll get 1000 of an item... but you'll never actually get it because the probability would be set to something like 0.1e-10000

But if it succeeded, you would not get the displayed 1000, you'd actually get something to the order of 1e100000000

No matter how you look at it, the behavior here seems very inconsistent.