Blueprint Parameterisation - static values from formulas.

This board is to show, discuss and archive useful combinator- and logic-creations.
Smart triggering, counters and sensors, useful circuitry, switching as an art :), computers.
Please provide if possible always a blueprint of your creation.
Skjolbir
Inserter
Inserter
Posts: 22
Joined: Thu Apr 23, 2020 2:04 pm
Contact:

Blueprint Parameterisation - static values from formulas.

Post by Skjolbir »

Say you have a blueprint that you want to query the player for a number, and you want it to default to something like 1. Maybe a train station train limit.
You create a constant combinator with an L signal of value 1.
Elsewhere in your blueprint however, you have an arithmetic combinator serving some other purpose and its taking a signal and adding 1 to it.
You might face an issue, where those two values become bundled parameters, and if the player says "I want my train limit to be 5", suddenly your arithmetic combinator is adding 5, instead of 1, breaking some circuit somewhere.
This is a problem I have faced, but have found a work-around!
For values that you need to stay absolutely static no matter what, give them a unique number such as 1001, then in their parameter Formula tell them to actually be set to 1.
You are then free to set the value parameter you are querying the player with to the default of 1, and when the blueprint compiles, no matter what value the player has set their query to, the static values will remain static.

I hope this image makes it a bit more clear.
10-28-2024, 21-26-21.png
10-28-2024, 21-26-21.png (1.82 MiB) Viewed 1556 times
Skjolbir
Inserter
Inserter
Posts: 22
Joined: Thu Apr 23, 2020 2:04 pm
Contact:

Re: Blueprint Parameterisation - static values from formulas.

Post by Skjolbir »

Post Reply

Return to “Combinator Creations”