Oxygen Not Included

Oxygen Not Included

259 ratings
Advanced Flow Management
6
2
4
3
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
1.528 MB
Aug 30, 2023 @ 8:25am
Mar 13 @ 2:11pm
22 Change Notes ( view )

Subscribe to download
Advanced Flow Management

In 1 collection by Glampi
Glampi's Mods
4 items
Description
Latest version: v2.0.8.1
Translations: en, uk, ru, de, zh, es

Are you tired of using lots of bridges to make that damn liquid flow the right way? Do you want a more convenient way to manage where it flows and in what order? Then this mod is for you!

Advanced Flow Management(or AFM for short) gives you the ability to change the flow direction & priority in just one click. It also gives you a better understanding of the network's state by visualizing the flow directions in the overlay. It works for both liquid and gas conduits.


Features

• flow directions visualization in liquid & gas overlays
• ability to switch flow directions
• ability to change flow priorities on junctions
• ability to change flow priorities of buildings' endpoints
• ability to copy a junction's flow settings to other junctions

Now in more detail:

Flow adjustments in a network are made by interacting with junctions. Changing a junction connection's flow direction also changes the flow of the whole connected pipe leading to an endpoint: another junction, a building intake/output, or a dead end.

Some directions, known as Fixed Flow Directions (those appear darker in the Flow Configuration screen), cannot be changed for trivial reasons.



Illegal junctions (marked in red) are unstable. The game will attempt to rebuild the network to make them legal by adjusting its flow directions. All networks are rebuilt whenever a conduit is placed or removed.



Adjusting a junction's flow priorities determines the order in which contents enter or leave it. The highest-priority direction will be used first. If multiple directions share the same priority, the flow is evenly split.



Buildings' endpoints above junctions can also have their flow priority adjusted. For example, if a pump outputs into a junction and its flow priority matches the junction’s other inputs, the flow will be evenly distributed between all junction inputs.

For building endpoints to follow flow priorities, the junction requires a "Buffer" - you can see its contents (labeled "Buffer Contents") below the conduit's contents. You can safely ignore it as it is just a technical requirement.



You can copy flow settings of a junction to others only if they have the same connections. Copying transfers both flow directions AND priorities.




Tips

Here are some tips that can help you use the mod correctly:

Do not build loops(= an arrangement of multiple junctions that lets the contents flow in circles). Just because this mod lets you do it doesn't mean you should. If you do build them, then the flow of nearby conduits might behave strangely and unintended.

Switch flow directions while the game is paused. This will ensure that the game will not try to switch any flow directions that you are currently changing to the way they were before(in case you create any illegal junctions in the process).

Switch flow directions only in fully built networks. If you switch a flow direction of a junction that is part of an unfinished network, then that flow direction may get switched back while that network is being built.


Mod Compatibility

This mod influences conduits' behavior on a pretty low level so it might conflict with other mods that do the same. However, among all the mods I tested(which were a lot), practically none showed any significant compatibility issues.

AFM is fully compatible with High Pressure Applications:
you can configure both flow directions and flow priorities of the modded conduits.

AFM is fully compatible with Pipe Flow Overlay.

AFM is fully compatible with all mods that add new buildings with custom endpoints/new bridges/new valves etc.:
you are fully able to configure the flow priority of any modded building's endpoints; sometimes some minor visual issues with the endpoints' icons occur where the icons are not changing their shape properly(from square to round and vice versa).


Special Thanks

Big thanks to Peter Han for his PLib!

Special thanks to the ONI discord community[discord.gg] for answering lots of my questions and helping create this mod!


Source Code, Feedback etc.

You can find the source code on my GitHub[github.com].

If you encounter any issues/bugs, please start an issue[github.com] with the error message(if present), the Player.log file and a description of how to reproduce the bug.

If you would like to provide a translation to this mod, feel free to send me the translation .po file via an issue or a pull request (on GitHub).

Do you like my mods and want to thank me? I would not mind if you would buy me a coffee[buymeacoffee.com] ;D
118 Comments
LAZY May 23 @ 5:40am 
저는 작동이 안되네요..
Dirigible Apr 19 @ 5:44am 
This mod is fantastic, thank you very much, it makes managing my horrific convoluted pipe spaghetti a lot easier than trying to ever improve any of my designs
Glampi  [author] Apr 18 @ 3:24am 
@Yourname942 Basically, in a normal situation, you wouldn't build a "loop" anyway, because it simply makes no sense. Pipes are used for connecting outputs with inputs and are mostly linear (go from A to B). You can, however, build a more complex system than that, which, for example, could make liquid go through the same pipe over and over in circles to cool it down before continuing its way to the end (go from A to B to B to B ... to C). All I am saying is that to make such loops, one shouldn't use the mod to redirect the liquid, but instead do it as usual - with liquid shutoffs, valves, bridges, etc. This mod is still meant to be used in more-or-less linear networks, that is, they are allowed to branch off, of course (go from A to (B and C) ; go from (A and B) to C ; etc.). So don't worry, this isn't common, and I just wanted to point it out. It's not a big deal, it doesn't break the game or the conduit network - it will only look and behave weird.
Yourname942 Apr 17 @ 12:40pm 
Can you further explain by this. I don't really understand what a loop is, how to avoid it, or when it should be actually used. Do you mean like an infinitely flowing circuit, is there any time when you would want items to flow back to the beginning?

"Do not build loops(= an arrangement of multiple junctions that lets the contents flow in circles). Just because this mod lets you do it doesn't mean you should. If you do build them, then the flow of nearby conduits might behave strangely and unintended."
neo89skynet Apr 11 @ 6:34am 
This mod solves the problem with localization https://steamcommunity.com/sharedfiles/filedetails/?id=3374671941
neo89skynet Apr 11 @ 5:35am 
When using this mod, one part of the game localization becomes in English, and the other part in Russian. I initially play the Russian localization of the game. Can you fix this bug?
啵啵小奶嘴 Apr 10 @ 2:22pm 
这是什么意思?可以创建游戏,但是加载存档就会报错
啵啵小奶嘴 Apr 10 @ 2:22pm 
AdvancedFlowManagement.Patches.Main_Patches+OnNetworksRebuilt_Patch.Postfix (System.Collections.Generic.IList`1[T] networks, System.Collections.Generic.ICollection`1[T] root_nodes, ConduitFlow __instance) (at <fe2adfbce00248908ff68784a0d0b5fa>:0)
(wrapper dynamic-method) ConduitFlow.ConduitFlow.OnUtilityNetworksRebuilt_Patch1(ConduitFlow,System.Collections.Generic.IList`1<UtilityNetwork>,System.Collections.Generic.ICollection`1<int>)
UtilityNetworkManager`2[NetworkType,ItemType].Update () (at <5375d36347d34bc0b1ea487bdcad48e4>:0)
Game.LateUpdate () (at <5375d36347d34bc0b1ea487bdcad48e4>:0)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
LogCatcher:UnityEngine.ILogHandler.LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
啵啵小奶嘴 Apr 10 @ 2:21pm 
AdvancedFlowManagement.Utils.UpdateShouldManageFlowPriorities (AdvancedFlowManagement.CrossingCmp crossingCmp) (at <fe2adfbce00248908ff68784a0d0b5fa>:0)
AdvancedFlowManagement.Patches.CrossingsUpdates_Patches.<PostProcessNetworksRebuild>g__ManageDeserializedCrossings|0_0 (AdvancedFlowManagement.Patches.CrossingsUpdates_Patches+<>c__DisplayClass0_0& ) (at <fe2adfbce00248908ff68784a0d0b5fa>:0)
AdvancedFlowManagement.Patches.CrossingsUpdates_Patches.PostProcessNetworksRebuild (System.Collections.Generic.ICollection`1[T] allUpdatedCells, ConduitFlow conduitFlow) (at <fe2adfbce00248908ff68784a0d0b5fa>:0)
啵啵小奶嘴 Apr 10 @ 2:21pm 
ArgumentException: [AdvancedFlowManagement] > Cell 136858 does not have a conduit
AdvancedFlowManagement.Patches.FlowPriorityManagement_Patches.SaveCustomFlowConduits (System.Int32 central_cell, ConduitFlow conduitFlow) (at <fe2adfbce00248908ff68784a0d0b5fa>:0)