Page 2 of 2

Re: Decider combinator with "Anything" output

Posted: Sat Aug 17, 2019 10:44 am
by ssilk
+1

Plus: the table above lists situations, where two signals could be outputted, in that case any matching signal should be outputted. Sounds more logical for me...

Re: Decider combinator with "Anything" output

Posted: Thu Aug 22, 2019 9:53 pm
by slippycheeze
I'm just gonna throw in another voice asking for this in core. I don't care if it is "emit the first/last/mod-17-th signal based on a stable sort of all possible signals", or "min", "max", or whatever, but some facility to turn "all these signals" into "one of these signals" in a stable way would be extremely valuable to many uses of the extra-strange digital and analog circuit system.

As folks said before, right now it is very hard to make this stable, and what looked like tiny amounts of lua code implementing it per-tick turns out to be shockingly expensive for ... IDK. I guess "implementation reasons" or something, which make any interaction with the circuit network in a mod really expensive.

I'd also add that solving it in-game is not a "good gameplay" design challenge, just a "tedious gameplay" version: it isn't very hard to express the procedural logic of `if a then a else if b then b else if c then c end` in the game, it just involves stringing enough combinators in either parallel or series to do it, without any particular thought involved. You solve it maybe-once, since it is annoying enough to google, and then you can just stamp down the template every time without having to do any thinking at all.

Re: Decider combinator with "Anything" output

Posted: Wed Nov 06, 2019 10:04 am
by DaveMcW
Here is a picture of what I would like. No new graphics or UI design is required.

pick any signal.png
pick any signal.png (217.33 KiB) Viewed 5202 times

Re: Decider combinator with "Anything" output

Posted: Wed Nov 06, 2019 11:23 am
by ichVII
+1
ssilk wrote:
Sat Aug 17, 2019 10:44 am
Plus: the table above lists situations, where two signals could be outputted, in that case any matching signal should be outputted. Sounds more logical for me...
It is really important to distinguish between "any" and "each". If you mean "any", as in just one, I agree. If you mean "each", I disagree, because an important point of this is to split up one single signal from a circuit signal, even if multiple have an equal value. Currently, using just logic, this is only possible, if you provide an explicit order of all signals and then do some more logic. The game internally already has an order of all signals and this is used to set filters, but not used within combinators.

Re: Decider combinator with "Anything" output

Posted: Thu Jan 21, 2021 10:38 am
by Twinsen
Implemented in Version: 1.1.13 by DaveMcW

- Decider combinator can output an Anything signal, which returns exactly one matching signal

It returns the first signal, ordered by in the internal prototype order, same as filter inserters.

Re: Decider combinator with "Anything" output

Posted: Thu Jan 21, 2021 11:46 am
by DerGraue
omg, thank you so much :D

Re: Decider combinator with "Anything" output

Posted: Thu Jan 21, 2021 12:24 pm
by aka13
Holy shit prasie DaveMcW and his magical ways

Re: Decider combinator with "Anything" output

Posted: Fri Jan 22, 2021 3:29 am
by Trific
Oh, Hallelujah!!!!

Re: Decider combinator with "Anything" output

Posted: Fri Jan 22, 2021 3:11 pm
by knightelite
Nice work DaveMcW :)

Re: Decider combinator with "Anything" output

Posted: Sat Jan 23, 2021 10:10 pm
by Omnifarious
This is a broader solution to the filter selection problem than the Each option for the stack size idea that I proposed, and therefore a better one. Thank you DaveMcW!

Re: Decider combinator with "Anything" output

Posted: Tue Jan 26, 2021 12:50 pm
by ElderAxe
@DaveMcW can you also allow filter inserters to accept "Any" as Set stack size signal?

The use case is, picking up the exact amount of items from a chest or wagon. When there is a tick difference, we can pick up the wrong amount.

When we use the new logic to set filters on inserters, the current logic needs to be like this to match the ticks between filter signal & stack size signal.
currrent.png
currrent.png (171.43 KiB) Viewed 3972 times
One combinator to set the stack size (S signal in this case), another one to delay the original signal for one tick.

If you guys allow Any signal to be used as stack size, this will allow us to get rid of those two combinators and directly use the signal we provide for the stack size.
suggested.png
suggested.png (123.85 KiB) Viewed 3972 times

Re: Decider combinator with "Anything" output

Posted: Tue Jan 26, 2021 2:49 pm
by Trific
ElderAxe wrote:
Tue Jan 26, 2021 12:50 pm
@DaveMcW can you also allow filter inserters to accept "Any" as Set stack size signal?

If you guys allow Any signal to be used as stack size, this will allow us to get rid of those two combinators and directly use the signal we provide for the stack size.
Under usual use case (constant combinator specifying desired contents of chest differenced with actual contents of chest to provide "amount that needs to move"), you could simply wire that directly to the filter inserter and do away with the new decider combinator altogether. The new decider combinator output already simplifies my train unloading gadget immensely, surely at least *some* challenge should remain? :mrgreen:

Re: Decider combinator with "Anything" output

Posted: Wed Jan 27, 2021 4:12 am
by ssilk
You both have seen, that this subject is marked as implemented?

Maybe more useful to start a new subject?!