Recipe Unrandomizer
Posted: Sun Sep 10, 2023 9:54 pm
It sounds a little weird giving this name to the topic, even more so considering there’s a mod that does the exact opposite, yet unpredictability makes it impossible to create precise production lines. I personally don’t like it when things go randomly out of control, input-starving or overflowing the lines. I hope there are people that agree with me enough to address this issue.
My proposal is that chance based recipes work like machines with productivity modules, with chances of each item being produced turned into separate production progress, then added up in each subsequent production cycle, producing the chance based item if it’s progress exceeds 100% and adding the remaining excess progress into the next cycle.
Example: Item A to Item B with 60% chance produces nothing in the first cycle. Second cycle produces item B (60+60=120) and adds the excess chance (120-100=20) to the next cycle. Third cycle will not produce the item (20+60=80). And fourth cycle produces item B again (80+60=140) then adds the excess (140-100=40) onto the next cycle and so on.
Some items feature multiple chance operations like 25% chance each for producing 1, 2, 3, or 4 items in one cycle. This would be averaged to 2,5 items per cycle.
I thought of this idea after playing Sea Block mod pack where lots of recipes were chance based. This would not be much useful for vanilla as there's only one such recipe. I was hoping that the modding API allows for an algorithm that converts all recipes, including modded ones.
My proposal is that chance based recipes work like machines with productivity modules, with chances of each item being produced turned into separate production progress, then added up in each subsequent production cycle, producing the chance based item if it’s progress exceeds 100% and adding the remaining excess progress into the next cycle.
Example: Item A to Item B with 60% chance produces nothing in the first cycle. Second cycle produces item B (60+60=120) and adds the excess chance (120-100=20) to the next cycle. Third cycle will not produce the item (20+60=80). And fourth cycle produces item B again (80+60=140) then adds the excess (140-100=40) onto the next cycle and so on.
Some items feature multiple chance operations like 25% chance each for producing 1, 2, 3, or 4 items in one cycle. This would be averaged to 2,5 items per cycle.
I thought of this idea after playing Sea Block mod pack where lots of recipes were chance based. This would not be much useful for vanilla as there's only one such recipe. I was hoping that the modding API allows for an algorithm that converts all recipes, including modded ones.