New special signal "self" for pumps

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

New special signal "self" for pumps

Post by mrvn »

TL;DR
It should be possible to set a circuit condition involving the fluid the pump is allowed to pump.
What ?
When setting the circuit condition for a pump 2 special signals are available: "Everything" and "Anything". My suggestion is to add a third option "self".
The "self" signal would match whatever liquid the pump is set to by the anti-fluid-mixing logic.

Note: If no filter is set the "self" signal should behave like "Everything" but filtered for fluids. Maybe "fluid" is a better name for the special signal.
Why ?
Playing with mods like Angels and Bobs there are a lot of different fluids and transporting them by train becomes much more common than in vanilla. But as soon as one has fluid stations with more than one fluid wagon the issue of balancing the buffer tanks arises. To balance the tanks one has to place pumps and circuit control them using for example "oxygen < 100". All the pumps in every train station will have the same circuit condition but for each station the fluid needs to be set to match the one being transported. When using LTN the pumps loading the fluids may need to be controlled as well, especially on stations handling multiple fluids. Again the circuit condition for each pump is the same, for example "oxygen != 0" except the fluid always changes. This becomes tedious and it is easy to skip a pump when re-programing them for a new station.

In 0.17 factorio added the anti-fluid-mixing system. So now the pumps have a filtered fluid box set so they never mix fluids. This allows some new train station designs like this:
multi-fluid-station.png
multi-fluid-station.png (1 MiB) Viewed 2099 times
For steam only the bottom pumps engage and for water only the top pumps because the pumps won't accept the wrong fluid.

If the pumps had a "self" signal that would match whatever the fluid filter is set to then fluid train stations could be programmed to "self < 100" or "self != 0" and automatically adjust to whatever fluid is being transported. There would be no need to reprogram every pump after blueprinting a new fluid station and accidentally skipping a pump would not be a risk.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: New special signal "self" for pumps

Post by darkfrei »

Maybe "same" signal?

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2633
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: New special signal "self" for pumps

Post by steinio »

Use a arythmetic combinator to route fluid +0 = signal A and set all pumps to A.
So you need to change only the combinator...
Image

Transport Belt Repair Man

View unread Posts

mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: New special signal "self" for pumps

Post by mrvn »

steinio wrote:
Sun Jun 23, 2019 11:36 am
Use a arythmetic combinator to route fluid +0 = signal A and set all pumps to A.
So you need to change only the combinator...
That doesn't work for balancing as each pump will be connected to an individual tank. You would have to add an arithmetic combinator per tank and you're right back changing as many arithmetic combinators as you would pumps.

csduff
Fast Inserter
Fast Inserter
Posts: 110
Joined: Thu Nov 22, 2018 3:42 pm
Contact:

Re: New special signal "self" for pumps

Post by csduff »

If I'm understanding correctly, it sounds like you would like a filter option. This may be more suited to what you want. The only question would be if this would be compatible with the current fluid system, specifically not being able to mix fluids.

mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: New special signal "self" for pumps

Post by mrvn »

csduff wrote:
Mon Jun 24, 2019 2:32 pm
If I'm understanding correctly, it sounds like you would like a filter option. This may be more suited to what you want. The only question would be if this would be compatible with the current fluid system, specifically not being able to mix fluids.
No, this is about the circuit network. The pump already has an automatic filter if a) there is any fluid in the system or b) it connects to anything with a fluid filter (like a chem lab).

csduff
Fast Inserter
Fast Inserter
Posts: 110
Joined: Thu Nov 22, 2018 3:42 pm
Contact:

Re: New special signal "self" for pumps

Post by csduff »

mrvn wrote:
Wed Jun 26, 2019 11:38 pm
csduff wrote:
Mon Jun 24, 2019 2:32 pm
If I'm understanding correctly, it sounds like you would like a filter option. This may be more suited to what you want. The only question would be if this would be compatible with the current fluid system, specifically not being able to mix fluids.
No, this is about the circuit network. The pump already has an automatic filter if a) there is any fluid in the system or b) it connects to anything with a fluid filter (like a chem lab).
Yeah, I thought of that a while after posting. I suppose I don't really understand what benefit this "self" feature would add that can't effortlessly be replicated with circuiting.

mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: New special signal "self" for pumps

Post by mrvn »

csduff wrote:
Thu Jun 27, 2019 12:48 pm
mrvn wrote:
Wed Jun 26, 2019 11:38 pm
csduff wrote:
Mon Jun 24, 2019 2:32 pm
If I'm understanding correctly, it sounds like you would like a filter option. This may be more suited to what you want. The only question would be if this would be compatible with the current fluid system, specifically not being able to mix fluids.
No, this is about the circuit network. The pump already has an automatic filter if a) there is any fluid in the system or b) it connects to anything with a fluid filter (like a chem lab).
Yeah, I thought of that a while after posting. I suppose I don't really understand what benefit this "self" feature would add that can't effortlessly be replicated with circuiting.
At the train station all tanks are connected with a green wire to a arithmetic combinator set to "each / -4 = each" (for 4 tanks). The output of the arithmetic combinator is connected to the 4 pumps filling the tanks again with a green wire. Every pump is also connected to the respective tank with a red wire. The pump then gets the difference of the respective tank to the average of all tanks. Programing the pump to "Hydrogen < 100" means that each tank can only be filled 100 units more than the average and then the pump shuts down. This ensures that all 4 tanks are equally filled. The station activates when it has >50k hydrogen and when the train arrives both fluid wagons will be filled with 25k hydrogen each (12.5k from each tank). If the tanks are unbalanced then there might be 50k in the first 2 tanks and 0 in the others and an arriving train would be stuck because the second fluid car won't become full.

With the "self" signal the pumps could be programmed to "self < 100" and the same blueprint would work for any fluid station regardless which fluid is to be pumped.

User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 883
Joined: Wed Jul 12, 2017 5:45 pm
Contact:

Re: New special signal "self" for pumps

Post by Oktokolo »

Beware, that in the original example, the filters on the pumps might vanish if the fluid system becomes completely empty.
To properly abuse the fluid mixing prevention system for stations wich do not actually use the fluid, you have to add a dummy fluid provider/consumer with the right recipe set and connected to the fluid network on the right input/output. The dummy does not have to powered though.

I would like a more proper solution: Make fluid network's assigned fluid type switchable by circuit network in some way.
Example: Set all pumps to off, set drain pump on, set drain pump to off after pipes are empty, set one of the input pumps connected to different fluids to on to fill network with (and assign a) new fluid. Fluid mixing prevention could still prevent enabling of multiple pumps connecting to different fluids (but does not have to as i am also able to handle that myself).

I don't expect that to be modable because the fluid mixing prevention is part of the engine and does in its current overprotective form even prevent me from connecting the water network to refineries before they have been switched to the advanced oil processing recipe.

mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: New special signal "self" for pumps

Post by mrvn »

Oktokolo wrote:
Thu Jul 11, 2019 1:59 am
Beware, that in the original example, the filters on the pumps might vanish if the fluid system becomes completely empty.
To properly abuse the fluid mixing prevention system for stations wich do not actually use the fluid, you have to add a dummy fluid provider/consumer with the right recipe set and connected to the fluid network on the right input/output. The dummy does not have to powered though.

I would like a more proper solution: Make fluid network's assigned fluid type switchable by circuit network in some way.
Example: Set all pumps to off, set drain pump on, set drain pump to off after pipes are empty, set one of the input pumps connected to different fluids to on to fill network with (and assign a) new fluid. Fluid mixing prevention could still prevent enabling of multiple pumps connecting to different fluids (but does not have to as i am also able to handle that myself).

I don't expect that to be modable because the fluid mixing prevention is part of the engine and does in its current overprotective form even prevent me from connecting the water network to refineries before they have been switched to the advanced oil processing recipe.
That is a different issue. Please open your own feature request for that.

User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 883
Joined: Wed Jul 12, 2017 5:45 pm
Contact:

Re: New special signal "self" for pumps

Post by Oktokolo »

mrvn wrote:
Thu Jul 11, 2019 10:06 am
That is a different issue. Please open your own feature request for that.
Good point. Less restrictive fluid mixing prevention

Post Reply

Return to “Ideas and Suggestions”