[kovarex] [2.0.12] p0_s for liquids returns 40 for formulas

Bugs that are actually features.
Criperum
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Thu Jan 26, 2017 7:22 pm
Contact:

[kovarex] [2.0.12] p0_s for liquids returns 40 for formulas

Post by Criperum »

1. make a parametrized BP and use stack size variable in parameter formulas
2. Place BP choosing any liquid as actual value

Result:
Stack size is 40
Expected result:
Zero may be or some way to handle it inside formula itself
Criperum
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Thu Jan 26, 2017 7:22 pm
Contact:

Re: [2.0.12] p0_s for liquids returns 40 for formulas

Post by Criperum »

More likely any formulas with p0_s of liquids resolve to 40
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [kovarex] [2.0.12] p0_s for liquids returns 40 for formulas

Post by kovarex »

They don't resolve to 40, 40 was just your original value. They are just not resolved.
Doggfite
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed May 21, 2025 9:29 am
Contact:

Re: [kovarex] [2.0.12] p0_s for liquids returns 40 for formulas

Post by Doggfite »

kovarex wrote: Thu Feb 06, 2025 1:52 pm They don't resolve to 40, 40 was just your original value. They are just not resolved.
I had a question about this "not being resolved"
I'm not sure of the exact mechanics of it, but if the stack size of a liquid is unresolvable in a blueprint formula (which is fine by me), why does it break the formula entirely?
I have a blueprint that checks for a liquid in p0 using the formula "p0_s*0" and it has a default value of -1, and so if it is a liquid (or other non stacking object) it defaults to -1 and if not then 0.
But, I want to use this as a named variable in other formula down the list. And even when it defaults to -1 the named variable seems to use the formula every time it's called and breaks the blueprint instead of using the default value.

Even if I use "max(-1,p0_s*0)" or "min(-1,p0_s*0)" the formula never returns a value for liquids...
Post Reply

Return to “Not a bug”