[Rseding91] [16.17] Bugfix: >100%productivity... is not fixed correctly

This subforum contains all the issues which we already resolved.
kapaer
Burner Inserter
Burner Inserter
Posts: 9
Joined: Wed Jun 07, 2017 10:53 am
Contact:

[Rseding91] [16.17] Bugfix: >100%productivity... is not fixed correctly

Post by kapaer »

One of 0.16.17 Bugfixes:
- Fixed that a furnace or assembling machine with > 100% productivity with a <= 1 tick crafting time recipe wouldn't work correctly. (56859)
is not fix correctly. Base production speed is restricted to 1 tick, but productivity bonus is not restricted.

For example:
a. Make "Iron gear wheel" with +50% productivity and 30 machine speed (=1 tick/production). 120 iron plates are consumed and last products are 60 base products + 30 bonus products per second. It's correctly.
b. 60 machine speed with above case, base production speed is restricted to 1 tick. 120 iron plates are consumed and last products are 60 base products + 60 bonus products. Productivity bonus is not restricted.

Now, productivity bonus per tick seems to be ((machineSpeed/craftingTime)/60)*productivityBonus, but Min((machineSpeed/craftingTime)/60), 1.0) * productivityBonus is right.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14328
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [16.17] Bugfix: >100%productivity... is not fixed correctly

Post by Rseding91 »

Could you give an example mod and steps to reproduce where it's not working? I'm having a hard time understanding what you're saying.
If you want to get ahold of me I'm almost always on Discord.
Engimage
Smart Inserter
Smart Inserter
Posts: 1069
Joined: Wed Jun 29, 2016 10:02 am
Contact:

Re: [16.17] Bugfix: >100%productivity... is not fixed correctly

Post by Engimage »

Rseding91 wrote:Could you give an example mod and steps to reproduce where it's not working? I'm having a hard time understanding what you're saying.
As I understand his words actual crafting speed is limited to 1 cycle per tick but productivity bonus result is calculated without that restriction as like production speed was not actually limited.
That means that if real recipe cycle time is 1 tick everything is fine. But if recipe time is 2/tick (120 cycles/sec) it is limited to 1/tick (60 cycles/sec) but productivity bonus is still calculated like machine is producing 120/sec so while real crafting speed is 60/sec 50% bonus grants another 60 items (120*50%) instead of real 30 (60*50%).
kapaer
Burner Inserter
Burner Inserter
Posts: 9
Joined: Wed Jun 07, 2017 10:53 am
Contact:

Re: [16.17] Bugfix: >100%productivity... is not fixed correctly

Post by kapaer »

productivity_problem.jpg
productivity_problem.jpg (344.5 KiB) Viewed 2438 times
test mod and save file:
productivity_problem.zip
(2.23 MiB) Downloaded 132 times
Last edited by kapaer on Tue Jan 23, 2018 9:24 am, edited 1 time in total.
Zaflis
Filter Inserter
Filter Inserter
Posts: 514
Joined: Sun Apr 24, 2016 12:51 am
Contact:

Re: [16.17] Bugfix: >100%productivity... is not fixed correctly

Post by Zaflis »

Does it sound like the bug is on machine crafting itself, not the productivity? Say you boost assembler so fast that math tells it should make 120 items per second (2 per tick). What actually happens? I haven't tested.

What i expect to happen is that the production bar (while UI's progress bar would always be limited to 100%) would internally allow exceeding it.

Code: Select all

onTick:
  while progress > 100.0 do {
    Craft()
    progress -= 100.0
  }
Rseding91
Factorio Staff
Factorio Staff
Posts: 14328
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [16.17] Bugfix: >100%productivity... is not fixed correctly

Post by Rseding91 »

Zaflis wrote:Does it sound like the bug is on machine crafting itself, not the productivity? Say you boost assembler so fast that math tells it should make 120 items per second (2 per tick). What actually happens? I haven't tested.

What i expect to happen is that the production bar (while UI's progress bar would always be limited to 100%) would internally allow exceeding it.

Code: Select all

onTick:
  while progress > 100.0 do {
    Craft()
    progress -= 100.0
  }
That's literally what it does now.
If you want to get ahold of me I'm almost always on Discord.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [16.17] Bugfix: >100%productivity... is not fixed correctly

Post by eradicator »

Rseding91 wrote:I'm having a hard time understanding what you're saying.
The OP is saying that when increasing the speed of an assembler while keeping the same productivity bonus you still gain additional products from the productivity bonus while consumption stays the same.

Prod +50%, Speed 30 -> Consumption 120, Products 60+30, Cost per unit 1.33
Prod +50%, Speed 60 -> Consumption 120, Products 60+60, Cost per unit 1.00

(That's how i understand the OP, i haven't tested any of this myself.)
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14328
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [16.17] Bugfix: >100%productivity... is not fixed correctly

Post by Rseding91 »

Ok, It should be fixed for the next version of 0.16.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”