[ANSWERED] Pipe to pipe transfers, are they hardcoded?
Posted: Thu Dec 06, 2018 3:56 am
See this below post for answer: viewtopic.php?p=389013#p389013
Note: This relates to modding but is actually a game engine question...
I am running into bottlenecks with fluids as always. And so i wanted to fix it! But it seems i've run into a brick wall...
Some history first.
I altered the pump to have a base_level of 10 rather than zero, this allowed the pump to actually push 200 units of fluid/t rather than 138/t as it does vanilla. I can't say why as i don't know the source code for the games fluid simulation. Either way, it works wonders when you move fluid from storage to machine.
I also opted to make pipes carry more fluid, 1000 units in fact because of splitting. So there's enough fluid in a pipe to fill a pump in one tick to actually allow the pump to operate at max speed.
My current problem.
Whenever there's a pipe->pipe connection, the pipes will equalize their fluids at some predefined rate. At first i thought it was based on a percentage of pipe volume but it isn't.
That is, i assumed that a 100 unit pipe would move 97.5% of it's contents to a neighbor pipe, or quite simply 97.5 units of fluid.
And so i assumed that a 1,000 unit pipe would move 975 units of fluid to another pipe in the same tick. But it doesn't do that! No matter how much capacity the pipes have, they always move exactly 97.5 units of fluid between them WHEN the pipe that is being moved from is FULL. And possibly less than that if the neighboring pipe already has some fluid in it.
So my question is, is this some hard coded bit? An assumption that pipes will always have 100 units of fluid in them?
Because i am looking to increase this inter pipe transfer rate via modding and i can't do it.
Note: This relates to modding but is actually a game engine question...
I am running into bottlenecks with fluids as always. And so i wanted to fix it! But it seems i've run into a brick wall...
Some history first.
I altered the pump to have a base_level of 10 rather than zero, this allowed the pump to actually push 200 units of fluid/t rather than 138/t as it does vanilla. I can't say why as i don't know the source code for the games fluid simulation. Either way, it works wonders when you move fluid from storage to machine.
I also opted to make pipes carry more fluid, 1000 units in fact because of splitting. So there's enough fluid in a pipe to fill a pump in one tick to actually allow the pump to operate at max speed.
My current problem.
Whenever there's a pipe->pipe connection, the pipes will equalize their fluids at some predefined rate. At first i thought it was based on a percentage of pipe volume but it isn't.
That is, i assumed that a 100 unit pipe would move 97.5% of it's contents to a neighbor pipe, or quite simply 97.5 units of fluid.
And so i assumed that a 1,000 unit pipe would move 975 units of fluid to another pipe in the same tick. But it doesn't do that! No matter how much capacity the pipes have, they always move exactly 97.5 units of fluid between them WHEN the pipe that is being moved from is FULL. And possibly less than that if the neighboring pipe already has some fluid in it.
So my question is, is this some hard coded bit? An assumption that pipes will always have 100 units of fluid in them?
Because i am looking to increase this inter pipe transfer rate via modding and i can't do it.