Page 1 of 1

Allow using formula as default value in parameterized blueprint

Posted: Tue Oct 29, 2024 10:04 pm
by grossws
TL;DR
Add checkbox "allow override"/"use as default" to use formula result as default value leaving its value still changeable instead of using dummy constant combinator + some formula tricks.
What?
Add checkbox "allow override"/"use formula result as default value" for numeric parameters defined by formula. In this example formula would simplify to just p0_s and limit value could still be set to any desired value on blueprint placement.
Screenshot_20241030_001250.png
Screenshot_20241030_001250.png (420.04 KiB) Viewed 286 times
proposed.png
proposed.png (128.32 KiB) Viewed 286 times
Why?
In some parameterized blueprints like mall block it's desirable to calculate default value to something like 1 stack but have it easily overridable it if user desires (e.g. several stacks of belts but only 4 or 8 nuclear reactors in early mall).

Currently it requires to add dummy combinator (to add new parameter), set it's value to 0 and use formula like

Code: Select all

limit = override + p0_s * (1 - sign(override))
. It would be somewhat mitigated if viewtopic.php?p=621670 is implemented (and I hope it be).