FS#6181 - Cloning trains through number - Display list companies trains , train length tile

Attached to Project: OpenTTD
Opened by MarekMedved (marek17) - Thursday, 04 December 2014, 19:18 GMT
Last edited by andythenorth (andythenorth) - Friday, 01 September 2017, 07:57 GMT
Type Feature Request
Category Vehicles → Clone vehicles
Status Closed
Assigned To Petr Kalivoda (petrkalivoda)
Operating System All
Severity Low
Priority Normal
Reported Version 1.4.4
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


I have one locomotive and 7 wagons, I need the whole kit train clone 40 times. It is my job and still uncomfortably click "clone train". Can anything be done through a number I enter, with this number I clone 40 new locomotive with wagons.

For all locomotives not visible length of the full set.
(manage list)
I have the inclination, therefore, 40 new locomotives, which are located in the non-inclusion of trains. I'm too busy, every train manually moved to the new group. I would check all newly created trains (as in download newgrf) and edit the list would be the possibility of transferring trains to the desired group.

   OP3.png (613.9 KiB)
   OP2.png (342.7 KiB)
   op1.png (528.6 KiB)
This task depends upon

Closed by  andythenorth (andythenorth)
Friday, 01 September 2017, 07:57 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Similar to  FS#2402  , which was rejected. Cloning via ctrl-click is acceptable, adding a UI with a number to type in adds more complexity. Already cloning is hard to learn, as it can be achieved in multiple ways, with magic modifier keys that affect shared orders. Adding more complexity there is not a current goal for OpenTTD.

Flyspray clean up, so closing this. Thanks for the suggestion.
Comment by frosch (frosch) - Friday, 05 December 2014, 19:24 GMT
Some hints I am not sure you know about:
- You can also clone vehicles via the vehicle window instead of via the depot window, when the vehicle is inside a depot. That saves mouse movement.
- Use Ctrl+Click on the clone to share orders. This will also prevent a vehicle window being opened for the new vehicle.
- Cloning also copies the group.
- Ctrl+Drag in the group window moves all vehicles sharing orders.

More about shared orders:
Comment by Petr Kalivoda (petrkalivoda) - Wednesday, 13 May 2015, 23:43 GMT
Hi. I've made a patch that allows cloning of multiple vehicles at once.
Please note that this is my first patch, so please don't be too harsh with me, any suggestions are most welcome.
Comment by Petr Kalivoda (petrkalivoda) - Thursday, 14 May 2015, 00:06 GMT
I have normalized spacing in localisation files and uncommented some wrongly commented-out code.
Comment by Retro (retro) - Thursday, 14 May 2015, 00:26 GMT
Hello Peter.

I would suggest to refactor this patch into less "hackish" one by introducing new command called "CmdMultiCloneVehicle" and calling that instead of calling CmdCloneVehicle multiple times. Check command_type.h and vehicle_cmd.cpp. You can handle CommandCost for whole operation there at once. The same stands for game item limits. It will be great to make this multiple cloning operation "transactional" and ensure it can be finished before any action is made or show error message for example with cost of whole operation.