Age old question: "Load until full or next train arrives" function?
Moderator: OpenTTD Developers
- paulcobbaut
- Engineer

- Posts: 17
- Joined: 20 Apr 2017 08:19
Re: Age old question: "Load until full or next train arrives" function?
I like this question!
Expanded: when a station has multiple platforms that are all occupied, and a new train arrives, then one train should leave the station. Which one would ideally be a choice of 'the fullest' or 'of the same group' or 'the one that is there the longest time'...
Expanded: when a station has multiple platforms that are all occupied, and a new train arrives, then one train should leave the station. Which one would ideally be a choice of 'the fullest' or 'of the same group' or 'the one that is there the longest time'...
--
Sent from Debian Linux
Sent from Debian Linux
Re: Age old question: "Load until full or next train arrives" function?
There are work-arounds for these issues, feasible even in the unmodifed game.
A self-regulating network ensures that the number of trains that arrive at the station is exactly sufficient to take all the supplied cargo. The situation when multiple trains are queued for loading just won't occur.
An overflow depot hides the queue away so that the waiting trains don't take space on the tracks. This solution doesn't eliminate the queues, but it's much more flexible than SRNW, and much easier to set up.
A self-regulating network ensures that the number of trains that arrive at the station is exactly sufficient to take all the supplied cargo. The situation when multiple trains are queued for loading just won't occur.
An overflow depot hides the queue away so that the waiting trains don't take space on the tracks. This solution doesn't eliminate the queues, but it's much more flexible than SRNW, and much easier to set up.
My add-ons: • AdmiralAI fix • Persistence for vehicle evolution lines • Soviet town names in English
My pictures: • The animation thread
My pictures: • The animation thread
Re: Age old question: "Load until full or next train arrives" function?
I appreciate your suggested workarounds, Odisseus.
I've already been using the depots to tuck away waiting trains, as that is the most reasonable solution I've found that doesn't involve perpetual micromanagement, but still I'm here in hopes of something less cheesy.
I had not yet come across the SRNW idea. I'll have to read about it. Thank you.
I've already been using the depots to tuck away waiting trains, as that is the most reasonable solution I've found that doesn't involve perpetual micromanagement, but still I'm here in hopes of something less cheesy.
I had not yet come across the SRNW idea. I'll have to read about it. Thank you.
Re: Age old question: "Load until full or next train arrives" function?
You can use counters and conditional orders for this
- paulcobbaut
- Engineer

- Posts: 17
- Joined: 20 Apr 2017 08:19
Re: Age old question: "Load until full or next train arrives" function?
So I tried this counter...
Why are the trains not leaving the station?
The counter is named 'gogogo'. The counter is increased when a train passes the signal with blue arrow, and the counter is decreased when a train passes the pink arrow signal. This works.
Now I thought a train would 'jump to order 4' when the counter is above 2. But they just sit there in the station. (All trains have shared orders.)
What am I missing?
The goal is to keep the trains loading in the station, until a third train arrives, then one of them should leave. (So the pink signal will need to be set at every station exit later on.)
EDIT: Removing the 'full load any cargo' makes them all leave at the counter threshold. Ideally only one of them should leave.
Why are the trains not leaving the station?
The counter is named 'gogogo'. The counter is increased when a train passes the signal with blue arrow, and the counter is decreased when a train passes the pink arrow signal. This works.
Now I thought a train would 'jump to order 4' when the counter is above 2. But they just sit there in the station. (All trains have shared orders.)
What am I missing?
The goal is to keep the trains loading in the station, until a third train arrives, then one of them should leave. (So the pink signal will need to be set at every station exit later on.)
EDIT: Removing the 'full load any cargo' makes them all leave at the counter threshold. Ideally only one of them should leave.
--
Sent from Debian Linux
Sent from Debian Linux
- paulcobbaut
- Engineer

- Posts: 17
- Joined: 20 Apr 2017 08:19
Re: Age old question: "Load until full or next train arrives" function?
Found a solution, using a counter as a boolean.
Thank you for the hint on counters!
Thank you for the hint on counters!
--
Sent from Debian Linux
Sent from Debian Linux
Re: Age old question: "Load until full or next train arrives" function?
I may be mistaken, but as far as I understand, in your case, the full train will not leave the station until the third train arrives.
- paulcobbaut
- Engineer

- Posts: 17
- Joined: 20 Apr 2017 08:19
Re: Age old question: "Load until full or next train arrives" function?
Adding a check at the beginning for 100 percent load seems to work. Like in this picture.Michpi wrote: 29 May 2026 08:47I may be mistaken, but as far as I understand, in your case, the full train will not leave the station until the third train arrives.
--
Sent from Debian Linux
Sent from Debian Linux
Who is online
Users browsing this forum: No registered users and 0 guests
