[2.0.23] Productivity Bonus is slightly wrong under certain conditions

Things that has been reported already before.
Calecute
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Nov 24, 2017 9:15 pm
Contact:

[2.0.23] Productivity Bonus is slightly wrong under certain conditions

Post by Calecute »

Expected Behaviour
When crafting with an assembler with 4 productivity 1 modules (+16%) I expect it to be able to produce 4 bonus items each 25 normal crafts. (25*0.16=4) for a total of 29 items.
Bug
When crafting recipes with crafting time >=15s it will instead produce 3 bonus items after 25 normal crafts and end with 99% bonus production.

When crafting recipes with crafting time 10s or 6s it will produce 4 bonus items after 25 normal crafts, but it will produce 2*4-1 items after 2*25 crafts and end with 99% bonus production.

When crafting recipes with crafting time 5s it will produce 4 or 2*4 bonus items after 25 or 2*25 normal crafts, but it will produce 3*4-1 items after 3*25 crafts and end with 99% bonus production

When crafting recipes with crafting time 0.5s it will produce 4*n bonus itens after 25*n normal crafts for n<23, but it will produce 23*4-1 items after 23*25 crafts and end with 99% bonus production.
Notes on my testing
I tested only 16% productivity bonus, and only assemblers, but it could affect other buildings and other productivity values. I also only tested recipes that didn't involve spoilage and had at least one solid ingredient for convenience, but it could also affect other recipes. I tested with beacon speed bonuses, and it doesn't seem to affect the result, so it's probably base crafting time that matters, not actual crafting time.
Why the bug bugs me
This seems minor in normal conditions, think it's only delaying the bonus item by 1 tick. But I was cooking a circuit for an assembler doing multiple recipes, with controllers so inserters only inserted needed items, not to deal with outputting what's left of the input buffer, and it really threw a wrench on it. The fact that it doesn't even break the same way for all recipes makes it worse.
Description and instructions for the demonstration in the save
Save has a small test and a large test.

Small test is three pairs of assemblers with four productivity 1 modules each, one producing gears, one producing red circuits and one producing LDS. They are each fed by an inserter from a chest. Check chest contents, in half it should be enough to make 25, other half enough to make 50, so with productivity bonus 29 and 58. Conect to electricity and let it run. You'll see gear correctly produces 29 and 58, Red circuit produces 29 and 57, and LDS produces 28 and 57. In the ones that are short production bonus is 99% on the assemblers.

Large test is lots of rows of assemblers with four productivity modules 1 each. Each row has all assembler intermediary item recipes that accept productivity modules, have at least one solid ingredient, and doesn't have ingredients or outputs that spoil, ordered by crafting time. Each assembler takes from a infinity chest. A circuit makes inserters only insert enough items for multiples of 25 recipes. Another circuit checks if the output is multiple of 29 and outputs a check if it is, and a X if its not to a display.

Each rows is set up to insert ingredients for 25*n, from bottom to top row n is 1;1;2;3;4;5;22;23. So first row all assemblers get enough ingredients for 25 crafts, second too, third enough for 50, etc.

Bottom row has speed beacons so each assembler has +1230% craft speed.

Check the circuits until satisfied, and then hook it up to electricity and let it run (maybe speed it up), and see that when they stop in some cases the output is one short, and when that's the case machines are at 99% production bonus.

Should be ~easy to set up the large test for different productivity bonus and different buildings to test some more.
Attachments
Productivity bug demo.zip
Save showing the bug
(3.36 MiB) Downloaded 10 times
factorio-current.log
Log
(9.21 KiB) Downloaded 9 times
Calecute
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Nov 24, 2017 9:15 pm
Contact:

Re: [2.0.23] Productivity Bonus is slightly wrong under certain conditions

Post by Calecute »

Sorry, my search failed. Hope they reconsider the issue now that assemblers can be circuit controlled, so it's not only a problem for smart smelting set ups. Also hopefully my test is useful for people trying to work around it.
Post Reply

Return to “Duplicates”