Page 1 of 1

[0.18.17] Beacons with low distribution effectivity show rounding errors

Posted: Tue Mar 31, 2020 2:30 pm
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

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

Posted: Sat Apr 11, 2020 10:07 pm
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.