[2.0] Routing trains to specific stops

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
The_LORD_thy_GOD
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Nov 10, 2024 5:23 pm
Contact:

[2.0] Routing trains to specific stops

Post by The_LORD_thy_GOD »

Mods that generate train schedules often want to send trains to particular stations, even in the absence of unique station names. However, train schedules send trains by station name and can't target particular stations.

In 1.x, mods like LTN would work around this by adding the coordinates of a nearby rail to the schedule, then the station. This would ensure that the train was sent to the correct target station, even if not uniquely named.

With the addition of priority in 2.0, this method no longer works reliably, as if there is another station of the same name with higher priority, the train will be rerouted away from the target coordinates to the higher priority station.

I therefore suggest that an API change be made (perhaps a `stop` field in `ScheduleRecord`) that would allow a train to be routed via API to a particular stop unambiguously.
Last edited by The_LORD_thy_GOD on Mon Nov 11, 2024 6:16 pm, edited 1 time in total.
curiosity
Filter Inserter
Filter Inserter
Posts: 587
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: [2.0] Routing trains to specific stations

Post by curiosity »

Duplicate of viewtopic.php?f=221&t=100216

And your thread title is bad. A station is the name. A stop is the entity in the world.
The_LORD_thy_GOD
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Nov 10, 2024 5:23 pm
Contact:

Re: [2.0] Routing trains to specific stops

Post by The_LORD_thy_GOD »

Changed the title.

I don't think it's a duplicate, though. All of the information and developer responses in that thread are no longer valid due to the introduction of train priority. This is a new issue that was solvable in 1.1 but isn't in 2.0.
User avatar
Sharparam
Inserter
Inserter
Posts: 27
Joined: Sat Mar 25, 2023 11:21 pm
Contact:

Re: [2.0] Routing trains to specific stations

Post by Sharparam »

curiosity wrote: Mon Nov 11, 2024 11:26 am And your thread title is bad. A station is the name. A stop is the entity in the world.
The API uses station both to refer to the entity and the name (in different places), so it's not very consistent.
curiosity
Filter Inserter
Filter Inserter
Posts: 587
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: [2.0] Routing trains to specific stations

Post by curiosity »

Sharparam wrote: Tue Nov 12, 2024 2:55 am The API uses station both to refer to the entity and the name (in different places), so it's not very consistent.
The API is not known for its consistency.
Post Reply

Return to “Modding interface requests”