[Patch] Stop in depot order [in trunk]
Moderator: OpenTTD Developers
-
- Chairman
- Posts: 776
- Joined: 20 Jan 2007 12:08
- Location: Germany
[Patch] Stop in depot order [in trunk]
This little patch adds a stop in depot order. This might be useful in combination with conditional orders to react to a station stopping acceptance of a cargo (e.g. due to stockpiling in ECS vectors), for example:
1) Go non-stop to A (full load)
2) Go non-stop to B (unload if accepted)
3) If "cargo loaded" = 0 goto order 1 // B did accept our cargo: Restart
4) Go non-stop to depot X (stop) // B did not accept the cargo: stop in depot
Or you could create one-time trips by letting the orders end with an unconditional stop-in-depot.
Stopping in depot still triggers the "train stopped in depot" message to draw the player's attention.
This patch replaces the Service button for depot orders by a drop-down menu allowing you to select among Always Go, Service if needed and Stop. A combination with Refit is possible (I don't know how useful this is, though).
1) Go non-stop to A (full load)
2) Go non-stop to B (unload if accepted)
3) If "cargo loaded" = 0 goto order 1 // B did accept our cargo: Restart
4) Go non-stop to depot X (stop) // B did not accept the cargo: stop in depot
Or you could create one-time trips by letting the orders end with an unconditional stop-in-depot.
Stopping in depot still triggers the "train stopped in depot" message to draw the player's attention.
This patch replaces the Service button for depot orders by a drop-down menu allowing you to select among Always Go, Service if needed and Stop. A combination with Refit is possible (I don't know how useful this is, though).
Last edited by PhilSophus on 24 Oct 2008 16:33, edited 8 times in total.
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
Re: [Patch] Stop in depot order [r12932]
Ha, this is cool! I ran into this missing feature two days ago. Hope this makes it's way into the trunk
-
- Traffic Manager
- Posts: 146
- Joined: 27 Dec 2004 19:37
- Location: Home of the Big Cat
Re: [Patch] Stop in depot order [r12932]
This looks interesting i asked for something along these lines before, see thread
http://www.tt-forums.net/viewtopic.php? ... bookmark=1
http://www.tt-forums.net/viewtopic.php? ... bookmark=1
-
- Traffic Manager
- Posts: 146
- Joined: 27 Dec 2004 19:37
- Location: Home of the Big Cat
Re: [Patch] Stop in depot order [r12932]
Can you upgrade this patch to current nightly.
-
- Chairman
- Posts: 776
- Joined: 20 Jan 2007 12:08
- Location: Germany
Re: [Patch] Stop in depot order [r13397]
Updated patch attached to the top post. Due to lack of time I checked only that it compiles.
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
-
- Chairman
- Posts: 776
- Joined: 20 Jan 2007 12:08
- Location: Germany
Re: [Patch] Stop in depot order [r14039]
And after some time: Another update to current trunk (see top post)
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
Re: [Patch] Stop in depot order [r14039]
also usefull for cascading engines when you want to moove an old engine you have just replaced to a feeder service the other side of the map and want to send it to the depot that its coaching stock is in
-
- Traffic Manager
- Posts: 146
- Joined: 27 Dec 2004 19:37
- Location: Home of the Big Cat
Re: [Patch] Stop in depot order [r14039]
Update to current nightly please
-
- Chairman
- Posts: 776
- Joined: 20 Jan 2007 12:08
- Location: Germany
Re: [Patch] Stop in depot order [r14039]
Why? The current one applies (with offsets, but that's okay) and compiles cleanly. Does anything not work correctly?Nickel_Plate wrote:Update to current nightly please
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
-
- Traffic Manager
- Posts: 146
- Joined: 27 Dec 2004 19:37
- Location: Home of the Big Cat
Re: [Patch] Stop in depot order [r14039]
Am compiling with Daylength & Larger Maps, but keep getting "Cannot modify Order" when I try to tell train to stop in depot.
-
- Chairman
- Posts: 776
- Joined: 20 Jan 2007 12:08
- Location: Germany
Re: [Patch] Stop in depot order [r14192]
I can not reproduce this with clean trunk. Nevertheless, I posted a diff to current trunk. Maybe it works better with your modified version.
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
Re: [Patch] Stop in depot order [r14192]
I have heard (read: read) some dev say (read: write) that this wouldn't be a useful feature. I have to disagree. This can be a very useful command, and it wouldn't hurt to have it available in my opinion.
Re: [Patch] Stop in depot order [r14192]
i have had a use for this order, where i delivered a PBI steel mill with coal and ore, and the coal supply would overflow every blue moon
so i built a coal train from that stell mill to a power station, and would start it every time i recieved a news about "station xy does not accept coal anymore". the train would then pick up the coal, deliver it to the power station, go back to the steel mill, and stop there for the next time it would be used.
the rare occurance of this overflow did not warrant a "full time" service, so the stopping saved running costs.
so i built a coal train from that stell mill to a power station, and would start it every time i recieved a news about "station xy does not accept coal anymore". the train would then pick up the coal, deliver it to the power station, go back to the steel mill, and stop there for the next time it would be used.
the rare occurance of this overflow did not warrant a "full time" service, so the stopping saved running costs.
-
- Chairman
- Posts: 776
- Joined: 20 Jan 2007 12:08
- Location: Germany
Re: [Patch] Stop in depot order [r14192]
Eddi, isn't that more an application for conditional orders? I usually solve it as follows:
- Goto coal mine (full load)
- Goto steel mill (unload if accepted)
- If load percentage equals 0 goto order 1
- Goto power plant
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
Re: [Patch] Stop in depot order [r14192]
I would have needed the order when I wanted to send off a group of trains to a specific depot in the network to be stored there, have their orders changed, and then be put into service again on a different route.
Re: [Patch] Stop in depot order [r14192]
no, that horribly messes up any kind of timetables the coal trains may have, and interrupts the flow for these trains, as the "missing" train cannot carry anymore coal for a while. the single dedicated train is a much more sensible solution, especially since the coal trains not necessarily share orders, as they service different mine-regions.PhilSophus wrote:Eddi, isn't that more an application for conditional orders? I usually solve it as follows:I use the stop in depot order mainly for one-time deliveries of vehicles of the ECS Machinery Vector.
- Goto coal mine (full load)
- Goto steel mill (unload if accepted)
- If load percentage equals 0 goto order 1
- Goto power plant
-
- Chairman
- Posts: 776
- Joined: 20 Jan 2007 12:08
- Location: Germany
Re: [Patch] Stop in depot order [r14192]
Can everybody who uses the patch confirm that the current version is working correctly with clean trunk (I'm asking because of Nickel_Plate's report with a modified version). I haven't that much time for playing ATM as "real timetables" is draining my free time
If so, I would review the patch for coding style and open a flyspray entry with this patch. The interest now seems to be bigger than it seemed at first.
If so, I would review the patch for coding style and open a flyspray entry with this patch. The interest now seems to be bigger than it seemed at first.
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
-
- Traffic Manager
- Posts: 146
- Joined: 27 Dec 2004 19:37
- Location: Home of the Big Cat
Re: [Patch] Stop in depot order [r14192]
The patch 14192 works OK with rev.14192. It also works with my modified version of Larger Maps & Daylength having started again and recompiled.
-
- Chairman
- Posts: 776
- Joined: 20 Jan 2007 12:08
- Location: Germany
Re: [Patch] Stop in depot order [r14192]
Good to hear. Stop-in-depot shouldn't interfere with Larger Maps or Daylength from my understanding what these patches do.
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
Re: [Patch] Stop in depot order [r14192]
In the more conditional orders patch forum thread, I proposed that this patch be merged with the "stop in depot order" patch, because these two patches fit together perfectly, since the stop in depot order is only useful with conditional orders.
Who is online
Users browsing this forum: Bing [Bot] and 20 guests