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.

gGeorg
Filter Inserter
Filter Inserter
Posts: 483
Joined: Wed Jun 19, 2019 8:06 pm
Contact:

Re: Combinator cookbook 2.0

Post by gGeorg »

Tertius wrote: Tue Mar 11, 2025 1:37 pm This stack size computation is truly great.
I prefer word genius. Well, I did it myself. ;)
Tertius wrote: Tue Mar 11, 2025 1:37 pm I developed a multi wagon supply train loading and unloading station,
Could you post it to other thread ?
I will add my Supply train station, so we could compare other ideas, at work.
coffee-factorio
Long Handed Inserter
Long Handed Inserter
Posts: 90
Joined: Thu Oct 17, 2024 10:56 pm
Contact:

Re: Combinator cookbook 2.0

Post by coffee-factorio »

Tertius wrote: Thu Dec 19, 2024 7:57 pm
Multi combinator setups
Now to some more complex setups with 2 and more combinators.
Memory cell
Store an arbitrary signal composition.
One combinator passes the incoming signals if the set condition is true, the other one passes the output via loopback as long as the set condition is false. Both combined create a memory cell: either the first combinator sends the outgoing signal or the second one.
The given example stores the incoming signal on red while S<>0 on green and holds it as memory while S=0.
This is quite the convoluted little monster but it is the result of studying this example and doing some reading on Wikipedia.
I was having a signal issue with controlling a circuit for vending machine creation (everyone's favorite past time nowadays, the creation of a single machine unit that will spit out everything).

For a flat dependency object this is trivial. For one that isn't you need 2 sets of stars to align: objects in good sorted (which the game thankfully provides) and smooth data flow with memory. You also need a few circuit conditions which I have rigged up to a train and infinite chests which let me obfuscate the really fun jobs of workspace cleanup, because the data flow part was rough.

Of course I do this because I like space platforms, and while I can't rain down cargo pods on arbitrary objects like I should be able to (the biters want bioflux and banana) I can make everything that doesn't take unobtanium like rare earth metals and common stones basically infinite. I also made a mechanically intensive priority queue which I think I can improve dramatically.

Wikipedia noted that you can have a master slave memory cell and that got me excited! You basically just have to have one memory cell feed into another. I then have an enable condition control one part of the cell, and a master condition control the other. The enable driven cell can performs reads whenever it sees an enable, in the example provided it is on a 2 tick period that repeats every 1/6th of a second.

This turned out to be the part that was easy to solve but required practical testing, just using a constant combinator destablizes the memory output and you get a machine that doesn't know what it is doing (and inventory flying everywhere) when recipes need to change.

The hard part was figuring out the various conditions when to raise the master flag that is on a constant combinator - the reset flag is raised at the end of the job. So the slave just grabs whatever input it sees, which could be say, a yellow inserter, when it is enabled by the timer so it has something solid. The master then decides whether or not to pass that information on to based on what it knows - and if it is holding a value it continues to broadcast it.

Done properly a machine will start building red inserters while it can from an assembly line of components, but when it runs out of a logistic item it flips around and begins making those. Once it is done, because the game has things in a sorted order it will restock its supply of a dependent item to the maximum value.
Screenshot 2025-03-16 210022.jpg
Screenshot 2025-03-16 210022.jpg (38.22 KiB) Viewed 300 times



And about that operations stack.

I realized I could do it in ten minutes.
Screenshot 2025-03-16 210339.jpg
Screenshot 2025-03-16 210339.jpg (45.96 KiB) Viewed 300 times
Also that you can count inputs with a single decider combinator. The alternative option is to use an advanced circuit.

Anyways -> with a table of priorities and a table of quantities and an inventory (a combinator pretending to be a space platform).
Get the count of all items. When an item is greater than a quantity, output negative 1 (I think they just changed the circuit to output a constant).
When the stack index p matches the priority in the table, output the item associated with that index.




That was pretty fun but I thought to myself: "Well can you do better?" An obvious disadvantage is that if things are done out of order, as they often are, the stack priority breaks. Say you use rare beacons you just built.
Screenshot 2025-03-16 211216.jpg
Screenshot 2025-03-16 211216.jpg (58.65 KiB) Viewed 300 times


So this last one uses a select switch. The main difference from the previous priority mapping blueprint is that select is not being done on the basis of "most available" but rather "what I'd like done first". It also outputs the internal priority assigned - which might not be preferable overall. This can be fixed by reading anything and outputting 1 of anything on a trivial circuit. This lets you break the predefined game order, which can be important with quality targeting systems: what do you like more, crushers or asteroid collectors? Or do you have spacious cargo? This ought to let you choose. My original design took... many individual circuits to do this.

But with a simple modification it selects the item with the highest priority with a count that is less than that of a monitored inventory.

It's been some time. So if I've missed my mark, I did try and do a check to make sure these are novel. They definitely use circuits that have been done.
mmmPI
Smart Inserter
Smart Inserter
Posts: 4156
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Combinator cookbook 2.0

Post by mmmPI »

I have searched on the forum but didn't found a 2.0 blueprint for a trigger Schmitt so i'm posting it here, it was made from this one : viewtopic.php?p=189046#p189046
snip.png
snip.png (36.41 KiB) Viewed 101 times


Uses a upper bound and a range to then define the lower bound.
From a set of different fluid as input on the constant combinator, can be arbitrary.
Lit the lamp when a fluid is at the upper bound.
Untill it drop under the lower bound.
Or turn off the lamp if no fluid is available.
SuperBananaBomb
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu May 07, 2020 9:50 pm
Contact:

Re: Combinator cookbook 2.0

Post by SuperBananaBomb »

Alternative way to "Include only filtered items".


Attachments
04-13-2025, 18-53-25.png
04-13-2025, 18-53-25.png (259.83 KiB) Viewed 46 times
Post Reply

Return to “Show your Creations”