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

This subforum contains all the issues which we already resolved.
Somtuk
Burner Inserter
Burner Inserter
Posts: 15
Joined: Tue Feb 26, 2019 11:25 pm
Contact:

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

Post 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.
Last edited by Somtuk on Sun Oct 27, 2024 6:40 pm, edited 2 times in total.
Somtuk
Burner Inserter
Burner Inserter
Posts: 15
Joined: Tue Feb 26, 2019 11:25 pm
Contact:

Re: Parameterized Blueprints doesn't like negative numbers

Post 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.
JAetherwing
Inserter
Inserter
Posts: 34
Joined: Sat Dec 29, 2018 2:51 pm
Contact:

Re: Parameterized Blueprints doesn't like negative numbers

Post 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).
gustaphe
Inserter
Inserter
Posts: 27
Joined: Thu Oct 27, 2016 6:50 am
Contact:

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

Post by gustaphe »

I'm seeing it too. An expression like

Code: Select all

-40*p0_s
will invariably become 21G.
Genhis
Factorio Staff
Factorio Staff
Posts: 589
Joined: Wed Dec 24, 2014 8:19 am
Contact:

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

Post by Genhis »

Thanks for the report. This seems like a duplicate of 116342.
JAetherwing
Inserter
Inserter
Posts: 34
Joined: Sat Dec 29, 2018 2:51 pm
Contact:

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

Post 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)
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

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

Post 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).
Post Reply

Return to “Resolved Problems and Bugs”