Recipe Unrandomizer

This is the place to request new mods or give ideas about what could be done.
Post Reply
Akillibirisi
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Jan 07, 2021 11:23 pm
Contact:

Recipe Unrandomizer

Post by Akillibirisi »

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.

DarkShadow44
Filter Inserter
Filter Inserter
Posts: 275
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

Re: Recipe Unrandomizer

Post by DarkShadow44 »

I mean, I'm not an expert but I don't think the engine allows for that. If possible, it would probably come with a massive UPS hit since you'd need to handle each machine individually.

Akillibirisi
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Jan 07, 2021 11:23 pm
Contact:

Re: Recipe Unrandomizer

Post by Akillibirisi »

Mod would check and override all chance based recipes during startup then keep track of one or several recipe progresses, just as if a productivity module is attached. There may be a more friendly API to implement this behavior, I can't tell since it's beyond my knowledge. Though there's a vanilla feature already that works similarly so I don't really think it would be that resource intensive if implemented properly.

Post Reply

Return to “Ideas and Requests For Mods”