Combinator cookbook 2.0

Post pictures and videos of your factories.
If possible, please post also the blueprints/maps of your creations!
For art/design etc. you can go to Fan Art.

mmmPI
Smart Inserter
Smart Inserter
Posts: 3974
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Combinator cookbook 2.0

Post by mmmPI »

Hares wrote: Tue Dec 24, 2024 7:52 pm Tried to reduce this to one combinator but didn't succeed.
I think i heard of this one called "edge detector", if i'm not mistaken, you can achieve this with a single arithmetic combinator set up to do EACH * -1 output EACH

The wiring is the trick, if you have a constant combinator representing the input value, it need to be connected to the input and the output of the arithmetic with different colors of wire, and at the output, if the signal change, during 1 tick there will be "something" , and the next tick the arithmetic combinator will again nullify everything.
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 622
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: Combinator cookbook 2.0

Post by Hares »

mmmPI wrote: Tue Dec 24, 2024 8:33 pm
Hares wrote: Tue Dec 24, 2024 7:52 pm Tried to reduce this to one combinator but didn't succeed.
I think i heard of this one called "edge detector", if i'm not mistaken, you can achieve this with a single arithmetic combinator set up to do EACH * -1 output EACH

The wiring is the trick, if you have a constant combinator representing the input value, it need to be connected to the input and the output of the arithmetic with different colors of wire, and at the output, if the signal change, during 1 tick there will be "something" , and the next tick the arithmetic combinator will again nullify everything.
Okay, something like this:
12-24-2024, 23-41-05.png
12-24-2024, 23-41-05.png (664.32 KiB) Viewed 820 times


Even though it is now reduced to 1 comb, it has very limited use case, and work well only for deterministic logical signals.
I'd prefer to stay at 2-comb design.
User avatar
Khazul
Fast Inserter
Fast Inserter
Posts: 198
Joined: Fri Sep 03, 2021 4:47 am
Contact:

Re: Combinator cookbook 2.0

Post by Khazul »

Hares wrote: Tue Dec 24, 2024 8:43 pm
mmmPI wrote: Tue Dec 24, 2024 8:33 pm
Hares wrote: Tue Dec 24, 2024 7:52 pm Tried to reduce this to one combinator but didn't succeed.
I think i heard of this one called "edge detector", if i'm not mistaken, you can achieve this with a single arithmetic combinator set up to do EACH * -1 output EACH

The wiring is the trick, if you have a constant combinator representing the input value, it need to be connected to the input and the output of the arithmetic with different colors of wire, and at the output, if the signal change, during 1 tick there will be "something" , and the next tick the arithmetic combinator will again nullify everything.
Okay, something like this:
12-24-2024, 23-41-05.png


Even though it is now reduced to 1 comb, it has very limited use case, and work well only for deterministic logical signals.
I'd prefer to stay at 2-comb design.
It is still basically a 2 device setup, just arranged in a manner to allow embedding of the second differencing stage (+ve/-ve/any detect) in the second device.
mmmPI
Smart Inserter
Smart Inserter
Posts: 3974
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Combinator cookbook 2.0

Post by mmmPI »

Hares wrote: Tue Dec 24, 2024 8:43 pm Okay, something like this:
Yes ! I'm using this often
Hares wrote: Tue Dec 24, 2024 8:43 pm Even though it is now reduced to 1 comb, it has very limited use case, and work well only for deterministic logical signals.
I'd prefer to stay at 2-comb design.
Well it can be used as a building block for many more advanced contraption. It is meant to detect when signal changes, and let thru the magnitude of the change be it a positive or a negative, so it can be used to trigger one time action with "if something" => then do "thing" . But it can also be used to "count" things. If you have such deviced attached to say a chest, and you pick up manually 100 things, in one single click, such edge detector will detect "-100" variation. But if you take 10 and then 10 and then 10 as an inserter does, it will detect also - 10 and -10 and - 10.
coffee-factorio
Long Handed Inserter
Long Handed Inserter
Posts: 84
Joined: Thu Oct 17, 2024 10:56 pm
Contact:

Re: Combinator cookbook 2.0

Post by coffee-factorio »

I wanted to point out the advantages and current state of the new display panel for signage.

Image



What you guys are doing with rs latches and timers is beautiful. I made some examples that show how that can be used in practice if you ship some combinators onto a space platform. The second latch shows how to stack on conditions - so I'm suggesting this is a "stacking latch" as a name on that basis. RS/ect. can refer to the old multi-combinator model.

Image

The circuits shown demonstrate ammo and fuel-oxidizer safety switches for a space platform. If it can get to a port but can't raise either value after they fall under a tolerance range, it will not be able to raise a flag. This forces a platform to stay in a dock till these values are brought into a "safe flight" range. The fuel tolerance is probably looser than it ought to be.



I think that clocks are a bit more interesting now and wanted to make an example piece as to why.
This shows a clock that has been decorated with a reset condition and that passes along an enabling condition. The lamp shows that the passed signal is lost for one tick on T = 0. It also shows how time interacts with a properly set display, and signal passing over radar; which has practical applications for synchronizing remote machines to a global time.

Image



Image

If you revisit the old classic memory cell timers those are actually a lot of fun to play with! You can now make them cycle. And you can make a classic one-shot count up to N timer. But you can have the one shot time area reset on a control now, so you can control how each combinator works and manipulate them independently.

To demonstrate this I used a new style latch to make a reset button. It's "interesting" because you need to involve the constant combinator in the circuit. A safer design can be made by tying that circuit to a logic combinator that reads when S=1 and forwards that. It will reset the count independently of signal R, which controls if the timer can increment at all (but otherwise doesn't do anything to memory). As for the practical use of this I'm really not sure :lol:

User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 622
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: Combinator cookbook 2.0

Post by Hares »

For you, contributors to this topic, I'm sharing my Python script for making blueprints with text written on constant combinators.
Source code
Attached also as file, but should be un-renamed from .txt extension.
Usage:
  1. Have Python installed
  2. Edit `main` function to include the needed string (newlines supported)
  3. Optionally -- install `pyperclip` module for instant copy-to-clipboard feature
  4. Run
Run example
P.S.
Let me know if you want to see more of this, i.e. version that prints in display components instead of constant combinators.
Attachments
text_printer_simplistic.py.txt
(3.37 KiB) Downloaded 12 times
dontdieych
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue Apr 17, 2018 3:01 pm
Contact:

Re: Combinator cookbook 2.0

Post by dontdieych »

Priority map

I don't know a better title... Consider you have a list of signals and you want to map each of these signals to an associated signal. For example you want to map an item to an associated recipe. Additionally, this setup picks the item with the highest (or lowest) value, so you're able to either consume the most available item or produce more of the least available item.
It could be used as priority filter for signal to assembly machine. e.g. sending chemical plant and pipe signal to machine recipe -> pipe should have priority over chemical plant. If not, machine try to make chemical plant at first.
Tertius
Smart Inserter
Smart Inserter
Posts: 1078
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Combinator cookbook 2.0

Post by Tertius »

Pulse Extender
This is one thing I didn't see yet, it's the counterpart of the edge detector: the pulse extender. It's another variation of the memory cell that simply holds the last non-null signal forever or until you reset with R <> 0.

To hold and store one specific signal and not simply everything, replace all the EACH wildcards with the specific signal you want.
combinator_18405600_512x192.png
combinator_18405600_512x192.png (42.16 KiB) Viewed 621 times


The fascinating thing is the AND EACH = 0 part of the condition in the lower combinator. Usually, EACH=0 is never true, because if everything is 0 there is nothing for EACH to expand, so no check is being done, so it can never result in anything being true. But here the signals seem to have been collected by the other EACH that checks for the other wire.

So if you provide a list of non-null signals on one wire, you're able to check for EACH=0 on the other wire and get results!

Seeing all these 1- or 2-combinator setups that look all the same in the screenshot but provide meaningful different generic behaviors, I would say the 2.0 combinator changes are not just convenience, they really add generic functionality not available previously. I'm not decided yet which of all the 1-combinator examples to add to the wiki guide I intend to create, since they seem kind of trivial if you look at them. On the other hand, it's not trivial to find the right combination of wire selection, wildcard, loopback, comparison. There are so many variations possible now. People might not realize on their own some task is trivial.
Tertius
Smart Inserter
Smart Inserter
Posts: 1078
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Combinator cookbook 2.0

Post by Tertius »

I found an interesting MAP on discord with just 1 decider.

This simple variant picks the most available fluid and outputs the corresponding solid fuel recipe, so always the most available fluid is converted into solid fuel.

The variant in discord additionally uses the green wire color to perform additional comparisons against configured values across wire colors, for example for "...but only if > minimum" conditions. To differ between item and recipe, the recipe values are bumped into the millions.
01-05-2025, 20-13-07.png
01-05-2025, 20-13-07.png (278.67 KiB) Viewed 427 times


Found here: https://discord.com/channels/1396775903 ... 7784924160
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 622
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: Combinator cookbook 2.0

Post by Hares »

Tertius wrote: Sun Jan 05, 2025 7:21 pm I found an interesting MAP on discord with just 1 decider.

This simple variant picks the most available fluid and outputs the corresponding solid fuel recipe, so always the most available fluid is converted into solid fuel.
Mindblowing. Instantly updated my auto-unbarelling setup to be 3 ticks faster.
This, however, works only for static maps -- for dynamic maps you still need an extra combinator or two.
01-06-2025, 17-06-39.png
01-06-2025, 17-06-39.png (672.64 KiB) Viewed 398 times
Amarula
Filter Inserter
Filter Inserter
Posts: 561
Joined: Fri Apr 27, 2018 1:29 pm
Contact:

Re: Combinator cookbook 2.0

Post by Amarula »

Tertius wrote: Sun Jan 05, 2025 7:21 pm I found an interesting MAP on discord with just 1 decider.
Very cool! I used this for dynamically setting the recipe to reprocess asteroid chunks.
My own personal Factorio super-power - running out of power.
Post Reply

Return to “Show your Creations”