Liquid voiding on automatic recipe change
-
- Burner Inserter
- Posts: 5
- Joined: Sun Mar 07, 2021 8:45 am
- Contact:
Liquid voiding on automatic recipe change
When a recipe with a liquid component is changed, for instance when the EM plant changes from normal quality to rare quality processing units as below, while the item components are stored in a temporary slot to be removed, the liquid component gets voided. I assume this is an intended feature and not a bug, hence I'm writing on this forum. For big builds including automatic recipe selection this causes a disproportionately massive amount of fluid to be consumed due to the massive buffer amount kept in each machine.
In the case above, the EM plant consumes 1.87 sulfuric acid/s, this means that if the recipe is changed every 30 seconds, the lost 400 units would equate to a sulfuric acid usage of 13 /s, which is more than a seven fold increase in usage
In the case above, the EM plant consumes 1.87 sulfuric acid/s, this means that if the recipe is changed every 30 seconds, the lost 400 units would equate to a sulfuric acid usage of 13 /s, which is more than a seven fold increase in usage
Last edited by BBBBSammich on Fri Jan 17, 2025 10:04 am, edited 1 time in total.
-
- Burner Inserter
- Posts: 5
- Joined: Sun Mar 07, 2021 8:45 am
- Contact:
Re: Liquid voiding on automatic recipe change
The suggested fix is to either, output the fluid to the attached pipeline, or to drastically reduce the fluid buffer according to the speed of the recipe, similarly to the way requests are set when copied from a machine, as in the mentioned setup enough fluid is buffer for over 200 seconds of continuous production.
Re: Liquid voiding on automatic recipe change
The liquid isn't voided. It's given back to the pipe the production machine is connected to. It's given back just before the fluid input into the machine vanishes, in case you're switching to a recipe without liquids.
At least it's given back as long as the pipe isn't 100% full and has space for the recycled fluid. If you use the map editor in single step mode and inspect pipe content right after a recipe change, you will see there's 400 more fluid in the pipes if the visible fluid ingredient was 400.
It might be given back even if the pipe segment is full, since there is one or even more hidden invisible fluid buffers within production machines where fluids could be stored temporarily. I didn't investigate this completely, but you can deduct the presence of these buffers from fluid generating recipes (for example refinery) and the output pipe segment gets full. The refinery doesn't immediately stall when its output is full - it stalls when it completed a recipe and is about to output the result of the recipe, and it cannot, since the output is full. The output of that recipe is visible nowhere, but it's present, since the output stays full even if fluid is extracted further down the pipe until that hidden recipe output fully went into the visible output buffer.
At least it's given back as long as the pipe isn't 100% full and has space for the recycled fluid. If you use the map editor in single step mode and inspect pipe content right after a recipe change, you will see there's 400 more fluid in the pipes if the visible fluid ingredient was 400.
It might be given back even if the pipe segment is full, since there is one or even more hidden invisible fluid buffers within production machines where fluids could be stored temporarily. I didn't investigate this completely, but you can deduct the presence of these buffers from fluid generating recipes (for example refinery) and the output pipe segment gets full. The refinery doesn't immediately stall when its output is full - it stalls when it completed a recipe and is about to output the result of the recipe, and it cannot, since the output is full. The output of that recipe is visible nowhere, but it's present, since the output stays full even if fluid is extracted further down the pipe until that hidden recipe output fully went into the visible output buffer.
-
- Burner Inserter
- Posts: 5
- Joined: Sun Mar 07, 2021 8:45 am
- Contact:
Re: Liquid voiding on automatic recipe change
Yes, you are correct, although the fluid gets voided when the pipe content is 100%. This is still inconsistent compared to items which is where my confusion came from. Why not deadlock the machine if there's no space in the pipeline? This would give more concrete feedback to the player that care should be taken around fluids, in the same way excess items should get special attention on recipe changes. I would definitely not be the last person to have this problem.
-
- Fast Inserter
- Posts: 222
- Joined: Sun Feb 25, 2024 10:23 am
- Contact:
Re: Liquid voiding on automatic recipe change
I completely agree. It also doesn’t help that this opens the door to really easy fluid byproduct voiding. I think the ideal solution would be to simply make the machine ignore the signal if there’s no room in the pipe network. No idea how technically doable this is, but I think it would be good to add.
Re: Liquid voiding on automatic recipe change
So currently if a recipe with fluid is changed, the fluid is ejected back out the way it came in.
If that's not possible, then the fluid is voided.
The suggestion is instead to deadlock the machine if the fluid can't be ejected.
I have two questions:
- If the machine is deadlocked, then how could it be cleared?
- How would deadlocking the machine this way make the game better and more fun?
If that's not possible, then the fluid is voided.
The suggestion is instead to deadlock the machine if the fluid can't be ejected.
I have two questions:
- If the machine is deadlocked, then how could it be cleared?
- How would deadlocking the machine this way make the game better and more fun?
Re: Liquid voiding on automatic recipe change
Getting rid of the voiding would affect manually changing recipes need that also void the fluid. If you pick up an entity should the fluid be barreled first?
Flicker voiding is unfortunate but also for me an acceptable trade off for simplicity. If the amounts are truly a concern then put a tank in the pipeline and stop pumping in once it reaches an amount.
Flicker voiding is unfortunate but also for me an acceptable trade off for simplicity. If the amounts are truly a concern then put a tank in the pipeline and stop pumping in once it reaches an amount.
-
- Burner Inserter
- Posts: 5
- Joined: Sun Mar 07, 2021 8:45 am
- Contact:
Re: Liquid voiding on automatic recipe change
The fluid should leave the machine as a product would. The player would have to make sure there is space available in the fluid system.Kyralessa wrote: Fri Jan 17, 2025 5:37 pm - If the machine is deadlocked, then how could it be cleared?
It would notify the player of an error in their setup. Also doing rate calculations when fluids are randomly voided for no apparent reason would be impossible, which defeats the purpose of the game.Kyralessa wrote: Fri Jan 17, 2025 5:37 pm - How would deadlocking the machine this way make the game better and more fun?
-
- Burner Inserter
- Posts: 5
- Joined: Sun Mar 07, 2021 8:45 am
- Contact:
Re: Liquid voiding on automatic recipe change
Good point, this brings up an interesting dichotomy. The question is then whether a distinction should be made between hand switching and circuit switching. In my biased opinion, the whole point of circuit switching is for more automation in setups, especially when it comes to quality (I think the whole reason for the added combinator features). In contrast hand switching is a one time setup, where 400 voided units wouldn't make a difference. But as soon as a recipe gets changed every 10 seconds, the lost fluid way oversteps just normal usage. Either way, something has to be done.dmikalova wrote: Fri Jan 17, 2025 6:50 pm Getting rid of the voiding would affect manually changing recipes need that also void the fluid. If you pick up an entity should the fluid be barreled first?
Re: Liquid voiding on automatic recipe change
Yeah the code could be set up to handle manual vs automated. But also nothing necessarily has to be done. The only fundamental issue is a player choosing to "cheat" by voiding fluids - which in vanilla has other legit alternatives like recycling excess ice, and in mods like pyanodons you get fluid voiders.BBBBSammich wrote: Fri Jan 17, 2025 7:07 pmGood point, this brings up an interesting dichotomy. The question is then whether a distinction should be made between hand switching and circuit switching. In my biased opinion, the whole point of circuit switching is for more automation in setups, especially when it comes to quality (I think the whole reason for the added combinator features). In contrast hand switching is a one time setup, where 400 voided units wouldn't make a difference. But as soon as a recipe gets changed every 10 seconds, the lost fluid way oversteps just normal usage. Either way, something has to be done.dmikalova wrote: Fri Jan 17, 2025 6:50 pm Getting rid of the voiding would affect manually changing recipes need that also void the fluid. If you pick up an entity should the fluid be barreled first?
Re: Liquid voiding on automatic recipe change
Compare with the error message and sound you get when you try to place a pipe that would mix fluids. But in that case it's obvious what the issue is: Don't put a pipe there, and don't mix fluids. (And technically you can put the pipe there anyway if you insist, by using a bot to do it.)BBBBSammich wrote: Fri Jan 17, 2025 6:58 pm It would notify the player of an error in their setup. Also doing rate calculations when fluids are randomly voided for no apparent reason would be impossible, which defeats the purpose of the game.
Let's suppose the game does the same thing if you try to change the recipe on an assembly machine without having a means of piping out the excess fluid: An error message and an error sound.
Suppose I've already picked up all the pipes nearby because I want to change to a recipe without any fluid. Now the game says I can't change the recipe without those pipes. So I have to put them back?
OK, let's suppose I put the pipes back so the fluid can flow out. But now the fluid still exists; it's just in the pipes instead of the machine. Now I can change my recipe, but what happens to the pipes?
Am I allowed to delete them? But then I'm still voiding the fluid, just with an extra step.
If I'm not allowed to delete them due to the same fluid-voiding restriction, then this fluid has become an unwelcome guest in my factory. How can I get rid of it if I just plain don't want it? There's no "spill it on the ground" mechanism.
Or we could argue that that's exactly what fluid-voiding is: It's spilling the fluid on the ground. Would it be more palatable if it made a puddle that gradually evaporated?
Re: Liquid voiding on automatic recipe change
You need to make sure there is space for some fluid before a recipe change that will flush out fluids. You can automate this already, of course.BBBBSammich wrote: Fri Jan 17, 2025 7:07 pm But as soon as a recipe gets changed every 10 seconds, the lost fluid way oversteps just normal usage. Either way, something has to be done.
If you just connect one and the same fluid to your machines, add a storage tank to the fluid segment in front of your machines. Connect this with a wire to read the fluid contents. Connect this with the pump that's feeding this pipe segment and set the pump to enable only if fluid < 20000. This way you limit fluid fill state and always have 5000 space for any flushed fluid.
If you have a setup where you dynamically change fluids, you're familiar with exchanging fluids in the pipe segment in front of your machines. You have one pump for every fluid to pump the wanted fluid into the segment, and one pump for every fluid to recycle unwanted fluids back to their origin. Now you just need to make sure you activate the recycling pumps a few ticks before you initiate recipe change, so some space is created for the machine to flush the fluid into. One pump does 1200/s, this is 1200/60 = 20 per tick. So if you need to flush 400 fluid, you need to activate the recycling pump 400 / 20 = 20 ticks before you initiate the recipe change.