Allow more than one filter on fluid_boxes

Things that we aren't going to implement
Moterius
Inserter
Inserter
Posts: 21
Joined: Wed Jun 07, 2023 7:39 am
Contact:

Allow more than one filter on fluid_boxes

Post by Moterius »

I'm currently working on a mod that has some fluids that, by all accounts, should not be able to flow through 'standard' pipes. For example, I want to add a pneumatic pipe to transport certain 'dry' materials.

Which means i would need to filter out that from the normal pipes.

The issue I've ran into is that a pipe cannot have more than exactly one whitelist filter on it's fluid_box. I've tried using a different entity (assembling machine) because pipes only support one fluid box, but then ran into the issue that fluid_boxes may not collide. I seriously doubt that it is possible to fake a pipe that can only support a specific set of fluids.

Therefore, i would like a filter on the pipes (whitelist and blacklist, ideally -> i can work with one, but it would probably break my logic if other mods add fluids), which works similar to the filter on the fluid_boxes, or ideally a similar filter on the fluid_box property.
User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 474
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: Allow more than one filter on fluid_boxes

Post by Stringweasel »

+1 from me

Related:
viewtopic.php?f=28&t=105271
viewtopic.php?f=28&t=71721
viewtopic.php?f=221&t=55661 - probably most interesting one with links to responses from devs
Alt-F4 Author | Factorio Modder
Probably known for: (Configurable) Valves | Better Victory Screen | Space Spidertron | Fluidic Power
Official Contributor to Space Exploration
Honktown
Smart Inserter
Smart Inserter
Posts: 1060
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Allow more than one filter on fluid_boxes

Post by Honktown »

I had a reverse-form of the idea that works like "fluid categories" (I hadn't seen that one or I would've replied to it!) :
viewtopic.php?f=28&t=109467
Rather than restrict the fluids in the pipes, restrict the pipe connections. In my mind it seems a lot more like what is wanted, without having run-time overhead.
I have mods! I guess!
Link
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 356
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Allow more than one filter on fluid_boxes

Post by protocol_1903 »

+1
Py and PyBlock developer, wielder of LUA in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
User avatar
MrSmoothieHuman
Fast Inserter
Fast Inserter
Posts: 161
Joined: Sat Aug 05, 2023 1:20 am
Contact:

Re: Allow more than one filter on fluid_boxes

Post by MrSmoothieHuman »

+1
coder? i hardly know her!
half a cat
Inserter
Inserter
Posts: 42
Joined: Sun Jul 16, 2023 4:03 pm
Contact:

Re: Allow more than one filter on fluid_boxes

Post by half a cat »

I wanted fluid categories, so I made a mod with an API that's hopefully useful for other mods that define their own entities and fluids. Since I can't prevent fluids from flowing, the mod destroys pipes when they have an incompatible fluid.

I haven't worked with the remote interface before, so there could be bugs in that API.

https://mods.factorio.com/mod/call-plumber
oobanooba
Burner Inserter
Burner Inserter
Posts: 14
Joined: Thu Nov 21, 2024 4:17 pm
Contact:

Re: Allow more than one filter on fluid_boxes

Post by oobanooba »

I desperately need this, ever since 2.0 fluids, I don't see why it shouldn't be possible to have more than one filter on fluid boxes.

I want to make a mechanism which involves fluids that can only be directly inserted, much like the fusion reactor in the space age. Unfortunately, unlike the fusion reactor plasma mechanic, I need to use buildings that can also craft regular fluid recipes. The final solution is adding a special connection to all my machines for unpipable fluids, but that really is awful, and I would hate for it to come to that.

Really hoping the devs reconsider multiple filters on fluid boxes, or at least offer fluid categories as some other option for modders to control which fluids can go where. Hell, even being able to change a fluid connection category based on recipe would work for me.
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 356
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Allow more than one filter on fluid_boxes

Post by protocol_1903 »

oobanooba wrote: Fri Oct 10, 2025 4:39 am I want to make a mechanism which involves fluids that can only be directly inserted, much like the fusion reactor in the space age. Unfortunately, unlike the fusion reactor plasma mechanic, I need to use buildings that can also craft regular fluid recipes.
I believe you can still do that with normal connection categories. Just set one category to generic, and another to your special conneciton.
Py and PyBlock developer, wielder of LUA in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
oobanooba
Burner Inserter
Burner Inserter
Posts: 14
Joined: Thu Nov 21, 2024 4:17 pm
Contact:

Re: Allow more than one filter on fluid_boxes

Post by oobanooba »

protocol_1903 wrote: Fri Oct 10, 2025 5:58 am
oobanooba wrote: Fri Oct 10, 2025 4:39 am I want to make a mechanism which involves fluids that can only be directly inserted, much like the fusion reactor in the space age. Unfortunately, unlike the fusion reactor plasma mechanic, I need to use buildings that can also craft regular fluid recipes.
I believe you can still do that with normal connection categories. Just set one category to generic, and another to your special connection.
Unfortunately, this won't let me achieve what I want without making an entire set of buildings specific to a small subset of recipes, which is something I strongly want to avoid. And even then, it limits me greatly in how I can work with arbitrary sets of pipable and non-pipable fluids. It's a last resort. Fluid group filtering or fluid filtering, would give me all the control I and many other modders could really use.
User avatar
picklock
Fast Inserter
Fast Inserter
Posts: 240
Joined: Sat Nov 09, 2019 6:49 am
Contact:

Re: Allow more than one filter on fluid_boxes

Post by picklock »

+1
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters | Picklocks QuickBar Import/Export | Picklocks Nauvis Cliff-Explosives
Rseding91
Factorio Staff
Factorio Staff
Posts: 16215
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Allow more than one filter on fluid_boxes

Post by Rseding91 »

I'm going to put this into won't-implement because if it existed, every single fluidbox in the game would need memory allocated to support a dynamic number of filters which is outside of what we want to support and out of the memory usage and performance overhead that we're willing to pay.
If you want to get ahold of me I'm almost always on Discord.
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 356
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Allow more than one filter on fluid_boxes

Post by protocol_1903 »

Perhaps something similar to connection categories, a local or global bitmap for allowed fluids? Naturally the size of said bitmap would be limited but it would be an option over no option.
Py and PyBlock developer, wielder of LUA in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
Post Reply

Return to “Won't implement”