request_train_path{blacklist=...}

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
L0laapk3
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Sun Mar 18, 2018 10:01 pm
Contact:

request_train_path{blacklist=...}

Post 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.
User avatar
BraveCaperCat
Filter Inserter
Filter Inserter
Posts: 519
Joined: Mon Jan 15, 2024 10:10 pm
Contact:

Re: request_train_path{blacklist=...}

Post by BraveCaperCat »

Can you not just destroy the rail ends, request the path and then put them back?
If you want to see the mods I've made, press one. If you need me to update a mod to 2.0, press two. If you're looking for QA, press three. If you've been waiting over 1 and a half years for Digital Age, bad luck.
L0laapk3
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Sun Mar 18, 2018 10:01 pm
Contact:

Re: request_train_path{blacklist=...}

Post 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.
Post Reply

Return to “Modding interface requests”