Code: Select all
results = {
{type = "item", name = "steel-rod", amount_min = 0, amount_max = 12},
{type = "item", name = "copper-cable", amount_min = 0, amount_max = 7},
}
What you actually see in the recipe tooltip is this:
I think one of two things is happening: either amount_min = 0 is not being taken into account when calculating the average result and it's reporting the average of 1-12 instead, or there is an undocumented lower limit of 1 for amount_min which is being silently set instead. If it's the latter, it's inconsistent with plain ol' amount, which can be set to 0 just fine.
You can work around this to some extent by applying a probability as well - for example if you want a real spread of 0-12, you can specify amount_min = 1, amount_max = 12 and probability = (amount_max/amount_max+1), in this case 12/13ths. You then get the correct expected results in the tooltip. The drawbacks of that are (a) it's a pain, (b) you get very confusing descriptions from other mods (like FNEI) that report on results, and (c) it doesn't work well for more complex recipes where some of the ingredients have a low amount and are expensive to make.