Currently trains do collide with rails if they share a collision mask, however they ignore it when pathfinding, resulting in trains trying to go over rails, colliding and destroying such rails and getting stuck. If there was a way to make trains consider the collision mask of the rail segments and try to find a different path if current path contains rails the train collides with, this would allow for more complex train behaviours that aren't feasible otherwise.
For example, this would allow mods to make high-speed trains that can only travel on high-speed rails, in the same network with regular trains that can travel on both types of rails. Currently, high speed trains could attempt going over regular rails resulting in getting stuck.
(A way to) Make trains check collision masks of rail segments when pathfinding
Re: (A way to) Make trains check collision masks of rail segments when pathfinding
That... is interesting. It makes me wonder if I can change them to *not* check collision against rails and see how it impacts performance in train heavy saves.
Depending on how that goes, it might go the opposite of your request and simply disable that collision checking completely.
Depending on how that goes, it might go the opposite of your request and simply disable that collision checking completely.
If you want to get ahold of me I'm almost always on Discord.