r/foundry_game • u/mnsnownutt • Sep 22 '26
Suggestion Train Pathfinding Issues
I know they are still working on things, but train pathfinding needs some help.
I noticed a platform didn't have a train at it for a prolonged period of time. Trying to hunt down that train proved annoying, but eventually I found it. That would be one thing they could improve, not only some type of notification system, but also a way of quickly finding/locating the trains causing issues.
Unfortunately, I didn't take a screenshot of the map, but what happened is this train decided to take a shortcut (or u-turn?) and went and parked behind a train waiting at a completely unrelated station that was not part of its route. It probably would have gone unnoticed, but the train at that station was set to wait until completely unloaded, which would take literally hours.
After sending the train out of the way to allow this train to pass, the original train eventually came back. However, 10 minutes later, another train does the same thing and parks behind this train.
I then decided to ride around in some trains and noticed they will do odd things like randomly pulling into stations that are not part of their route, not to stop, but maybe as some kind of shortcut. However, if there is another train there, they still pull in behind the train instead of taking the unoccupied tracks, which makes no sense.
It is almost like they get their pathfinding when they leave the station, pick a route and go with it. Another train does the same thing and whichever gets there first wins? I am not sure.
They will also sometimes take a completely circuitous route out of nowhere. They do not always take the same path when doing routes, which may be due to congestion, but I am not sure how the pathfinding works, because as I look at the map and know where the train needs to go and has gone in the past, the route it suddenly decides to take is completely illogical.
3
u/Embarrassed_Quit_450 Sep 22 '26
Are you using signals?
7
u/chaz768 Sep 22 '26
This goes against all the train lovers out there that love a perfect train network, but I feel like, with such a massive amount of height to work with, I would avoid crossing train paths unless it were impossible to avoid.
5
u/OmiNya Sep 22 '26
Please, use f9 in-game and submit your report with "upload save" checked
2
u/garmann83 Sep 22 '26
Just click on the train on the map if it has stoped anywhere other then a station. Use signals and alot of them to stop trains for clogging up intersections.
2
u/driver-908 Sep 24 '26
Completely agree with OP on this. I have also experienced exactly the same issues: 1. trains randomly going into a station not related to its route and 2. trains taking a long illogical route to its destination station.
To solve number 1. I have taken to putting in a loop line near the station entrance so that trains that are trying to use the station as a shortcut, will take the shorter loop line instead. This seems to solve the problem about 9 times out of 10. Still get the occasional rouge train though.
For issue 2. I also don't know why this happens.
1
u/voarex Sep 22 '26
Only time I saw this on my play through is when I didn't have the junctions setup correctly. So the shortest path was to go up one side of a leg, go through a station, than to go down the other side of the leg to get to the stop they wanted.
So make sure every station has in lines from both dirrections and out lines to both directions. That way a u turn is never the shortest path.
1
u/Hegemege Sep 24 '26
Yep, observed the same behavior. Same signaling strategy in Factorio doesn't cause this to happen, so it must be the differences in routing algorithm and also, I suspect, the train momentum and braking. Foundry trains have massive momentum and brake slowly, and thus when they are in travel, they need to "reserve" a lot more track space than in Factorio for the algorithm. It should definitely update the route more often during travel, and I think stronger brakes would help this too
Another way to mitigate it is to set all trains that are waiting on stations to have a maximum wait time regardless of inventory fill, but this of course causes a lot more traffic from empty/full trains running needlessly