Page 1 of 1

request_train_path{blacklist=...}

Posted: Fri Jun 19, 2026 10:26 am
by L0laapk3
Hi, for my use case of the `request_train_path`, I need the ability to mark certain RailEnds as impassible, disallowing the pathfinder from finding paths through them.

Thats why I propose the addition of a `blacklist = array[RailEnd]` parameter on the `request_train_path`.

In practical terms, assuming A*, this could be implemented by initializing the closed set from the blacklisted entries. Specifically with nodes with a g-score of 0, ensuring that the blacklisted RailEnd's can never be added to the open set. This way this feature does not add any cost/code to the A* pathfinding loop.

Re: request_train_path{blacklist=...}

Posted: Mon Jun 22, 2026 4:28 pm
by BraveCaperCat
Can you not just destroy the rail ends, request the path and then put them back?

Re: request_train_path{blacklist=...}

Posted: Fri Jun 26, 2026 11:19 am
by L0laapk3
my understanding is that this would be a performance disaster, implicitely repathing all kinds of trains by breaking rails, and also trains might be currently occupying them.