Suggestion: Copy trains and their schedule for new station

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
User avatar
HayabusaShinkansen
Engineer
Engineer
Posts: 10
Joined: 10 Feb 2023 01:04

Suggestion: Copy trains and their schedule for new station

Post by HayabusaShinkansen »

The most common operation I do in OpenTTD is create a new station (this is fun), build the tracks to it (this is fun), put the signals on it (this is fun)... and then clone trains from a nearby station which does the same resources then go through each duplicated train and change it's schedule to replace the name of the old station with the name of the new station, keeping the name of the other station (deliver to) station the same (this is incredibly boring).

Anyway to automate this?
skc
Traffic Manager
Traffic Manager
Posts: 177
Joined: 17 Sep 2022 02:02

Re: Suggestion: Copy trains and their schedule for new station

Post by skc »

Sounds like you're looking for the 'Shared orders' feature.

When you clone a vehicle, hold the Ctrl key, and the orders of the existing will be automatically shared to the new vehicle.
Similarly, when in the 'Orders' screen, you can Ctrl+click on another vehicle (after clicking 'Go to') and it will share the orders from the clicked vehicle into the one you're editing.
User avatar
jfs
Tycoon
Tycoon
Posts: 1764
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Suggestion: Copy trains and their schedule for new station

Post by jfs »

As an addition, when two or more vehicles have shared orders, you can tell by the Orders list window for the vehicle ending with "End of shared orders", instead of only "End of orders".

When you modify the shared orders of one vehicle, it affects all the vehicles sharing those orders, so you can e.g. change the full-load condition on a station, or add a waypoint, or similar, without needing to go through every single vehicle one by one.
User avatar
HayabusaShinkansen
Engineer
Engineer
Posts: 10
Joined: 10 Feb 2023 01:04

Re: Suggestion: Copy trains and their schedule for new station

Post by HayabusaShinkansen »

Thanks for the suggestions though apologies for not being clear. I already use the Ctrl-key in the cloning process and that helps, but what I'd like is to be able to do the operation in fewer clicks: Be able to select the new station and original station (the one whose trains and train orders are being duplicated) and do it in one go, without having to clone the trains one-by-one. Sort of a "Clone trains and their orders from {old} station, where {old} station in those trains orders are replaced with {new} station" button. Does that make sense?
User avatar
jfs
Tycoon
Tycoon
Posts: 1764
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Suggestion: Copy trains and their schedule for new station

Post by jfs »

What I do for that is copy (not clone) one of the vehicles from the existing route, fix the orders of the copy, then clone that copy as many times as needed.

Besides, my experience/recommendation is that routes from two different stations never need exactly the same number of vehicles, because the distance and production rate is almost always different.
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Suggestion: Copy trains and their schedule for new station

Post by Eddi »

The main problem with this kind of suggestion is:

how do you formulate the feature in a way that
  1. more than the original author understands what it does
  2. more than the original use case is covered
and with the current explanation i fail to see either of these.

otherwise i'm with jfs on this:
  1. clone one train (2 clicks)
  2. fix orders once (a handful of clicks)
  3. share-clone this new train a bunch of times (can be done with a single click (per train))
i don't really see a way to reduce these clicks any further.
User avatar
HayabusaShinkansen
Engineer
Engineer
Posts: 10
Joined: 10 Feb 2023 01:04

Re: Suggestion: Copy trains and their schedule for new station

Post by HayabusaShinkansen »

> @Eddi: The main problem with this kind of suggestion is: how do you formulate the feature in a way that more than the original author understands what it does more than the original use case is covered and with the current explanation i fail to see either of these.

Agree the fact I couldn't explain my suggestion clearly suggests the suggestion could be flawed or at least not for a wide audience.

> @jfs: Besides, my experience/recommendation is that routes from two different stations never need exactly the same number of vehicles, because the distance and production rate is almost always different.

Playing styles might be an issue here: I don't combine different cargos on the same train, because the production rates vary, even for the same station over time.
Instead I have single cargo trains, so as soon as they are full, they can go. less waiting, and (probably?) more efficient.

But yes. Everyone has their own playing style.

> @jfs: What I do for that is copy (not clone) one of the vehicles from the existing route, fix the orders of the copy, then clone that copy as many times as needed.

> @Eddi: otherwise i'm with jfs on this:
> clone one train (2 clicks)
> fix orders once (a handful of clicks)
> share-clone this new train a bunch of times (can be done with a single click (per train))
> i don't really see a way to reduce these clicks any further.

To me (personally) that's too many clicks. I had a huge binge on OpenTTD a few years ago, and although I break it out occasionally,
I find repeating those same clicks over and over again drives me crazy, to the point I can't face playing it.

Here's a way to do it in two clicks (three if the depot needs to be explicitly stated too):
openttd-mod-1.jpg
openttd-mod-1.jpg (194.36 KiB) Viewed 1682 times
That would likely be a ctrl-click:
openttd-mod-2.jpg
openttd-mod-2.jpg (395.86 KiB) Viewed 1682 times
openttd-mod-3.jpg
openttd-mod-3.jpg (321.85 KiB) Viewed 1682 times
Seems no one else is interested so if the main branch doesn't want it, I won't be offended, but I've been exploring modifying the OpenTTD source for OpenTTD3D anyway, so could be a good learning experience for me. If someone can give me hints how I might approach this - wouldn't mind doing it even if it's just for my branch (assuming I can't do this with scripting).

A broader requirement might be: This is really about rapidly configuring a new station. Agree buying trains and scheduling is a rite of passage for an OpenTTD player, but after you've done it a thousand times, it'd be good to semi-automate that so the player can concentrate on broader aspects of the game. It could be by cloning the station as shown above, or it could be a more general function which simply looks at what is supplying the station, adds those trains automatically and schedules them going to the nearest connected industry or transfer station. For me, this would substantially increase at least my enjoyment of the game. I'm open to implementing either.
User avatar
jfs
Tycoon
Tycoon
Posts: 1764
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Suggestion: Copy trains and their schedule for new station

Post by jfs »

HayabusaShinkansen wrote: 24 Aug 2023 02:00 > @jfs: Besides, my experience/recommendation is that routes from two different stations never need exactly the same number of vehicles, because the distance and production rate is almost always different.

Playing styles might be an issue here: I don't combine different cargos on the same train, because the production rates vary, even for the same station over time.
Instead I have single cargo trains, so as soon as they are full, they can go. less waiting, and (probably?) more efficient.

But yes. Everyone has their own playing style.
This isn't a question of playing style. Combining multiple cargoes on a single train is indeed very rare in transport games
My point is that if you have station A producing coal, and delivering to station B, and you now build station C which also produces coal, then: The production rate at station A and C will be different. The distances A-B and C-B will be different. For those two reasons, the capacity required on the A-B and C-B routes are different. So you'll need a different number of trains on the two routes anyway. Doing a mass-cloning of all the trains from A-B to run C-B will create possibly just as much extra work for you, because you will need to sell some or create more of them to match the capacity requirements of the different route.
And what if your network is complex enough that you need waypoints to get the vehicles going the desired route, and any waypoints in the vehicle orders probably can't be updated in an automated way to use some different appropriate ones. (If the waypoints could be updated automatically, then they wouldn't be needed in the first place regardless!) And then you're back to manually modifying the orders again.

This just sounds to me like such a narrow use case with such tight constraints on usefulness that I doubt it would really be worth pursuing at all.
User avatar
HayabusaShinkansen
Engineer
Engineer
Posts: 10
Joined: 10 Feb 2023 01:04

Re: Suggestion: Copy trains and their schedule for new station

Post by HayabusaShinkansen »

Good point you wouldn't want to duplicate *all* the trains at the original station. When I do the process manually, I copy one of each and only clone those when waiting cargo at the station demands it. Another complication I realized was trains which are no longer being sold. They have to be substituted anyway.
jfs wrote: 24 Aug 2023 06:05 This just sounds to me like such a narrow use case with such tight constraints on usefulness that I doubt it would really be worth pursuing at all.
What about the broader requirement I described in that post:
HayabusaShinkansen wrote: 24 Aug 2023 02:00 A broader requirement might be: This is really about rapidly configuring a new station. Agree buying trains and scheduling is a rite of passage for an OpenTTD player, but after you've done it a thousand times, it'd be good to semi-automate that so the player can concentrate on broader aspects of the game. It could be by cloning the station as shown above, or it could be a more general function which simply looks at what is supplying the station, adds those trains automatically and schedules them going to the nearest connected industry or transfer station. ...
That's a very broad use case, and what I'm trying to do is cut down the number of clicks in the process described in @Eddi's post:
Eddi wrote: 23 Aug 2023 22:36 otherwise i'm with jfs on this:
  1. clone one train (2 clicks)
  2. fix orders once (a handful of clicks)
  3. share-clone this new train a bunch of times (can be done with a single click (per train))
This would cut all that to one click, and you're still free to do it manually when you want to.
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 19 guests