Crafting Combinator


Includes combinators that allow you to set or read the recipe of any crafting machine, get ingredients or products of a recipe and more!

Content
2 years ago
0.14 - 1.1
18.8K
Manufacturing

g Skip Unavailable Recipes

3 years ago

The combinator picks the signal with the largest value, which simplifies things, but it would be great if it would skip those recipes that are not yet available due to lack of research.

3 years ago

Sadly, this is not going to happen for the same reason skipping recipes unsupported by the current machine won't: It would make caching the selected signal value using lamps impossible, meaning I'd have to do the entire process of selecting the signal every update, which would be very ups intensive.

3 years ago

Clever. Any ideas on how I can add/remove signals in the general circuit network based on whether a tech has been researched?

3 years ago

To answer my own question, this seems to work: Use the "find recipes" option of the desired output. If the tech is researched, the recipe will appear. If not, then not.

2 years ago

I am running into the same issue. However the "find recipes" option only works for 1 signal. I can put 1 signal into a crafting combinator that is configured to "find recipes". It will either output a recipe or not based on if I have the research. If I add two signals to the recipe combinator input, then it chooses a single input signal and outputs that recipe (or nothing if it hasn't been researched). To get around this I could use 20 different recipe combinators with 20 different constant combinators to filter 20 signals for those that can currently be crafted.

Instead of using 1 recipe combinator per signal, is it possible to use 1 for all signals?

2 years ago

In some cases, one particular recipe indicates a specific level of science research which in turn indicates that many different recipes are available. In my Angel/Bob factory, a single combinator lets me know if all the advanced sludge crystallization recipes are available.

2 years ago

You wouldn't have to invalidate the cache every tick, just every research event...

2 years ago

For the record: The problem with caching signals is not that I would have to invalidate too often, but rather that it's just not possible to cache at all. The way it works currently is that once I complete an update, I set up some hidden lamps with circuit conditions, such that I can tell if the highest signal changed since last time just by checking if the lamps are enabled or not. I can't see a way to do something similar that would be able to ignore certain signals... At least not without using way too many lamps.

Important to note here is that the main thing I'm trying to avoid is reading signals from the network - api calls are incredibly slow and so simply checking if two lamps are enabled is far better than getting all the signals from two networks and doing the logic in lua. At least that was the case last time I checked, which was admittedly quite a long time ago.

New response