Bob's Logistics mod


Adds logistic related things.

Content
9 months ago
0.13 - 1.1
293K
Logistics

i [Implemented]Throughput of pipes

5 years ago
(updated 5 years ago)

I suggest to increase the throughput of pipes depending on their tiers.

to facilitate the change, I noticed that this corresponds to the variable "height".

In the file "prototypes \ entity \ pipes.lua" only need to add to every type of pump.
for example:

if data.raw.item["silicon-nitride"] then
data:extend(
{
{
type = "pipe",
name = "ceramic-pipe",
icon = "boblogistics/graphics/icons/pipe/ceramic-pipe.png",
icon_size = 32,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.2, result = "ceramic-pipe"},
max_health = 250,
corpse = "small-remnants",
resistances =
{
{
type = "fire",
percent = 90
}
},
fast_replaceable_group = "pipe",
collision_box = {{-0.29, -0.29}, {0.29, 0.29}},
selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
fluid_box =
{
base_area = 1,--2,
height = 7, <-----------------------------------------
pipe_connections =
{
{ position = {0, -1} },
{ position = {1, 0} },
{ position = {0, 1} },
{ position = {-1, 0} }
},
},
pictures = bob_pipepictures("ceramic"),
working_sound =
{
sound = {
{
filename = "base/sound/pipe.ogg",
volume = 0.65
},
},
match_volume_to_activity = true,
max_sounds_per_type = 3
},
horizontal_window_bounding_box = {{-0.25, -0.25}, {0.25, 0.15625}},
vertical_window_bounding_box = {{-0.28125, -0.40625}, {0.03125, 0.125}},
},

5 years ago
(updated 5 years ago)

Height doesn't work the way you're thinking.

imagine the pipes as rectangles, as you look at them from the end.
with a base area of 1, imagine it being 1 "unit" (foot, meter, whatever) wide.
with a height of 1, it's 1 unit tall.
base_level is how far the difference is from ground level. Some entities use -1 to make things flow in, or 1 to make things flow out. therefore, Gravity exists in this simulation.

Question: what happens if you put a machine with pipe height 1 feeding into a pipe of height 7?
Answer: it flows up to the pipe is filled to height 1, then stops flowing, leaving the additional height of 6 unfilled.

for comparison, a storage tank is basically just a huge pipe, 250 units wide.

if you look at the line that is commented out in your example, base area used to be 2 on the stone pipe chain, ceramic pipe is part of the stone pipe chain. This didn't work as expected in 0.16 and earlier, it basically made the fluid flow SLOWER, not faster, and it couldn't flow as far, yet changing the value to 0.5 (on the copper pipe chain) made the fluid undulate back and forth through the pipe, in what one of the dev's called an "unstable simulation".

With those 2 effects being the result of changing the pipe size, I changed all pipe sizes to 1.

With 0.17 changing the way fluids work, I have thought about looking into this again, I just haven't gotten around to it yet.

5 years ago

Thanks for the explanation.
I did a few tests with the height and in my opinion there is a solution but it is arduous to introduce. Namely, you need to increase this parameter in every machine that releases output pipes. The greater the difference in height, the faster the flow into the object with a smaller height. Thanks to that, the filled pipe will be able to handle more buildings. It is true that the flow rate does not change but the amount of liquid is greater.

Sorry for my English, I am not native.

2 years ago

While this is ture as in a pipe with a higher hight won't fill up if the machines that are feeding it don't have a the same height. This issue howerever can be bypassed by using pumps since they can fully filll and feed a pimpe with a larger hight from a low height source. This means that you could use the higher troughput of pipes with a larger height value by placing pumps at the outputs of your machines/liens of machines.

2 years ago

a different fix for the same problem, increse the area, if the pipes have double the capacity they will have double the throughput, for any given length

2 years ago

a different fix for the same problem, increse the area, if the pipes have double the capacity they will have double the throughput, for any given length

We tried this and it doesn't work. Increasing capacity actually reduced throughput. And reducing capacity caused strange wave issues (from memory). Factorio fluid dynamics are weird.

Doesn't matter, actual solution has already been implemented. Will be included in the next build (with a setting to enable the new behavior).

2 years ago

It will be interesting to actually try this out in the game.

1 year, 1 month ago

Is there an option or console command to enable the bigger pipes feature in my current game?

1 year, 1 month ago

Just change it in mod settings. No command required. You will need to do it from the main menu though.

New response