I made a recipe with the following peice of code.
Code: Select all
{
type = "recipe",
name = "sort-gem-ore",
energy_required = 1,
ingredients =
{
{"gem-ore", 2},
},
results =
{
{type="item", name="ruby-3", amount=1, probability = 1},
{type="item", name="sapphire-3", amount=1, probability = 0.8},
{type="item", name="emerald-3", amount=1, probability = 0.6},
{type="item", name="topaz-3", amount=1, probability = 0.4},
{type="item", name="diamond-3", amount=1, probability = 0.2},
},
subgroup = "bob-ores",
icon = "__bobplates__/graphics/icons/ore/gem-ore.png",
order = "f-a[gem-ore]",
},
However, when made by hand causes the game to lock up, and start taking imense ammounts of CPU power and RAM (in excess of 4GB) to the point where my computer pretty much stopped responding, causing me to need to press the reset button. When the crafting recipe completes its cycle and would give you the results, you hear a chime like it's trying to send you a message as the game locks up. I can't see the message, the lockup freezes the game's image.
Further analysis shows that the issue is with the probability tag, when set below 1. (not tried above 1, why would you set a probability above 100%?)
The ammount of result items has no effect, with a probability tag or not, if any of them have a probability below 1, you get the issue.
note: this does not happen with mining, I have ores with probabilities to drop while mining and this works fine, the issue apears to be exclusive to crafting by hand.