[0.18.17] Beacons with low distribution effectivity show rounding errors

Bugs that are actually features.
Post Reply
altlenny
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Oct 26, 2019 12:42 pm
Contact:

[0.18.17] Beacons with low distribution effectivity show rounding errors

Post by altlenny »

  1. What did you do?
    I changed the beacons to use four times the modules while reducing their distribution effectivity by a factor of four.

    Code: Select all

    data.raw.beacon["beacon"].module_specification.module_slots = 8
    data.raw.beacon["beacon"].distribution_effectivity = 1./16.
  2. What happened?
    The beacon tooltip looks fine:
    Image

    But the nearby assembler only receives a speed bonus of 1.24 and an increased energy consumption by 38%!
    Image

    What most likely happens is that somewhere something gets rounded too early...
  3. What did you expect to happen instead? It might be obvious to you, but do it anyway!
    I at least expect both tooltips to show me the same information. I would expect the assembler to have a crafting speed of 1.25 and a consumption factor of 1.4.
Keep healthy, and most importantly, keep up the good work on this amazing game!

Best regards,
altlenny

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.18.17] Beacons with low distribution effectivity show rounding errors

Post by Rseding91 »

Modules and module effects do not support full floating point precision and only support resolutions of 1/100 (2 places after the decimal). So 1/16 converts to 0.0625 which gets rounded down to 0.06.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Not a bug”