[Oxyd] Productivity > Speed in one Step = Lost Bonus Items

This subforum contains all the issues which we already resolved.
UberWaffe
Fast Inserter
Fast Inserter
Posts: 203
Joined: Mon May 04, 2015 4:53 am
Contact:

[Oxyd] Productivity > Speed in one Step = Lost Bonus Items

Post by UberWaffe »

[Trivial / Fringe Case]
Only tested with Mining Drills in release version 0.12.0:

When you have a mining drill with a high +productivity rating, and a high speed rating, it cannot give you more extra items than there are 'steps' in producing a single item.

For example: Let's say that due to effective mining speed the mining progress bar jumps by 50% each step (when viewed in the GUI, not sure if this correlates to actual ticks). Even with +20000% productivity, it only ever generates a max of +2 ore per ore mined.
Or as far as I can tell. It only really falls apart with really high values, so this should not occur in the vanilla/unmodded game, nor in most non-extreme cases.

Still, the behavior I had expected was that the chest the mining drill feeds into would have ended up with 201 ore per ore mined, not 3.

Changing the module to have a -80% speed modifier definitely causes it to generate more bonus ore (since progress steps are smaller). Then generates around 25 ore per ore mined.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14275
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Productivity > Speed in one Step = Lost Bonus Items

Post by Rseding91 »

I want to make sure I understand the issue:

When the productivity bar jumps far beyond 100% the excess is disregarded and only 1 "bar"s worth of productivity is used to generate an item?

So in this scenario you'd expect 3 items but it only produces 1:

0% + 75% = 75%
75% + 75% = 150% = 1 item = reset to 0%
0% + 75% = 75%
If you want to get ahold of me I'm almost always on Discord.
UberWaffe
Fast Inserter
Fast Inserter
Posts: 203
Joined: Mon May 04, 2015 4:53 am
Contact:

Re: Productivity > Speed in one Step = Lost Bonus Items

Post by UberWaffe »

Yes, that appears to be what is happening.

More detail
It is hard to tell with a 100% certainty, but I've done the following to try and clarify your question:
  • Slowed the game to 0.1
  • Added modded productivity modules (each gives +80% productivity) to a mining drill 1 by 1.
  • I had the mining drill feed to the ground.
  • Used F (pickup item) to pick up the mining drill output 1 by 1, while watching progress (primary + productivity) on the GUI for the mining drill.
  • Repeated with another +80% productivity module added until far past 100% productivity.
What I observed was that it always seemed to go back to 0% productivity progress (as you stated), regardless of how much excess productivity progress there was.

With two modules, I expected the productivity progress to be:
0% + 160% = 1 item + 60%
What I saw:
0% + 160% = 1 item + 0%

With eight modules, I expected the productivity progress to be:
0% + 640% = 6 items (ejected 1 by 1) + 40%
What I saw:
0% + 640% = 1 item + 0%

EDIT: Note: I was using a modded mining drill with a high mining speed. Hence its mining progress bar (the primary one) took rather big jumps.
If the above process is repeated on something with a slower speed, then obviously the excess productivity is typically less (hence less of an excess % is discarded upon reset), but the same still occurs.
Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [0.12.0] Productivity > Speed in one Step = Lost Bonus Items

Post by Oxyd »

Can you share your mining drill and modules mod?
User avatar
oLaudix
Filter Inserter
Filter Inserter
Posts: 285
Joined: Sun Jun 14, 2015 3:24 pm
Contact:

Re: [0.12.0] Productivity > Speed in one Step = Lost Bonus Items

Post by oLaudix »

Time which takes assembler or drill to create item is in ticks not in seconds.
Example:
We want to make 7 gear wheels per second and we have this:
assembler speed: 3,5 (1,25AM3 + 3x50% + 30% modules)
item creation time: 0,5

Technically it takes 0,5/3,5 = 0,143s to create 1 item. That assembler can make 7 items per second so we need 1. But it is wrong.

1 second in factorio is actually 60 ticks wit each tick lasting 0,01(6) second. That means it'll take 0,143s/0,01(6)s = 8,5 ticks to complete an item. BUT it wont start making next item straight away. Itll wait for the end the 9th tick and start making another item in 10th. That means creating 1 item will take 9 ticks * 0,01(6)s = 0,15s not 0,143s. That will result In 1s/0,15s = 6,6(6) items per second.

So in reality we need 2 assemblers to make 7 items per second or change of modules in the first one.
Same principle applies to productivity. If it the production stops in the middle of tick, rest is lost.

It has almost no impact on vanilla game except some rare scenarios like the above one.

PS. You can't go beyond 60 items per seconds since you can only produce 1 item per tick even if it takes 0,00001% of a tick to create since like I mentioned earlier next item will start being created in next tick.
Image
Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [Oxyd] Productivity > Speed in one Step = Lost Bonus Items

Post by Oxyd »

Okay, I've changed it so that if the productivity bar goes above 100% in a tick, it'll retain the leftover for the start of the next tick.
UberWaffe
Fast Inserter
Fast Inserter
Posts: 203
Joined: Mon May 04, 2015 4:53 am
Contact:

Re: [Oxyd] Productivity > Speed in one Step = Lost Bonus Items

Post by UberWaffe »

Oxyd wrote:Can you share your mining drill and modules mod?
@Oxyd: Apologies, I had not noticed the request for the test mods on August 4th.
I see this is already addressed in 0.12.3. Do you still want me to upload the test modules?
Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [Oxyd] Productivity > Speed in one Step = Lost Bonus Items

Post by Oxyd »

UberWaffe wrote:
Oxyd wrote:Can you share your mining drill and modules mod?
@Oxyd: Apologies, I had not noticed the request for the test mods on August 4th.
I see this is already addressed in 0.12.3. Do you still want me to upload the test modules?
Rseding was kind enough to make me a mini-mod to test this with, so I worked with that. If the issue is fixed, there's no need for the mods now. :)
Post Reply

Return to “Resolved Problems and Bugs”