Is it possible to read recipe and contents from a machine *separately*?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
pf_moore
Inserter
Inserter
Posts: 21
Joined: Wed Jun 04, 2014 7:03 pm
Contact:

Is it possible to read recipe and contents from a machine *separately*?

Post by pf_moore »

I'm trying to manage my biter eggs, so I want to see how many crafts my production module assembler can craft, and request precisely that many eggs.

I can do this with two assemblers - from one (a dummy), I read the recipe, and from the other (the actual crafter) I read the contents. The I divide contents by recipe (arithmetic combinator), take the minimum (selector combinator), and convert it to egg requests (arithmetic combinator). But that extra assembler is a problem - in terms of the wasted machine, the space needed, and the fact that I need to set the recipe twice.

Is it possible to read both the recipe and the contents from one assembler, but keep them distinct (have one on a red wire and the other on a green wire)? I couldn't find a way, unfortunately. Or alternatively, is there another way of getting the recipe for an item *without* setting it in an assembler and reading it from there?

I could of course, just hard code the recipe into a combinator, but if I do that I can't copy the construction for the various qualities, without a bunch of work. Which I'll do if I have to, but I'm lazy :)
NineNine
Filter Inserter
Filter Inserter
Posts: 555
Joined: Mon Oct 24, 2022 11:20 pm
Contact:

Re: Is it possible to read recipe and contents from a machine *separately*?

Post by NineNine »

No, not right now, it isn't: 117032
pf_moore
Inserter
Inserter
Posts: 21
Joined: Wed Jun 04, 2014 7:03 pm
Contact:

Re: Is it possible to read recipe and contents from a machine *separately*?

Post by pf_moore »

Ah, cool, thanks. I'll try to do it with a parametrised blueprint - I think the p0_i1 style variables might be a possibility here, although when I tried earlier I got *very* confused.
NineNine
Filter Inserter
Filter Inserter
Posts: 555
Joined: Mon Oct 24, 2022 11:20 pm
Contact:

Re: Is it possible to read recipe and contents from a machine *separately*?

Post by NineNine »

I ran into this problem too, but I ended up working around it. I honestly don't remember what it was, but it had something to do with nutrients that were an ingredient (and a fuel).
eugenekay
Smart Inserter
Smart Inserter
Posts: 1072
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: Is it possible to read recipe and contents from a machine *separately*?

Post by eugenekay »

Yes, but also No:
Screenshot 2025-03-22 114803.png
Screenshot 2025-03-22 114803.png (906.92 KiB) Viewed 2081 times


Introducing.... the Unpossible Crafter! Basic operating idea, see also the Description of each Combinator inside the Blueprint:
  • When the Memory Cell is empty, waits for a Read Ingredients Input signal
  • Stores this Input Signal on the Red Wire on the pole
  • Listens for the Read Contents (without Include in Crafting, adjust to taste) signal
  • Subtracts the stored Ingredients to obtain Current Contents as the Green Wire on the Pole
  • Selector Combinators setup Inserter Filters to ensure the Machine is only loaded once the Circuit is ready.
  • If the Input Signal goes to zero (Recipe was Unset), or has different Items from the Ingredients (Recipe Changed) then the Memory Cell is cleared
I hope this helps!
Tertius
Smart Inserter
Smart Inserter
Posts: 1665
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Is it possible to read recipe and contents from a machine *separately*?

Post by Tertius »

eugenekay wrote: Sat Mar 22, 2025 3:54 pm the Unpossible Crafter!
Impossible Crafter.

As far as I understand, it reads the signal from the assembler and uses the fact the first tick the recipe is set the assembler is still empty and just outputs the recipe ingredients. This signal is stored independently and subtracted from later readings to continuously reconstruct the actual assembler content. Nice idea!
eugenekay
Smart Inserter
Smart Inserter
Posts: 1072
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: Is it possible to read recipe and contents from a machine *separately*?

Post by eugenekay »

Tertius wrote: Sat Mar 22, 2025 5:51 pm
eugenekay wrote: Sat Mar 22, 2025 3:54 pm the Unpossible Crafter!
Impossible Crafter.

As far as I understand, it reads the signal from the assembler and uses the fact the first tick the recipe is set the assembler is still empty and just outputs the recipe ingredients. This signal is stored independently and subtracted from later readings to continuously reconstruct the actual assembler content. Nice idea!
UnPossible - I made it; I get to name it. :D

Yes, it uses the "First Tick Output" when first-stamped down to fill the Memory Combinator. However, this alone is not reliable! You need to set the Inserter Filters based upon the Ingredients Signal alone (optionally using Selector Combinators to split the ingredients, for throughput). If you do not, then changing Recipes will break the setup - Items can get inserted before the Memory Combinator has Reset/ReFilled.... so you'll get a slightly-wrong Ingredient Count.

Off-by-one errors matter when trying to count Eggs. :twisted:
Robro0625
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Dec 21, 2025 1:01 am
Contact:

Re: Is it possible to read recipe and contents from a machine *separately*?

Post by Robro0625 »

Have 2 relevant blueprints to share
These are mainly for people who find themselves here after a google search since the original question is quite old.
The Unpossible assembler but compacted (3 assemblers vs 5)
I embedded the clearing mechanism into the memory cell directly Making it a bit smaller.


The Automall storage doohicky
This one works by reading the inserters attached to the assembler and reading the assembler itself to check when its done crafting to remove the ingredients from the cache.
This uses 4 combinators (3 if you're willing to put up with the negated memory cell which may be beneficial. i.e in my use case I wanted something to stop my automall from storing hundreds of extra ingredients in the assembler, and I can subtract the stored value by just mixing the wires)
It can handle changing recipes however productivity modules will break it, as will productivity in general.
I Attached a bunch of these to my automall and except for some issues at the start from improper setup they haven't broken yet.
Edit: they now have see below


Edit: So there is a bug, Basically when a dynamically assigned recipe stops being assigned mid-craft the assembler doesn't output the recipe the same tick as the finish signal so I added another combinator to fix it basically it just delays the recipe by one tick and gives it to the other combinator that checks if the assembler is finished.
Fixed blue print:
Post Reply

Return to “Gameplay Help”