Any further criticism/suggestions are welcome.
Patch: faster cloning
Moderator: OpenTTD Developers
Patch: faster cloning
This patch lets you build N clones (trains, ships, road vehicles, etc.) at once. This behaviour is triggered by double-clicking on the "clone vehicle" button in a depot. Otherwise you shouldn't notice any difference as a single click will still yield the old behaviour.
Any further criticism/suggestions are welcome.

Any further criticism/suggestions are welcome.
- Attachments
-
- clone_v1.png (186.15 KiB) Viewed 2151 times
Last edited by Antdovu on 12 Nov 2008 11:14, edited 5 times in total.
Re: Patch: faster cloning
Nice. Now you need to add the option to start them at once. 

Re: Patch: faster cloning
That option already exists, try the little green flag in the depot window.INP wrote:Nice. Now you need to add the option to start them at once.
- CommanderZ
- Tycoon
- Posts: 1872
- Joined: 07 Apr 2008 18:29
- Location: Czech Republic
- Contact:
Re: Patch: faster cloning
Nice idea. It should not be the primary mean of cloning vehicles though, I would be great if just pressing the clone button made one clone (the current behavior) and pressing the clone button along with shift would open your dialog. It should be compatible with ctrl too to make shared orders.
Re: Patch: faster cloning
Shift is already in use for getting the cost of an action without actually executing that action. I do like this suggestion, but as CommanderZ says not as a replacement for the current way of cloning vehicles, becuase cloing a vehicle 5 times requires just 5 clicks, while with this patch it'll require
1) click on clone button
2) type new number,
3) click ok.
I'm not to sure if this new system is any faster for 10 or less vehicles.
1) click on clone button
2) type new number,
3) click ok.
I'm not to sure if this new system is any faster for 10 or less vehicles.
- CommanderZ
- Tycoon
- Posts: 1872
- Joined: 07 Apr 2008 18:29
- Location: Czech Republic
- Contact:
Re: Patch: faster cloning
Hmm, I alt is free?
-
- Chairman
- Posts: 776
- Joined: 20 Jan 2007 12:08
- Location: Germany
Re: Patch: faster cloning
To be honest, I don't see a real need for this. As Yexo wrote: A vehicle stopped in a depot can already be cloned with a single click on the appropriate button in the vehicle view window. And whether you click once, five times or even ten times is not that much of a difference.
And how many vehicles do you want to send out at once? I've never had the need for more than 10 (and even that only with additional patch support so that the vehicles don't cluster).
And how many vehicles do you want to send out at once? I've never had the need for more than 10 (and even that only with additional patch support so that the vehicles don't cluster).
This interferes with bindings from desktop environments (e.g. my KDE uses <ALT>-click for moving windows around).CommanderZ wrote:Hmm, I alt is free?
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
Re: Patch: faster cloning
The behaviour:
Shift+click: just estimate the cost of making N clones
Ctrl+click: makes N clones with shared orders
Click: makes N unrelated clones
Why is this useful?
* Easy to make an exact number of copies
* The single click method requires the vehicle to be in the same depot in which you want to build more of them.
* It isn't hard to imagine a situation when you might want to have more than 10 road vehicles on a single route.
* There people who want 20+ trains serving the same route.
* Somewhat simplifies converting from one incompatible railway type to another.
Shift+click: just estimate the cost of making N clones
Ctrl+click: makes N clones with shared orders
Click: makes N unrelated clones
Why is this useful?
* Easy to make an exact number of copies
* The single click method requires the vehicle to be in the same depot in which you want to build more of them.
* It isn't hard to imagine a situation when you might want to have more than 10 road vehicles on a single route.
* There people who want 20+ trains serving the same route.
* Somewhat simplifies converting from one incompatible railway type to another.
- CommanderZ
- Tycoon
- Posts: 1872
- Joined: 07 Apr 2008 18:29
- Location: Czech Republic
- Contact:
Re: Patch: faster cloning
The problem is, that you usually make one, two or so clones - and for that is your method uncomfortable. It must be only an option.
Re: Patch: faster cloning
Rather then having to put in a value, you should just make 5 clones rather than one. That will probably be enough. and 5 clicks would already make 25 clones that way.
It takes an athlete to dance, but an artist to be a dancer. - Anonymous
Re: Patch: faster cloning
Would it be possible to have it where you can hold a number 1-9 and click clone and it makes that many clones?
Jon
-
- Chairman
- Posts: 776
- Joined: 20 Jan 2007 12:08
- Location: Germany
Re: Patch: faster cloning
I think there is a double-click event in OpenTTD (which I would expect to happen additionally to the click event, but I'm not totally sure). So, that's what I propose:
@Antdovu: Don't get me wrong, I don't want to put your effort down. Any help with the code is appreciated. It's just that I for one don't feel the need for this feature and I completely agree with CommanderZ that it shouldn't interfere (i.e. increase the number of necessary actions) with traditional copying/cloning in any way.
- Have an advanced setting to set N
- (Ctrl-)Click copies/clones one vehicle
- (Ctrl-)Doubleclick copies/clones N vehicles (so probably another N-1 vehicles)
@Antdovu: Don't get me wrong, I don't want to put your effort down. Any help with the code is appreciated. It's just that I for one don't feel the need for this feature and I completely agree with CommanderZ that it shouldn't interfere (i.e. increase the number of necessary actions) with traditional copying/cloning in any way.
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
Re: Patch: faster cloning
Forgive my curiosity, but when did "I don't think I'll be using this totally optional feature in my game" start meaning "this feature is useless and you're wasting my time"?
Re: Patch: faster cloning
Who said so? Personally I don't think I'll be using this feature and the only thing I want is that the current behaviour (cloning in a single click) remains possible. If that is done by creating a patch option that enables the new gui that is fine by me, as I'll just disable that patch and use the current behavior.Teeg wrote:Forgive my curiosity, but when did "I don't think I'll be using this totally optional feature in my game" start meaning "this feature is useless and you're wasting my time"?
Basically I'm ok with it as long as it remains totally optional.
Re: Patch: faster cloning
I for one like this idea, i often have the tideous work of cloning 200 trains for something.
To move A LOT of goods i simply make a grid that allow the trains to select what is ahead of them, like a station or a transmissionmanline in the network, that way i can load 10 tracks on a station at once and all trains can access all tracks.
A small thing i built that very few people seem to use as far as i have seen.
But it make use of huge ammounts of trains.
I guess i like making systems
To move A LOT of goods i simply make a grid that allow the trains to select what is ahead of them, like a station or a transmissionmanline in the network, that way i can load 10 tracks on a station at once and all trains can access all tracks.
A small thing i built that very few people seem to use as far as i have seen.
But it make use of huge ammounts of trains.
I guess i like making systems

-
- Chairman
- Posts: 776
- Joined: 20 Jan 2007 12:08
- Location: Germany
Re: Patch: faster cloning
Why do you think it started meaning that? At least, I don't see a post that gives that impression and unfortunately, you forgot to mention which post(s) you were referring to.Teeg wrote:Forgive my curiosity, but when did "I don't think I'll be using this totally optional feature in my game" start meaning "this feature is useless and you're wasting my time"?
If that was aimed at my post (which was the last before), I suggest you reread it as it could be subsumed by "I don't think I'll be using this feature and if this should go to trunk it should become totally optional" And I made some suggestions how to make it totally optional (which it isn't in the current implementation).
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
Re: Patch: faster cloning
double click for this feature is silly too, if you want to quickly clone 2 vehicles, what do you do? - click the button twice! and then that dialog appears just to enter a "2"? not very handy
Re: Patch: faster cloning
Some of you seem to be misunderstanding what exactly I changed. There are two clone buttons with different behaviours.dihedral wrote:double click for this feature is silly too, if you want to quickly clone 2 vehicles, what do you do? - click the button twice! and then that dialog appears just to enter a "2"? not very handy
- Red circle: available on a vehicle, only as long as it is in a depot. This allows you to clone with one click. I changed nothing here.
- Green ellipse: available in depots. You have to click "clone vehicle" and then select the vehicle to clone. It currently takes 2 clicks per vehicle. I changed it to keep working the way it does if you single-click it and give you a prompt if you double-click it. If you attempted to double click it in 0.6.3 (for example) then you would just rapidly activate & deactivate the "clone vehicle" button. Nothing interesting would happen that way.
Re: Patch: faster cloning
Ah, this is something else of course.
However, double clicking a button is not really intuitive. What about a drop down button like it is used in the new order gui?
However, double clicking a button is not really intuitive. What about a drop down button like it is used in the new order gui?
-
- Chairman
- Posts: 776
- Joined: 20 Jan 2007 12:08
- Location: Germany
Re: Patch: faster cloning
Count me to one of thoseAntdovu wrote: Some of you seem to be misunderstanding what exactly I changed.

Then everything is fine.Antdovu wrote:
- Red circle: available on a vehicle, only as long as it is in a depot. This allows you to clone with one click. I changed nothing here.
So, I think you managed to suit everybody now. Good work.Antdovu wrote:[/list]
- Green ellipse: available in depots. You have to click "clone vehicle" and then select the vehicle to clone. It currently takes 2 clicks per vehicle. I changed it to keep working the way it does if you single-click it and give you a prompt if you double-click it. If you attempted to double click it in 0.6.3 (for example) then you would just rapidly activate & deactivate the "clone vehicle" button. Nothing interesting would happen that way.
Normally, I'd say it is quite intuitive, but you're right in that OpenTTD does use double click only rarely (or not at all?). However, I think it will be fine if the tooltip mentions it. I think a drop-down is overkill for only two options.Roujin wrote: However, double clicking a button is not really intuitive. What about a drop down button like it is used in the new order gui?
BTW, given that we had a misunderstanding here: I think <CTRL> is only used when clicking on the vehicle you want to clone not on the clone button in depot, is it? So despite what was stated earlier, <CTRL> could be used.
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
Who is online
Users browsing this forum: Baidu [Spider] and 2 guests