Factorio

Factorio

View Stats:
"Set recipe" is ridiculous
Can someone show a complete example of how to successfully use the set recipe feature to switch from one recipe to another based on a circuit condition? No matter what I've tried, the system always ends in a locked state, where the new recipe code is on the wire, but will not set for reasons that cannot be addressed easily (like: products of old recipe still in assembler and for some reason do not auto-empty the way they do when you manually set the recipe, like: the inserter inserting ingredients of the old recipe keeps the buffer full and therefore it never "finishes" the old recipe, like: phase of the moon / evident non-determinism...)

Is this just broken or is there a easy way to do this that I'm overlooking (preferably one that does not involve connecting literally everything connected to machine to a circuit logic)? Can someone post a working blueprint?
Last edited by Rogue Zamboni; Dec 2, 2024 @ 11:58am
< >
Showing 1-15 of 29 comments
Rogue Zamboni Dec 2, 2024 @ 11:58am 
On a related note, are there defined semantics for using the "set" commands in the assemblers / producers along with the "read" commands? How does that even work? Ideally I'd like to set from one color wire, and read onto another, but the interface does not let us specify that. It's /especially bad and crazy when the name of the recipe is exactly the product it produces or worse an ingredient it requires and you're trying to read ingredients as well as set recipe/!
Last edited by Rogue Zamboni; Dec 2, 2024 @ 11:58am
Simon Dec 2, 2024 @ 12:04pm 
It's terribly limited by design. As usual, Wube wants Factorio to be a puzzle game, so they don't add the obvious things that would make tools too useful. For set recipe it's extremely confusing and limited due to the fact that you can't separate signals by channels, so you're forced to deal with a mixed input/output signal, which means you can't really do anything too magical without a lot of tinkering, and need to pick a particular reason to use signals, instead of using all features at once.

No idea if they'll ever fix it, but I've not really bothered with using set recipe ever since I first tried using it. The thing is extremely annoying and not fun to use.
Last edited by Simon; Dec 2, 2024 @ 12:07pm
Rogue Zamboni Dec 2, 2024 @ 12:07pm 
Originally posted by Simon:
For set recipe it's extremely confusing and limited

Ok, but is it actually possible to use? And if so, can you show a blueprint?

(It honestly feels less like "this is a puzzle!" and more like "we threw this in and didn't test/think about it at all", though.... no other part of the game is or has ever felt totally broken like this - with the one minor exception of the way bends in belts worked way, way, back in the early days, maybe...)
Last edited by Rogue Zamboni; Dec 2, 2024 @ 12:10pm
kremlin Dec 2, 2024 @ 12:11pm 
The reason the assemblers don't automatically empty when you set the recipe with a circuit is that there's nowhere to empty them to. When you manually set a recipe you pick up those items. An inserter should be able to remove them and then the set recipe signal will work.
Rogue Zamboni Dec 2, 2024 @ 12:12pm 
Originally posted by Simon:
forced to deal with a mixed input/output signal

...implying that a partial answer to my question to "how does this work" is that the output and input signals are simply combined on both channels (ie. you will always "read" anything you "write"/"set". This would make "set recipe" categorically incompatible with "read contents", and also appears empirically to not be the case? But what are the actual rules/mechanics?
Last edited by Rogue Zamboni; Dec 2, 2024 @ 12:12pm
Defektiv Dec 2, 2024 @ 12:12pm 
Make sure you have an unfiltered inserter pulling out of the assembler to a storage container or the cargo bay and it should automatically pull the old ingredients out of the assembler when you switch recipes. This blueprint has a ship in it called Starter Planet Express that does a pretty good job of providing some basic loops for swapping out recipes and buffering materials. I've only found one condition really where it kind of gets hung up due to carbon and sulpher being bottlenecked into the same inserter. There's also some more complex ships in there that scale up the same operations for larger grids.

https://factorioprints.com/view/-OAOEo9pdmReRKP3Njyi
Simon Dec 2, 2024 @ 12:12pm 
Originally posted by Rogue Zamboni:
Originally posted by Simon:
For set recipe it's extremely confusing and limited

Ok, but is it actually possible to use? And if so, can you show a blueprint?

It's absolutely possible. I've used it in the past, but only to a limited degree. Like I did a thing that switched between particular recipes that have similar ingredients. It was terribly bad though. Don't think I have those blueprints anymore.
Last edited by Simon; Dec 2, 2024 @ 12:15pm
Rogue Zamboni Dec 2, 2024 @ 12:15pm 
Originally posted by kremlin:
The reason the assemblers don't automatically empty when you set the recipe with a circuit is that there's nowhere to empty them to. When you manually set a recipe you pick up those items. An inserter should be able to remove them and then the set recipe signal will work.

There's definitely inserters in my setup that could empty, and they don't. I'm not expecting the products to be magic'd away. It seems like some kind of thing is going on where if they are emptied, then the recipe will instantly change, but it can't change because they're not empty, and they can't empty because it didn't change, etc... this is further complicated by the input inserter inserting new ingredients /in/, which also seems to prevent a set-recipe change?

Again - a working blueprint that changes an assemblers recipe and continues along with the new recipe (with incompatible in/out product recipes) would be worth a thousand words here. Is there one?
Last edited by Rogue Zamboni; Dec 2, 2024 @ 12:34pm
Rogue Zamboni Dec 2, 2024 @ 12:31pm 
Originally posted by Defektiv:
This blueprint has a ship in it called Starter Planet Express that does a pretty good job of providing some basic loops for swapping out recipes and buffering materials.

I don't see any components in Starter Planet Express that set recipe. (There are no production machines connected to the circuit network in any way, and all have manual recipe enabled and set.)

There are components that activate / deactivate (via inserter enable conditions) and thus produce certain recipes at certain times. But this is completely different than what I'm asking about.
Last edited by Rogue Zamboni; Dec 2, 2024 @ 12:36pm
Fel Dec 2, 2024 @ 12:40pm 
You can use "read working" for example, send it to a decider to only send signals to change the recipe when it is not crafting anything.
Similarly, you can read the machine's content to determine the filters for the inserter(s) adding items to the machine if you want it to only be fed a full round of ingredients for example.

By design, nearly all things related to circuit network are meant for advanced users that enjoy fidling with those relatively complex systems, "set recipe" and the other entries for machines are no different.
You can make some pretty interesting stuff with the new changes from 2.0, including the things related to machines (set recipe, read content, read ingredients), things that previously would have required mods to do (usually a mod that auto-deploys blueprints based on circuit network conditions).
But these things are not really "simple" to do for someone with little understanding of circuit network.

One thing that might be important to note is that the signals from the two "read" options are not counted for setting the recipe, so you can use both "read" (one of them) and "set recipe" on the same machine if needed (although using both "read" makes it impossible to determine what quantity comes from which entry).

For example, it is fairly easy to make a machine that switches between iron gear wheels and iron rods based on the lowest amount in the chest (a constant combinator with a signal of 1 for the two items and a selector set to selecting, index 0 ascending sorting), but it will also output leftover materials if you don't make a more complex system.
Lumpous Dec 2, 2024 @ 12:42pm 
You start of with a setup like this:
https://steamcommunity.com/sharedfiles/filedetails/?id=3376745458
Green cable from the roboport to the back of decider combinators and the roboport is set to "Read logistic network contents"
One constant combinator where you set the amount per item you want this contraption to build, conntected to a row of decider combinators back with red cable.

Set a couple of items in the constand combinator with the required quantity.
https://steamcommunity.com/sharedfiles/filedetails/?id=3376745727

For each item from the constant combinator, you build one decider combinator where you now compare the signal per item you choose from the red and green wire.
https://steamcommunity.com/sharedfiles/filedetails/?id=3376745609
if the signal from red wire is less then green wire, give the item as output with a value of 1.

The outputside of the decider combinators goes into a crafting machine, using a green wire, with "set recpie" AND "read ingredients"
https://steamcommunity.com/sharedfiles/filedetails/?id=3376745869


Another green cable goes directly from the machine into one or more requester chests with "Set requests".
I used 2 requester chests just to speed it up a bit. Only 1 also works, but is alot slower.
https://steamcommunity.com/sharedfiles/filedetails/?id=3376745994

if all set items from the constant combinator reached desired levels in the logistics network, the machine will reset and no recipe will be in there to be build.
Given this, all items that are considered "leftover" in the machine will be picked out and placed into the active provider chest - thus clearing the machine completely empty.
Same when a recipe changes - all leftover items will be removed into the same active provider chest.
Lumpous Dec 2, 2024 @ 12:43pm 
And here the BP-String as an example:

Edit: Steam thought it's worth to censor the string -_-
https://nopaste.net/m0Hd9tSJ1D

Last edited by Lumpous; Dec 2, 2024 @ 12:44pm
Rogue Zamboni Dec 2, 2024 @ 12:51pm 
Originally posted by Fel:
You can use "read working" for example, send it to a decider to only send signals to change the recipe when it is not crafting anything.

Ok, I was hoping to have set-recipe work as a sort of interrupt, but this is interesting as well - you're saying explicitly stop the current recipe, then switch? That's super annoying and space wasting for no reason, but might work better...

Originally posted by Fel:
But these things are not really "simple" to do for someone with little understanding of circuit network.

I didn't ask for "simple", and I didn't ask how circuits work, but thanks.

Can you provide a blueprint which demonstrates switching recipes with set-recipe with incompatible in/out or not? I do have a pretty good understanding of how the circuit network operates, with the exception of the weird corner cases / special rules of set-recipe (which are what I'm asking about).
Peez Machine Dec 2, 2024 @ 12:51pm 
Here's a blueprint for one of my auto-factories. It's probably not useful on its own, since it also has to hook into my "work order" system, but it's proof that recipe-by-wire can do all the things you say it can't (including emptying out unused ingredients). When I hook this up to my work order generator, I have a factory that only makes things I need, and only if I can afford to make it -- that calculation uses the "read ingredients" setting, which requires extra care to ensure that signals aren't getting fed back into the assembler (hence the diodes).

0eNrdHNty4jryV1R+OTPnGNYXLoaqOafOTPZk85CkKslWHiYUJbAI2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Y83KECoz7YJfx3THpifHRi2TRdGLowcOx/Cl558jkOnJYet8tWWCWCe6cghPPfk8zZidfOha3bKEQTkaghwloTq4KwjZ7sI5ZVD2IEaOqZrma1iaEuwLu7Lki94OOvKFzycdfJZF2dxj7B9xKCGjtmTr/bwuToY4sGTucUY9rMce8UYttyWa9tINCeft2EelpTzDoxdRQw4PUyqXSF9S/wdnFfHwbMWp4QxIO+YbRz3cK2exOPIvalzOA7COhIWPlzcj12O1Vkcd3lYBEN6yXFLkVHibK+8L7lirYy9YgwQXfU+7t9V+3Rw/5AF5PMA0ZJ7diTHumqtrqKhXY67xbiF8xIWz+4qGXLwvPne8KNgNx4DeWiXYyVIeKQCJ6JDnPJ9pLmr2Ot2Vt6REuLBPEg+RsPY7Fn+bwjTCOiIBRg14bMPul7aATlaCNo4JReg1gABmVgi9b/dcXqtXq/d6jlep2U9PPwfIIvU4g==
Defektiv Dec 2, 2024 @ 4:54pm 
Originally posted by Rogue Zamboni:
Originally posted by Defektiv:
This blueprint has a ship in it called Starter Planet Express that does a pretty good job of providing some basic loops for swapping out recipes and buffering materials.

I don't see any components in Starter Planet Express that set recipe. (There are no production machines connected to the circuit network in any way, and all have manual recipe enabled and set.)

There are components that activate / deactivate (via inserter enable conditions) and thus produce certain recipes at certain times. But this is completely different than what I'm asking about.

You set recipes using circuit logic, like directly with a constant combinator, basic logic using a decider combinator or more advanced using the other combinators. You see it all over that ship if for example you manually set something to be made in the assembler to the right of the cargo bay. For example if you set platforms to be made then the logic will start requesting steel bars and copper wires be made in order to produce them, and molten iron and copper to be made to make those. There is also logic in there that makes sure basic stock of things like sulpher and carbon is available so coal and oil can be made if lubricant is necessary, and then there is logic there to automatically handle asteroid processing for the ore, calcite and ice for water. If you have an assembler set to set recipe, then any combinator that outputs a signal for a certain product to a circuit connected to that assembler will cause it to select the recipe for that product. It works the same for any production facility, assembler, foundry, chemical plant, etc.
Last edited by Defektiv; Dec 2, 2024 @ 5:00pm
< >
Showing 1-15 of 29 comments
Per page: 1530 50