Min / Max compare option for Selector combinator

Ideas that are too old (too many things have changed since) and ones which won't be implemented for certain reasons or if there are obviously better suggestions.

Moderator: ickputzdirwech

taori
Burner Inserter
Burner Inserter
Posts: 11
Joined: Wed Nov 06, 2024 10:30 am
Contact:

Min / Max compare option for Selector combinator

Post by taori »

TL;DR
Min / Max option for Selector combinator would be useful to set limits to train stations.

What?
WHAT do you suggest? What is your idea that should be changed? Explain in detail your idea.
I would want green+red signals to be compared and having the largest/smallest/the only present value to be returned
- min(5,1) == 1
- min(5,null) == 5
- min(null,1) == 5
- max(5,1) == 5
- max(5,null) == 5
- max(null,1) == 1
Why?
WHY do you think it increases the value of Factorio as a game?
I know this can be done by circuitry with a lot more combinators, but whenever i needed min/max functionality it would be fantastic to have this through the new combinator, because wherever i do need it(mostly train stations) i do not have that much space available (especially since i need it per station).
My sample use case would be calculating the amount of trains that can pick up items via combinators, but having a constant combinator provide a train limit on a different signal color, so i can add it to a blueprint and if my blueprint only supports 2 trains, i can set it to 2 on the constant, even if my station could supply 7 trains with items. Not doing min/max through multiple combinators would reduce ups cost and make it a simple use case for everyone.

See more about here:
viewtopic.php?f=6&t=27087 How is This Board Working? Revision #3
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3412
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Min / Max compare option for Selector combinator

Post by boskid »

taori wrote: Fri Jan 17, 2025 10:54 am I know this can be done by circuitry with a lot more combinators
Two decider combinators to be more precise. I will reject this idea because it is already suspicious given your example around null handling making it a non universally obvious how should it behave and as such this feature would be likely to spawn bug reports because it does not behave as people want it to behave. Selecting min/max from a given signal frame is simple using selector combinator. Doing a wire vs wire min/max is 2 decider combinators both using [Each] and allowing you to specify behavior in those weird corner cases i am afraid of.
Tertius
Smart Inserter
Smart Inserter
Posts: 1057
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Min / Max compare option for Selector combinator

Post by Tertius »

@taori You might want to check this thread for a number of useful combinator "snippets": viewtopic.php?f=8&t=124776
There is a surprisingly big amount of generic use cases that can be solved with just 1 or 2 combinators.
It includes a min/max, and the task to limit the train limit is shown with just 1 combinator, however it's slightly kludgy and not a simple input of the limit as number.
Post Reply

Return to “Outdated/Not implemented”