Page 1 of 1

[2.0.60] pN_iX variables in BP parameter formulas break unexpectedly

Posted: Fri Aug 29, 2025 11:01 pm
by Footbal
When I attempt to use pN_iX variables (item count of parameter N ingredient X) and parameter N has less than X ingredients, the formula fails to execute entirely, taking on the parameter default value instead. Since the value of parameter N is not known when configuring the parameters, I would expect any references to an ingredient that does not exist to evaluate to 0 (any math errors that result would of course have to be resolved by the writer).

Thanks for your time, and let me know if I can provide any further details.

Configuring the formula. If I select a Wooden Chest as parameter 0, for example, I would expect the formula to evaluate to 2, since Wooden Chests require 2 wood and 0 of anything else.
factorio_parameter_config_cropped.jpg
factorio_parameter_config_cropped.jpg (179.63 KiB) Viewed 105 times
The result is that the formula does not execute and the default value is used instead.
factorio_parameter_result_cropped.jpg
factorio_parameter_result_cropped.jpg (94.27 KiB) Viewed 105 times

Re: [2.0.60] pN_iX variables in BP parameter formulas break unexpectedly

Posted: Sat Aug 30, 2025 12:11 am
by Footbal
I've also tried to put each pN_iX variable into its own parameter so that any that don't exist can default to 0 and still be used in other formulas, but that seems to break the main formula as well.
factorio_parameter_extra_cropped.jpg
factorio_parameter_extra_cropped.jpg (141.4 KiB) Viewed 85 times