Question: Depot catchment range?

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
User avatar
Captain Rand
Traffic Manager
Traffic Manager
Posts: 192
Joined: 28 Jan 2012 07:35

Question: Depot catchment range?

Post by Captain Rand »

I seem to remember reading something about this but can't remember where. I've recentely modified my track building style and was reminded of it. It became important to know.

Can anyone tell me what the catchment range of a depot is, i.e. when a passing vehicle is due for maintenance and needs to find the nearest depot?
(I'm mostly asking about trains, but I suppose this also includes road and ship depots. Are the ranges different?)
Can the range be changed?
Is the range "as the crow flies" or does it go by length of track if for example the route to the depot isn't a straight line?

TIA.

Pete.
There's nothing like a deadline to hone the concentration.

Good manners cost nothing, but earn respect.

" 'Impossible' is not in our vocabulary." Jack Chrichton, Farscape
_dp_
Transport Coordinator
Transport Coordinator
Posts: 278
Joined: 18 Dec 2013 12:32

Re: Question: Depot catchment range?

Post by _dp_ »

Dunno about other vehicle types but for trains it's determined by a setting called pf.yapf.maximum_go_to_depot_penalty. And rather than taking any apparent distance it actually limits the pathfinder penalty, i.e. the cost of the path as viewed by the pathfinder. So calculating it exactly is kinda tricky but a simple way to view it is that one tile represents 100 pf penalty, so the default value of maximum_go_to_depot_penalty of 2000 means that if your depot is further than 20 tiles it won't be picked up for servicing for sure. But having other stuff on the route can increase the penalty, for example, traversing two-way pbs backward adds a penalty equivalent to 15 tiles (on default settings). Also, trains only check if they need servicing once per day so a fast train can skip a depot even if it's closer than maximum_go_to_depot_penalty.
User avatar
odisseus
Director
Director
Posts: 568
Joined: 01 Nov 2017 21:19

Re: Question: Depot catchment range?

Post by odisseus »

It turns out that placing two backwards path signals before the depot ensures that the pathfinder won't send there any trains for automatic maintenance. This is a neat alternative to the pathfinder trap.
Attachments
Bogotá Transport, Feb 26th, 1950-fs8.png
Bogotá Transport, Feb 26th, 1950-fs8.png (8.31 KiB) Viewed 1878 times
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 14 guests