Page 1 of 1

Assembly Machine Fluid Sharing

Posted: Sat Feb 10, 2018 4:01 am
by deef0000dragon1
I was watching xterminator's most recent Tightening The Belt episode and when he placed the pipes down I began to wonder, is there any particular reason that assemblers don't fluid share when next to each other like mining drills or boilers?

Is there a mod that might implement this anywhere?

I want to see just what it would do to the balance of the space that they take up.

Re: Assembly Machine Fluid Sharing

Posted: Sat Feb 10, 2018 4:15 am
by mp0011
Assemblers, and other building, may have recipes that use more fluids. Theoretically, You may have recipe that use water and acid, so auto-sharing may be impractical. Also, You do not place miners next to buildings that accepts other fluids, so mishaps is not real threat. Assemblers are different, because You may have different assemblers next to each other, and lot of different piping around buildings. If buildings will output liquids on all four sides, You could not place any other pipes 1 tile from building...

Re: Assembly Machine Fluid Sharing

Posted: Sun Feb 11, 2018 10:05 pm
by deef0000dragon1
mp0011 wrote:Assemblers, and other building, may have recipes that use more fluids. Theoretically, You may have recipe that use water and acid, so auto-sharing may be impractical. Also, You do not place miners next to buildings that accepts other fluids, so mishaps is not real threat. Assemblers are different, because You may have different assemblers next to each other, and lot of different piping around buildings. If buildings will output liquids on all four sides, You could not place any other pipes 1 tile from building...

I dont remember any multi fluid recipes in assemblers (chem plants yes, but not assemblers), and the reason that I would like a mod is to test how much it would effect things like that. I would also argue that you are already limited on pipes next to assemblers due to inserters, or having fluids needing pipes next to assemblers.

Re: Assembly Machine Fluid Sharing

Posted: Mon Feb 12, 2018 2:04 am
by eradicator
mp0011 wrote:Assemblers, and other building, may have recipes that use more fluids. Theoretically, You may have recipe that use water and acid [snip]
Uer. Nope. Assemblers Mk2/3 can only have one input and one output fluid. Sure that's trivial to change, but basegame only has one fluid capability atm.

@OP: I tried to mod sharing in, but assemblers have some special things to them that make it difficult. First: You can't make them use the same sharing mechanic as the drills as the game forbids it (error on startup). Second: Assemblers have some special behavior where they only let fluid through while they're working. Which is fine for fluid input, but behaves oddly for output. It's apparently possible to still half-way force them to share but the arrows won't show up as in/out type.

If you want to test, here's a sample that adds pseudo-sharing to Assembler Mk3:
testmod-assembler-fluid-sharing_0.0.0.zip
(1009 Bytes) Downloaded 139 times

Re: Assembly Machine Fluid Sharing

Posted: Mon Feb 12, 2018 9:48 am
by bobingabout
eradicator wrote:@OP: I tried to mod sharing in, but assemblers have some special things to them that make it difficult. First: You can't make them use the same sharing mechanic as the drills as the game forbids it (error on startup). Second: Assemblers have some special behavior where they only let fluid through while they're working. Which is fine for fluid input, but behaves oddly for output. It's apparently possible to still half-way force them to share but the arrows won't show up as in/out type.
base_level helps control if a fluid should flow into, or out of the pipe. have you tried setting base_level to 0? This should make the fluid box function as if it were a pipe, and fluids will flow in if the neighbouring pipe has more fluid in it, or flow out if the neighbouring pipe has less fluid in it, which lets a fluid easily flow straight through.
This does also raise the problem that if the recipe needs a lot of a certain fluid, but the supply is low, then the recipe probably won't cycle because the factory won't hold enough fluid.
I'm not sure what the height tag does, but reading it feels like you were trying to set the base level to -1 so that fluids flow in, then counter it with height = 2 to make them flow out again.

Re: Assembly Machine Fluid Sharing

Posted: Mon Feb 12, 2018 11:21 am
by eradicator
@bobingabout:

The current values are copied straight from the boilers shared fluid box. I experimented around some more with the values (discovering a possible division by 0 bug while at it :P). The best combinations are heigh=2/base=-1 (i.e. like a pump) and height=1/base=0 (i.e. like a pipe). But the assemblers definetly block fluid output when not "working" (or at least having some ingredients in them? fuzzy.). Increasing the base area to 10 so they can hold a bit more fluid seems to make it a tiny bit smoother. But ultimately it remains fiddly due to the blocking.
I'll attach the 1/0 "pipe" version if anyone wants to compare (above is the 2/-1 "pump" version").
testmod-assembler-fluid-sharing_0.0.0.zip
(1.02 KiB) Downloaded 138 times