SharedOrders

From TTWiki
Jump to navigationJump to search

Vehicle orders can be shared or copied.

2.0.1 alpha 1 or later

Switch

Configuration file: sharedorders on|off

Command line: -XO

Description

With this feature, you can share orders between several vehicles, and modifying the order list on one vehicle will change all other linked vehicles as well. You can also just copy orders from one vehicle to another without sharing or linking them.

Since 2.0.1 alpha 12 or later, copying or sharing orders from other vehicles is only possible if the order list is empty.

To share orders:

  1. Open the vehicle orders window as usual, and click "Go to"
  2. Hold Ctrl and click on another vehicle instead of a station or depot.
  3. Now the two vehicles use the same schedule. If you modify the schedule of either of them, the other will change, too.

You can link as many vehicles as you want this way. For example, you can give the orders normally to the first vehicle of the route, then make the others share its schedule, so if you want to change the route later, you have to do it only once.

You can tell wheter a schedule is shared by looking at the last entry. If it's "End of orders", it's a normal schedule. However, if it's "End of shared orders", it applies to more vehicles. Shared orders use only one entry in the internal order list, no matter how many vehicles are using it. This means it's a way to conserve the limited number of orders (5000) if you have many vehicles.

If you do these steps without holding Ctrl, the orders will simply be copied instead of sharing them. Then you can change the orders of all vehicles independently.

You can reset a schedule (to clear it or to make it unshared) this way:

  1. Make sure that no orders are selected in the schedule window, or the last one ("End of (shared) orders") is selected.
  2. Press the Delete button of the window. All orders will be cleared from the schedule.
  3. If you do this on a vehicle with shared schedule, only that vehicle will be affected, the others will still have the shared schedule.

This way you can unlink a vehicle if you don't want it to use the shared schedule any more.

WARNING: Once you've started using this feature, don't turn it off! Shared orders continue to work correctly without the sharedorders switch, but as soon as you try to modify a shared order (this includes selling a vehicle that has shared orders), the schedules may get messed up and you'll have virtually no way to restore them. You don't want your trains to try to go to an airport, do you?

This feature works reasonably well in multiplayer as long as you have 2.0.1 alpha 10 or later.

This feature was contributed by Csaba Varga.