Race condition affecting orders when upgrading trains

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
lcd_47
Engineer
Engineer
Posts: 78
Joined: 27 Sep 2006 18:04

Race condition affecting orders when upgrading trains

Post by lcd_47 » 28 Aug 2019 12:03

I have this setup for depots:

Image

The purpose of it is to send trains to the waypoint instead of sending them directly to depots, so they choose whichever depot they can actually enter when they get there instead of having 97% trains picking the depot on the left and 3% the other one while they're still 300 tiles away. This part works well.

Then I'm trying to upgrade the trains, so I change orders as follows, and I issue the replace command:

Image

This sort of works too, the trains go to the depots and are upgraded etc., but when the line gets crowded some (not all) of the trains that exit the depots seem to forget they went past the waypoint and still want to go there.

Any idea?
Attachments
2019-08-26-121539_1700x925_scrot.png
(651.85 KiB) Not downloaded yet
2019-08-26-092539_823x189_scrot.png
(34.76 KiB) Not downloaded yet

odisseus
Engineer
Engineer
Posts: 37
Joined: 01 Nov 2017 21:19

Re: Race condition affecting orders when upgrading trains

Post by odisseus » 10 Sep 2019 01:41

You can make the train go through a waypoint by issuing an appropriate order, but you cannot make it avoid a waypoint — the train will happily pass through if the way to its next goal happens to be through that waypoint.

However, you can place another waypoint on the track that bypasses the depots, and make the trains choose one of the two waypoints depending on their age. The orders might look like this:

Code: Select all

1. Go to station A
2. Jump to order 5 if age < 2
3. Go via depot waypoint
4. Jump to order 6
5. Go via bypass waypoint
6. Go to station B

Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 8 guests