Page 1 of 1

[2.0.13] Small minimum request amount gets set to 0 when adjusting maximum value slider

Posted: Fri Nov 01, 2024 8:57 am
by fm9000
When requesting an item in the requester chest, you can set both a minimum and a maximum value. The default values are one stack size for the minimum and inf. for the maximum. When grabbing either of the two sliders, they also move in increments of one stack size. But you also have the option to override each of those values with specific numbers.

When I am requesting an exact amount of items (in this example a quantity of 5 of a transport belt with a stack size of 100), I will enter 5 for both the minimum and the maximum value. It all works well and the "5 / 5" setting is confirmed and visible in the requester chest.

Now I want to adjust the maximum value afterwards. I click on the request in the requester chest. Instead of entering a new value in the Maximum amount field, I want to use the slider. The moment I move it to the right, the minimum amount is being reset to 0, the maximum is also briefly set to 100 before increasing again in the stack size increment.

This behavior is not consistent. In my example of a stack size 100 item I can reproduce it for all set values up to 50.

When I set the initial request to "Minimum 51, Maximum 51" and then readjust it with the maximum-slider, it works as I expect. The specifically entered minimum value remains at 51 and the maximum value jumps to the value 100 and then increases in stack size increments.

When I try the same for items with a stack size of 1, it always works smoothly. When I try the same for items with a stack size of 200, it resets to 0 for all values 0-100. So I guess it's some "rounding down for all values below half the stack size" effect happening.

I don't know if this is the intended behavior. When I make a deliberate choice in entering a specific number for the minimum amount, I don't expect it to be reset by changing the value for the maximum amount.

Re: [2.0.13] Minimum request amount being set to 0 when readjusting the maximum value

Posted: Fri Nov 01, 2024 9:53 am
by Makka77
+1

Not exactly game breaking but inconvenient.

Re: [2.0.13] Small minimum request amount gets set to 0 when adjusting maximum value slider

Posted: Fri Nov 22, 2024 11:43 pm
by robot256
This happens in 2.0.21 as well.

Clearly what happens is when the player clicks on the "max" slider, it snaps to the *nearest* stack increment, which is sometimes smaller than the current minimum value, and pushes the minimum there as well.

The fix I propose is for the max slider to always round up, and the min slider to always round down, if they are not on a multiple of the stack size when they are first clicked by the user.

Re: [2.0.13] Small minimum request amount gets set to 0 when adjusting maximum value slider

Posted: Sat Nov 23, 2024 7:47 am
by tinker9
Wouldn’t it be better to only change the value for the part of the slider the player clicked on?
So if the maximum slider was clicked, it would round up (and the min wouldn’t change).
And if the minimum slider was clicked, it would round down (and the max wouldn’t change).

Re: [2.0.13] Small minimum request amount gets set to 0 when adjusting maximum value slider

Posted: Sat Nov 23, 2024 12:06 pm
by robot256
tinker9 wrote: Sat Nov 23, 2024 7:47 am Wouldn’t it be better to only change the value for the part of the slider the player clicked on?
So if the maximum slider was clicked, it would round up (and the min wouldn’t change).
And if the minimum slider was clicked, it would round down (and the max wouldn’t change).
That is exactly what I meant, thank you for writing it more clearly!