Page 1 of 1

[kovarex] [2.0.11] Parameterized Blueprints doesn't like negative numbers

Posted: Sun Oct 27, 2024 6:09 pm
by Somtuk
Steps to reproduce:
- Place a constant combinator
- Add the following to the combinator: Iron Ore (value of -10) *** IMPORTANT *** A negative number is required here.
- Start the process of creating a blueprint for the combinator
- Click the "Parameterise/reconfigure the blueprint." button
- For the first line, enter the name Item, check the Parameter check box, set the value the "Parameter 0"
- For the second line, enter the name Value, check the Parameter check box, leave the value at "-10"
- Click on "Create blueprint"
- Now attempt to place the new blueprint
- Select some item for the Item parameter (doesn't matter which)
- Click the green checkmark. *** IMPORTANT *** Leave the default negative value.
- Click on the NEW constant combinator and look at the values assigned.

Notice that the item is correct, however the value is incorrect. Parameterization does not function correctly for negative numbers.

*** EDIT *** Fixed a step that said to leave the value at "1". It really should have said "-10" as the negative number is IMPORTANT.

Re: Parameterized Blueprints doesn't like negative numbers

Posted: Sun Oct 27, 2024 6:12 pm
by Somtuk
I should add that there is a second issue...

The second step requires a negative number as a value because the Parameterised Blueprint popup doesn't allow for negative numbers to be entered. I feel this is also a bug. Since combinators support negative numbers, the UI should also support the entry of negative numbers.

Re: Parameterized Blueprints doesn't like negative numbers

Posted: Sun Oct 27, 2024 6:26 pm
by JAetherwing
The same issue occurs when a formula for a parametric value ends up negative. The resulting value always seems to be 2^31-1 (2147483647).

Re: [2.0.11] Parameterized Blueprints doesn't like negative numbers

Posted: Sun Oct 27, 2024 8:42 pm
by gustaphe
I'm seeing it too. An expression like

Code: Select all

-40*p0_s
will invariably become 21G.

Re: [2.0.11] Parameterized Blueprints doesn't like negative numbers

Posted: Mon Oct 28, 2024 10:34 am
by Genhis
Thanks for the report. This seems like a duplicate of 116342.

Re: [2.0.11] Parameterized Blueprints doesn't like negative numbers

Posted: Tue Oct 29, 2024 4:11 pm
by JAetherwing
Genhis wrote:
Mon Oct 28, 2024 10:34 am
Thanks for the report. This seems like a duplicate of 116342.
Not really a duplicate, because this report extends to manual entry of negative numbers, which 116342 doesn't cover (and which is not fixed in the current version)

Re: [kovarex] [2.0.11] Parameterized Blueprints doesn't like negative numbers

Posted: Mon Nov 11, 2024 4:09 pm
by kovarex
Hello, thanks for the report, it is now fixed for the next version (and shouldn't break anymore, as we have test specifically for this).