Fluid Wagons, Curved Rails, and fluid_wagon_connector_alignment_tolerance

Place to get help with not working mods / modding interface.
Epp
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon May 26, 2025 11:11 pm
Contact:

Fluid Wagons, Curved Rails, and fluid_wagon_connector_alignment_tolerance

Post by Epp »

Hi, I'm trying to get pumps working with a fluid wagon on an ever-so-slightly curved rail. There's a mod called Fluid Wagon on Curved Rails (https://mods.factorio.com/mod/fluid-wagon-curved-rails/) but it's out of date and there's no source, so I'm trying to replicate the basic mod functionality myself. I found an old 2021 thread here (viewtopic.php?p=553446) that mentions fluid_wagon_connector_alignment_tolerance, with a user saying they set this value to 1.0 in Factorio\data\base\prototypes\entity\entities.lua and it worked for them.

I have tried setting this value to a range of things (1.0, 5.0, 100.0) but my pumps never start pumping into the wagon on the curved rail. I've also tried commenting out the fluid_wagon_connector_graphics initialization (thinking maybe it was waiting for an animation to finish) but that doesn't seem to help - the pumps don't animate connecting to the wagon anymore but they still pump/don't pump the same. Line 7081 to 7083 in my entities.lua are the only things I've changed and are simply this:

Code: Select all

    fluid_wagon_connector_alignment_tolerance = 100.0,

    --fluid_wagon_connector_graphics = require("prototypes.entity.pump-connector"),
(to be explicit, I'm restarting the game between every entities.lua edit, as well).

I've attached a screenshot where the top, straight wagon is actively receiving fluid and the bottom wagon is just *barely* curved and not getting anything.

Image

Is there a way to get the pumps to start pumping into the bottom wagon? Am I looking in the right place?
Attachments
05-26-2025, 16-30-46.png
05-26-2025, 16-30-46.png (698.32 KiB) Viewed 273 times
User avatar
Silari
Filter Inserter
Filter Inserter
Posts: 576
Joined: Sat Jan 27, 2018 10:04 pm
Contact:

Re: Fluid Wagons, Curved Rails, and fluid_wagon_connector_alignment_tolerance

Post by Silari »

Far as I'm aware, the rail itself still needs to be aligned to a cardinal direction in order for the pump to properly target the rail, regardless of tolerance. Adjusting the tolerance just means it doesn't matter if any other parts of the wagontrain are on a curve.

You'll notice a pump won't show the yellow indicator when placing it next to anything but a straight rail.
05-26-2025, 23-26-20.png
05-26-2025, 23-26-20.png (4.43 MiB) Viewed 239 times
Last edited by Silari on Tue May 27, 2025 2:36 pm, edited 1 time in total.
Epp
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon May 26, 2025 11:11 pm
Contact:

Re: Fluid Wagons, Curved Rails, and fluid_wagon_connector_alignment_tolerance

Post by Epp »

That very well may be true but I have a couple of hints that make me think it may be possible. Here's a screenshot showing that (1) the segment of the rail I'm trying to put a pump against IS straight and shows up yellow and (2) that the pumps built against this straight section open up like they're trying to connect, but then don't actually connect - you can also see the bottom pump does not open up, as that's the one built against a curved section. However, it's obvious that the wagon attachment points are not aligned with the straight-section pumps, so maybe that's the rub, but I was hoping that the "fluid wagon connector alignment tolerance" would, as it's named, allow connectors to connect if they're within a tolerance.
05-26-2025, 23-44-34.png
05-26-2025, 23-44-34.png (645.49 KiB) Viewed 208 times
Also, here's a screenshot without the wagon to illustrate where the actual curved rail is:
05-26-2025, 23-47-56.png
05-26-2025, 23-47-56.png (604.32 KiB) Viewed 208 times
User avatar
Silari
Filter Inserter
Filter Inserter
Posts: 576
Joined: Sat Jan 27, 2018 10:04 pm
Contact:

Re: Fluid Wagons, Curved Rails, and fluid_wagon_connector_alignment_tolerance

Post by Silari »

Shoot, when I redid some of the wording in the post after testing I accidently left out one of the sentences, and said wagon when I meant train.

The WAGON itself seems to need to also be aligned to one of the cardinal directions, otherwise pumps will not connect to it. Tolerance is for if any other parts of the TRAIN are on a curve, it won't prevent it.

You can see the last fluid wagon in my screenshot also isn't connected - it's tilted slightly due to the end of it being on the curve.
Epp
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon May 26, 2025 11:11 pm
Contact:

Re: Fluid Wagons, Curved Rails, and fluid_wagon_connector_alignment_tolerance

Post by Epp »

Ohhhhhhhhhhhhh, I finally think I fully get it. I was always confused as to why the game cared if there were any curves under the train when the wagons were straight, but it's actually just that (1) train stations on a straight track will always align all wagons with the grid and (2) any curves shift the downstream wagons off of grid alignment a bit. So the property is really controlling how aligned the wagon must be to the grid, but it doesn't affect the straightness requirement that pumps have.

If that's correct, then what I was trying to do just isn't possible with existing entities, which is really unfortunate. I simply can't fit 1-2 fluid trains into the largest-possible loop between two roboports by *exactly* one rail length due to the increased track radius of 2.0.... Boo! Boo I say! :P
Post Reply

Return to “Modding help”