There is fundamental functionality that I feel is missing in Factorio that (given my very limited knowledge of the game internals) seems like it wouldn't be too hard to implement. This missing functionality results in mods that I think do too much (Train Supply Manager and Logistics Train Network) or mods that resort to extremely hacky solutions like Concurrent Train Restriction that make me reluctant to use them.
It would be really nice (even if it wasn't exposed in the base game in any way) if there was a way to limit the number of trains that can be routed to a stop and/or a way to query how many trains are currently travelling to a stop. The latter would allow circuit conditions to be set at other stops to hold the train there until the number of trains routed to a stop was less than a certain value. But... it has the issue that it's a loop between the circuit logic and the train dispatch logic that may require something like only one train being dispatched to a given stop per tick or something equally ugly.
Limit trains routed to a stop
- Omnifarious
- Filter Inserter
- Posts: 277
- Joined: Wed Jul 26, 2017 3:24 pm
- Contact:
- Omnifarious
- Filter Inserter
- Posts: 277
- Joined: Wed Jul 26, 2017 3:24 pm
- Contact:
Re: Limit trains routed to a stop
Does anybody have any opinions on this? This seems like a fairly simple primitive, that if implemented, would enable a lot of things.
-
- Filter Inserter
- Posts: 464
- Joined: Tue Jun 28, 2016 2:07 pm
- Contact:
Re: Limit trains routed to a stop
This is actually something mentioned before, by myself and others: viewtopic.php?p=258253#p258253
Given how much of a minefield train logic is, I wouldn't put too much weight on it happening...but it would be nice if there were a clean solution.
Given how much of a minefield train logic is, I wouldn't put too much weight on it happening...but it would be nice if there were a clean solution.
- Omnifarious
- Filter Inserter
- Posts: 277
- Joined: Wed Jul 26, 2017 3:24 pm
- Contact:
Re: Limit trains routed to a stop
Thanks for pointing me at that.IronCartographer wrote: ↑Wed Dec 11, 2019 9:56 pm This is actually something mentioned before, by myself and others: viewtopic.php?p=258253#p258253
Given how much of a minefield train logic is, I wouldn't put too much weight on it happening...but it would be nice if there were a clean solution.
Re: Limit trains routed to a stop
Maybe you could write a simpler mod that would work with station names with patterns.
For example name your station "Iron Plate 1", "Iron Plate 2", ... and then every time a train has "Iron Plate X" as next stop it would pick one of "Iron Plate 1" or "Iron Plate 2" depending on the number of trains for each station.
For example name your station "Iron Plate 1", "Iron Plate 2", ... and then every time a train has "Iron Plate X" as next stop it would pick one of "Iron Plate 1" or "Iron Plate 2" depending on the number of trains for each station.
Re: Limit trains routed to a stop
Implemented: LuaEntity.trains_limit
Re: Limit trains routed to a stop
It's in the GUI too, been there for quite a while. It can also be circuit controlled.