Add 2 outputs to Decider Combinator

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

vark111
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Nov 10, 2023 4:04 pm
Contact:

Add 2 outputs to Decider Combinator

Post by vark111 »

TL;DR
I would like to have Decider Combinators produce 2 outputs: one for True and one for False.
What?
The mechanics are simple: Have one output enabled if the condition is true, the other output enabled if the condition is false.

A picture's worth a thousand bits:
decider2.png
decider2.png (73.71 KiB) Viewed 1364 times
Why?
All too frequently we need to have an output condition determined by both states of a decider. Currently the only way to do this is to drop a second combinator with a boolean inverted condition. A much simpler approach is to use a single decider with a True condition output and a False condition output.

Not only will this reduce the number of deciders in a lot of factories, this could also potentially improve the experience for non-developer players who can easily grasp the concept of an if/else statement, but who might struggle with the concept of boolean inversion.
Tinyboss
Filter Inserter
Filter Inserter
Posts: 518
Joined: Sun Nov 16, 2014 12:11 pm
Contact:

Re: Add 2 outputs to Decider Combinator

Post by Tinyboss »

Could you use a constant combinator to put the false value on the output, and include the negative of it in your decider's output, to cancel it out? Still an extra combinator, but less configuration at least.

Regardless, I like your idea and I've wished for it myself, when setting recipes on my asteroid crushers.
zig1000
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Oct 25, 2024 9:57 pm
Contact:

Re: Add 2 outputs to Decider Combinator

Post by zig1000 »

+1
A static combinator isn't sufficient because you might want both outputs to be based on the input.
For example, a very simple case is 'pass on either the red signal or the green signal based on [condition]' - this currently requires at least 2 combinators afaik.
macdjord
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Fri Feb 22, 2013 4:26 am
Contact:

Re: Add 2 outputs to Decider Combinator

Post by macdjord »

+1

As a programmer, it is very weird to have an 'if' condition that doesn't allow you to define the 'else' branch.
Aricitic
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sat Nov 16, 2024 5:30 am
Contact:

Re: Add 2 outputs to Decider Combinator

Post by Aricitic »

vark111, I want to personally thank you for not making me create a new topic just to revive an old topic from 2020 to reply to a few people...

In "Else output for decider combinator" (viewtopic.php?f=6&t=64173&start=20) people were explaining how "just add another combinator (idiot)"... No, they didn't add "idiot" but you could sense it in their replies.

Here's why I began to get infuriated by the replies that were basically "old way is good, new way is bad. challange is good, easy is bad."

TLDR: The people opposed to adding this are in one of three camps: imposing their demand for what they believe is "'challenge' through complexity" on others; falsely believing that it would harm TPS; or both. Does anyone here believe that anyone, anyone has the right to impose their beliefs of what "challenge" should be on others? Allowing someone to decide to utilize a feature/function or not does not "impose" challenge, it leaves what the "challenge" is to the individual. And anyone who believes that adding the purely optional "else" output to combinators doesn't understand programming. Wube consists of people who are provenly excellent programmers. They can handle the barely added complexity.
Note on challenge
Brace for a LOT of text
Ok... ONE LAST thought: in the referenced thread some people demanded an example, "in-game," where having one combinator provide an "else" output would be better than "simply adding another combinator." Ok... Space Platform: I want to tell an inserter to change from "Insert only Metalic Asteroid Chunk" to "insert any Asteroid Chunk" within only three tiles (one for the inserter and two for the combinator).
Why should I spend 205 extra iron and 60 extra copper cables (plus rocket space and materials for the rocket parts)? That's the cost of the extra Space Platform Foundation and Combinator...
IsaacOscar
Filter Inserter
Filter Inserter
Posts: 479
Joined: Sat Nov 09, 2024 2:36 pm
Contact:

Re: Add 2 outputs to Decider Combinator

Post by IsaacOscar »

I do wonder why the dev's choose what circuit network features to add.
For example, having multiple conditions on a decider combinator is clearly redundant and just adds more complexity, just like adding multiple outputs would.

So I think either they should go the route of forcing people to do things the hwrd way with multiple combinators, or make things easy by adding common operations (in particular, I would like memory combinators! even though I can just build my own by hand)
Aricitic
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sat Nov 16, 2024 5:30 am
Contact:

Re: Add 2 outputs to Decider Combinator

Post by Aricitic »

IsaacOscar wrote: Thu Nov 21, 2024 5:50 am I do wonder why the dev's choose what circuit network features to add.
For example, having multiple conditions on a decider combinator is clearly redundant and just adds more complexity, just like adding multiple outputs would.

So I think either they should go the route of forcing people to do things the hwrd way with multiple combinators, or make things easy by adding common operations (in particular, I would like memory combinators! even though I can just build my own by hand)
^- This.

And, they could add it as a "un"-necessary technology... Something that isn't required to be researched to complete the game. There are plenty of technologies like this (I think advanced combinators are one).

'Sides. It's not like we're asking for them to make a "combinator" that allows us to code in Lua. THAT deserves a mod. Even I will agree with that sentiment.


I said this before,
but
/sigh
All the above "word soup" is meant to show that "limiting ourselves" without real reason is utterly idiotic. ... No, NO, I'm not calling people who choose to challenge themselves "idiotic," nor am I really calling those who challenge others idiotic...
Instead
The majority of the arguments against what is being requested in this thread, and others like it, is that we are simply wrong to even request the change - at_all. Period. These arguments take many forms, but all of them boil down to this basic principle.
And that
If anyone wants examples, in-game or in reality, as to why this change is a good thing (or necessary even), and how it would be used/useful in-game or in reality, I can provide many, many examples of when only needing one device to do what two, six or a hundred current ones would be better than more.
No. I will not spam this thread with examples without being requested for examples. (FFS, just look above, do you really want more of that now? Has anyone even read to this point?)

Post Script: Special thanks to Sharparam for teaching me how to properly use the "Spoiler" tag to fully hide text so that my posts don't take up the same screen space as all others on a given page... (laughs at self) Additionally, does anyone know how to force a "line break" so that there are spaces between the end of "spoiler" boxes and the next paragraph?
Tinyboss
Filter Inserter
Filter Inserter
Posts: 518
Joined: Sun Nov 16, 2014 12:11 pm
Contact:

Re: Add 2 outputs to Decider Combinator

Post by Tinyboss »

Aricitic wrote: Thu Nov 21, 2024 8:15 pmAdditionally, does anyone know how to force a "line break" so that there are spaces between the end of "spoiler" boxes and the next paragraph?
Who would be interested in such a nitpicky thing? (Please tell me if you find out!!)
User avatar
LCStark
Fast Inserter
Fast Inserter
Posts: 192
Joined: Thu Jan 28, 2021 5:04 pm
Contact:

Re: Add 2 outputs to Decider Combinator

Post by LCStark »

Aricitic wrote: Thu Nov 21, 2024 8:15 pm Additionally, does anyone know how to force a "line break" so that there are spaces between the end of "spoiler" boxes and the next paragraph?
Place two empty lines between them:

Code: Select all

[spoiler=text]
text
[/spoiler]


text	

Results in:
text

text
Aricitic
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sat Nov 16, 2024 5:30 am
Contact:

Re: Add 2 outputs to Decider Combinator

Post by Aricitic »

Tinyboss wrote: Thu Nov 21, 2024 8:43 pm
Aricitic wrote: Thu Nov 21, 2024 8:15 pmAdditionally, does anyone know how to force a "line break" so that there are spaces between the end of "spoiler" boxes and the next paragraph?
Who would be interested in such a nitpicky thing? (Please tell me if you find out!!)
See the text you quoted... Or the person who responded to me after you?

LCStark wrote: Fri Nov 22, 2024 12:15 am
Aricitic wrote: Thu Nov 21, 2024 8:15 pm Additionally, does anyone know how to force a "line break" so that there are spaces between the end of "spoiler" boxes and the next paragraph?
Place two empty lines between them:

Code: Select all

[spoiler=text]
text
[/spoiler]


text	

Results in:
text

text
Thank you.
I thought I tried that, but, clearly not. Will do so in the future.
vark111
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Nov 10, 2023 4:04 pm
Contact:

Re: Add 2 outputs to Decider Combinator

Post by vark111 »

My general thoughts after reading some of the comments:

I don't consider this to be a "let's start blowing out the combinators to do all sorts of things" idea. While I would absolutely love the idea of a one-combinator Latch, I agree with the decision to not include it, and make us build those types of contraptions.

This request is for something more fundamental. How many programming languages have an "if" block and no "else" block? I'm not familiar with every programming language in existence, but all the major ones contain both. All this request is to ask Wube to complete your if structure, because right now its missing the else block.
User avatar
LCStark
Fast Inserter
Fast Inserter
Posts: 192
Joined: Thu Jan 28, 2021 5:04 pm
Contact:

Re: Add 2 outputs to Decider Combinator

Post by LCStark »

vark111 wrote: Fri Nov 22, 2024 2:43 pm While I would absolutely love the idea of a one-combinator Latch, I agree with the decision to not include it, and make us build those types of contraptions.

This request is for something more fundamental. How many programming languages have an "if" block and no "else" block? I'm not familiar with every programming language in existence, but all the major ones contain both. All this request is to ask Wube to complete your if structure, because right now its missing the else block.

I agree with the latter part of your post. While it is not really needed and can be overcome quite easily, I feel like having the "else" condition in combinators would make them feel more complete, especially after the 2.0 update they got.

As for the one-combinator latch, it's already possible. I'd say do some more experiments, it's pretty satisfying when you come up with it yourself. But if you don't want to, you can take a look at this design posted on the forums:
vark111
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Nov 10, 2023 4:04 pm
Contact:

Re: Add 2 outputs to Decider Combinator

Post by vark111 »

LCStark wrote: Fri Nov 22, 2024 3:19 pm While it is not really needed and can be overcome quite easily, I feel like having the "else" condition in combinators would make them feel more complete, especially after the 2.0 update they got.
Agree 100%.

And with the extended boolean conditions and multiple outputs introduced in 2.0, I'd suspected that a one combinator latch might be possible. I will definitely spend time this weekend noodling the idea.
macdjord
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Fri Feb 22, 2013 4:26 am
Contact:

Re: Add 2 outputs to Decider Combinator

Post by macdjord »

vark111 wrote: Fri Nov 22, 2024 4:25 pm
LCStark wrote: Fri Nov 22, 2024 3:19 pm While it is not really needed and can be overcome quite easily, I feel like having the "else" condition in combinators would make them feel more complete, especially after the 2.0 update they got.
Agree 100%.

And with the extended boolean conditions and multiple outputs introduced in 2.0, I'd suspected that a one combinator latch might be possible. I will definitely spend time this weekend noodling the idea.
One-combinator latches are certainly possible, at least for some use-cases. For example, when connecting backup power to a semi-solar-powered base, I now use a single decider combinator set as so: if ([Accumulator] < 5) OR ([Accumulator] < 10 AND [Power Switch] > 0), output [Power Switch] = 1. (Where [Accumulator] is an accumulator returning its current charge level, [Power Switch] is the signal to tell the power switch to hook in the backup power generator, and the decider combinator's output is wired into its input.) This results in the backup power turning on when I go below 5% charge and then staying on until we hit 10%.
TurningGears
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Nov 20, 2024 3:15 am
Contact:

Re: Add 2 outputs to Decider Combinator

Post by TurningGears »

This would help avoiding at least one additional combinator.
Especially now with setting recipes, you have a condition and want to output one recipe, but if the condition changes, another. Afaik this is currently not possible with only one combinator.
fazol
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Jan 11, 2018 6:49 pm
Contact:

Re: Add 2 outputs to Decider Combinator

Post by fazol »

Great idea, it will make combinators more complete and not overcomplicated in my opinion
Aricitic
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sat Nov 16, 2024 5:30 am
Contact:

Re: Add 2 outputs to Decider Combinator

Post by Aricitic »

vark111 wrote: Fri Nov 22, 2024 2:43 pm My general thoughts after reading some of the comments:

I don't consider this to be a "let's start blowing out the combinators to do all sorts of things" idea. While I would absolutely love the idea of a one-combinator Latch, I agree with the decision to not include it, and make us build those types of contraptions.

This request is for something more fundamental. How many programming languages have an "if" block and no "else" block? I'm not familiar with every programming language in existence, but all the major ones contain both. All this request is to ask Wube to complete your if structure, because right now its missing the else block.

*cough* While many of my previous posts (here and elsewhere) may not suggest it, I am neither arrogant nor stupid enough to attempt to assert that I do know "all" (currently existing) programming languages...

That said, ASSEMBLY (and, therefore, MACHINE LANGUAGE) contains an "else" statement within the "if" statement. And, for those unaware, Assembly is the most basic "human readable" programming language in existence (only slightly more "advanced" than "machine language" -- but is literally a 1:1 ratio of code to computer-readable... uh... coding).
Example for MIPS Assembly If-then-else:
note
: https://eng.libretexts.org/Bookshelves/ ... Statements
Heck, even the "smallest" language called "Brainf..." (self-censoring) (I would post a URL, but I'm fairly certain that it would be censored...) has the ability to do an "else" without programming an entirely new function (i.e. it's part of the "if-then" portion).

slight deep dive
AND I personally agree with vark111
-->
Consider this
---
I get the feeling that


P.S. Anyone know of a way to add a link to a "word" instead of simply forming a "hyperlink"? (i.e. clicking on a word redirects, instead of simply making a fully typed URL clickable?) I know it can be done in other forums, but I'm new to - or simply unfamiliar with - this one. Thank you.
User avatar
LCStark
Fast Inserter
Fast Inserter
Posts: 192
Joined: Thu Jan 28, 2021 5:04 pm
Contact:

Re: Add 2 outputs to Decider Combinator

Post by LCStark »

Aricitic wrote: Thu Nov 28, 2024 9:00 pm P.S. Anyone know of a way to add a link to a "word" instead of simply forming a "hyperlink"? (i.e. clicking on a word redirects, instead of simply making a fully typed URL clickable?) I know it can be done in other forums, but I'm new to - or simply unfamiliar with - this one. Thank you.
I assume you mean something like this? Instead of pasting address between the url tags do this:

Code: Select all

[url=https://forums.factorio.com/122303]this[/url]
Also, you might want to check if you've properly closed your spoiler tags, something seems off there. ;)
Aricitic
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sat Nov 16, 2024 5:30 am
Contact:

Re: Add 2 outputs to Decider Combinator

Post by Aricitic »

LCStark wrote: Thu Nov 28, 2024 9:10 pm
Aricitic wrote: Thu Nov 28, 2024 9:00 pm P.S. Anyone know of a way to add a link to a "word" instead of simply forming a "hyperlink"? (i.e. clicking on a word redirects, instead of simply making a fully typed URL clickable?) I know it can be done in other forums, but I'm new to - or simply unfamiliar with - this one. Thank you.
I assume you mean something like this? Instead of pasting address between the url tags do this:

Code: Select all

[url=https://forums.factorio.com/122303]this[/url]
Also, you might want to check if you've properly closed your spoiler tags, something seems off there. ;)
Exactly. So... Um, I hate to ask, but is there a location where I can simply look up this information? I'm feeling slightly dumb constantly asking at the end of my posts.

Also, yes, the tags were closed properly. I click the button that automatically adds it. The things you are seeing between the spoilers are there because no matter what I did I could not get space in between them.
You previously told (and showed) me how to add one, but every time I previewed it and no matter how many carriage returns I entered they would be directly below one another... Hence the "-->" and "---" to try and break it up formatting-wise at least a little... (It looks stupid, but is still 'slightly' better than a block of "spoilers"...)
IsaacOscar
Filter Inserter
Filter Inserter
Posts: 479
Joined: Sat Nov 09, 2024 2:36 pm
Contact:

Re: Add 2 outputs to Decider Combinator

Post by IsaacOscar »

Aricitic wrote: Sat Nov 30, 2024 2:36 am
LCStark wrote: Thu Nov 28, 2024 9:10 pm
Aricitic wrote: Thu Nov 28, 2024 9:00 pm P.S. Anyone know of a way to add a link to a "word" instead of simply forming a "hyperlink"? (i.e. clicking on a word redirects, instead of simply making a fully typed URL clickable?) I know it can be done in other forums, but I'm new to - or simply unfamiliar with - this one. Thank you.
I assume you mean something like this? Instead of pasting address between the url tags do this:

Code: Select all

[url=https://forums.factorio.com/122303]this[/url]
Also, you might want to check if you've properly closed your spoiler tags, something seems off there. ;)
Exactly. So... Um, I hate to ask, but is there a location where I can simply look up this information? I'm feeling slightly dumb constantly asking at the end of my posts.

Also, yes, the tags were closed properly. I click the button that automatically adds it. The things you are seeing between the spoilers are there because no matter what I did I could not get space in between them.
You previously told (and showed) me how to add one, but every time I previewed it and no matter how many carriage returns I entered they would be directly below one another... Hence the "-->" and "---" to try and break it up formatting-wise at least a little... (It looks stupid, but is still 'slightly' better than a block of "spoilers"...)
The forum uses bbcode, see https://www.bbcode.org/how-to-use-bbcod ... -guide.php

There may be some modifications to it though.
If you have more questions, the appropriate place to ask is viewforum.php?f=55
Post Reply

Return to “Ideas and Suggestions”