Page 1 of 1

Setting assembler recipes should retain valid ingredients

Posted: Sat Nov 09, 2024 6:48 am
by spacedog
I thought I'd be clever and set up a single assembler to switch between making pipes and iron gears, to direct insert into a couple of engine assemblers. I mean, both recipes only take iron plates, so this should have been a piece of cake, right? Right??

Yeah, like 30 minutes and half a dozen combinators later, I basically gave up and precision-clocked the entire circuit so it would work correctly. And then I kind of felt like the whole thing was dumb to do in the first place. :(

It's fine that switching recipes shoves all the buffered inputs into the output slots, but if the new recipe can make use of any of those ingredients IMO they should just be left in the input slots. I know, the number of recipes with this kind of overlap is probably small, but still... that has to be an easy change.

Re: Setting assembler recipes should retain valid ingredients

Posted: Sat Nov 09, 2024 12:52 pm
by Koub
For completeness, a loosely related suggestion here : viewtopic.php?f=6&t=118708 (about how changing a recipe on an assembler via circuitry should be handled from an ingredient standpoint).

Set recipe should not trash resources used by new recipe

Posted: Mon Nov 11, 2024 10:47 pm
by JOndra91
TL;DR
Using circuit "set recipe" should not trash resources that are used by new recipe.
Why?
Pumpjack, Chemical plant and Oil refinery have quite similar resource demands. The common ones are Steel plate, Iron gear wheel, Electronic circuit and Pipe.
These are used in different amounts by all the recipes. Oil refinery additionally requires a Stone brick.

So this seemed like a nice opportunity to save some space and have fun with circuits, since these are not generally needed in huge amounts. So with 3 arithmetic combinators and selector combinator I made a circuit to switch between these three recipes, based on which ever items is the least and less than certain amount.

I expected only bricks to be unloaded when switching from Oil refinery, which could be easily handled by a single bot, but instead every ingredient has to unloaded, only to be loaded up again.

Re: Set recipe should not trash resources used by new recipe

Posted: Tue Nov 12, 2024 12:02 am
by spacedog
See viewtopic.php?f=6&t=120527, viewtopic.php?f=6&t=118708, and the associated bug reports linked from the second one.

I don't think I've seen a single person disagree with this though. It used to work this way, then got changed to fix a design bug. But the resulting change was a pretty blunt fix for the bug, and IMO caused a usability regression for this feature.

I think the devs need to decide how much friction they want players to encounter when using this feature. It used to be something you could get running with a single combinator, and no extra belts/inserters/chests. Now it's a lot more complicated, both in terms of the required circuitry and the supporting infrastructure. I feel like it will see a lot less use as a result, which is a shame, because it was a nice addition to the game.

Re: Setting assembler recipes should retain valid ingredients

Posted: Tue Nov 12, 2024 12:44 pm
by Koub
[Koub] Merged into an older thread with the same suggestion.

Re: Setting assembler recipes should retain valid ingredients

Posted: Wed Nov 13, 2024 5:40 pm
by swecker
The other post discusses reusing trash slot items, but in case that's not feasible; I think it's important to have this topic around, because not moving ingredients to the trash slot in the first place would solve a lot.
I don't mind having to deal with extraneous ingredients when switching recipes, but having to reset everything when switching between identical recipes makes it more cumbersome than it would ever be worth.

Re: Setting assembler recipes should retain valid ingredients

Posted: Sat Dec 07, 2024 8:55 pm
by Jouster500
Would like to see this implemented. Offhand, here is a list of recipes which the ingredients are shared 1:1.
  • Inserters, Assemblers, Mining Drills = Iron plates, Gears, and Greens
  • All level 1 modules = Greens and Reds
  • Active, Passive, Storage, Buffer, and Requester chests = Reds, Greens, and steel chests.
  • Iron Chest, Pipes, Gears, Iron sticks = iron plates
  • Rail and Chain Rail signals = Iron and greens
  • Decider, Arithmetic, and Constant combinators = Cable and Greens
  • Lamps and power switches = Cable, Greens, and iron plates
  • Medium/Large electric poles = Cable, iron sticks, and steel plates.
There are higher degrees of overlap if you consider recipes that are incomplete subsets. For example, repair packs could be made in the inserters/assemblers/mining drills assembler since it shares 2/3 ingredients.

The reason this QOL is important is because it reduces the combinator complexity required to implement assembler switching. Take the following blueprint;


This blueprint is a design of mine that uses 9 combinators to
  • Produce the item that is most in demand, and lock until item completes production to prevent switching mid construction.
  • Only insert with the exact ingredients to avoid having to remove any stockpiled ingredients.
All without the aid of logistics bots. 7 combinators are dedicated to the second bullet point, as I optimized it to swing with as many items as possible in order to make up for lost time due to not being able to overstuff. The other approach to this problem is to do the items in batches which is just as complicated for new comers to circuits.

Allowing the assembler switching to retain valid ingredients from previous recipes helps mitigate this complexity while simultaneously making an assembler more active as it would be allowed to overstuff and when the assembler switches, the ingredients just simply stay where they are. The list of items that share ingredients perfectly is small, but on still very important items that it would be enough for anyone to at least consider giving it a try, circuit background or not.