[Klonan] [2.0.76] Text box for logistics group multiplier populated using rounded value

This subforum contains all the issues which we already resolved.
macdjord
Fast Inserter
Fast Inserter
Posts: 154
Joined: Fri Feb 22, 2013 4:26 am
Contact:

[Klonan] [2.0.76] Text box for logistics group multiplier populated using rounded value

Post by macdjord »

  1. Create a named logistics group
  2. Create a constant combinator and add that named group, but give it a multiplier with at least 2 decimal places, e.g. '0.25'
  3. When you confirm the group, you will see that the displayed multiplier has been rounded to one decimal place, so '0.3' for our example of 0.25. (One decimal place really isn't enough, but that's a separate issue.)
  4. However, if you check the signal value being output, you will see that it it actually multiplied by the correct amount; it's just the displayed value that it rounded.
  5. Now open the combinator and click on the button to edit the group's name and multiplier.
  6. The little text box where you enter the multiplier value will be filled, not with the exact value that you entered and is actually being used internally, but with the same rounded-to-one-decimal-place value which is displayed in the UI - so, in our case
  7. As a result, if you select that text-box and make a trivial change - say, adding a space after the number, or even adding a space and then deleting it - then when you save the changes, the value will now actually be 0.3 rather than just being displayed as such for the UI. (Heck, just selecting the text-box without typing anything might be enough to trigger this; I didn't test that.)
I also note that this means there is no way to even check what the exact multiplier even is. With, say, a signal value, the UI might display '25k', but I can always open the combinator and check the edit window to see if that's 25000 or 25001, but here I don't even have that option!

Now, I know there will have to be some rounding done here. The value you enter is presumably being parsed and stored as a float, and some values simply do not have precise binary floating-point representation; if I enter '0.2' I don't want to later come back to find the text box populated with '0.200000000000000011102230246252'. But turning '0.25' into '0.3' is clearly a problem.

Edit: Wrong link for the 'not enough decimal places' issue; correct thread is viewtopic.php?p=695525#p695525.
Last edited by macdjord on Thu Jun 25, 2026 4:42 am, edited 1 time in total.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5481
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [Klonan] [2.0.76] Text box for logistics group multiplier populated using rounded value

Post by Klonan »

Thanks for the report,

For the next release the values will be rounded and displayed with a max precision of 2 decimal places,
So the minimum non-zero multiplier is 0.01,
And opening and closing the multiplier textbox shouldn't clobber any existing value
Post Reply

Return to “Resolved Problems and Bugs”