[patch] Clipboard (a/k/a "Copy and Paste")

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
kamnet
Moderator
Moderator
Posts: 8548
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by kamnet »

Klaatu wrote:
shorty66 wrote:I really like this patch...Do you think this patch will make it to the trunk soon?
Don't hold your breath.

Playing OTTD without this patch is like using a text editor without basic copy and paste functionality, and who in their right mind would do that?
I've played with patch packs that implement this patch, and I've never once felt the need to use it. *shrugs*
lcd_47
Engineer
Engineer
Posts: 78
Joined: 27 Sep 2006 18:04

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by lcd_47 »

kamnet wrote:I've played with patch packs that implement this patch, and I've never once felt the need to use it. *shrugs*
Try building some 40 hubs on a LL_RR sideline. Chances are you'll feel the need for copy & paste before you're half way through it. :lol:
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by Alberth »

lcd_47 wrote:
kamnet wrote:I've played with patch packs that implement this patch, and I've never once felt the need to use it. *shrugs*
Try building some 40 hubs on a LL_RR sideline. Chances are you'll feel the need for copy & paste before you're half way through it. :lol:
And try doing that on a non-flat map, where you build on the terrain instead of through it by flattening everything. In that situation, the terrain is different everywhere, and every hub is unique.

In other words, it totally depends on your style of playing whether copy/paste is of any use.
Being a retired OpenTTD developer does not mean I know what I am doing.
lcd_47
Engineer
Engineer
Posts: 78
Joined: 27 Sep 2006 18:04

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by lcd_47 »

Alberth wrote:
lcd_47 wrote:
kamnet wrote:I've played with patch packs that implement this patch, and I've never once felt the need to use it. *shrugs*
Try building some 40 hubs on a LL_RR sideline. Chances are you'll feel the need for copy & paste before you're half way through it. :lol:
And try doing that on a non-flat map, where you build on the terrain instead of through it by flattening everything. In that situation, the terrain is different everywhere, and every hub is unique.
True. Does that invalidate my point that there are situations where it is a life saver?
Alberth wrote:In other words, it totally depends on your style of playing whether copy/paste is of any use.
Agreed again. Does it invalidate my point though?
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by Alberth »

What point would that be, exactly?

If the point is that you need a c&p patch if you make 40 hubs, I'd say your point is invalid, as there are game styles where a c&p patch won't do anything useful at all even when you have to build 40 or more junctions. If you add the restriction that you either play on a completely flat map or level all hills before making a junction, AND you always make the exact same junction, then sure, I can see that a c&p patch can be useful.


I used to level parts of the map in my early days as well. However, I found that leaving the terrain intact gives you much more satisfying challenges, as you have to think how to get around terrain obstacles, rather than from A to B, in one long boring straight line.

If you see copying junctions as the biggest problem in playing, why not make it more interesting by changing how you build?
Being a retired OpenTTD developer does not mean I know what I am doing.
lcd_47
Engineer
Engineer
Posts: 78
Joined: 27 Sep 2006 18:04

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by lcd_47 »

Alberth wrote:What point would that be, exactly?
That copy & paste can be a highly useful feature for some people.

This patch has been around in some form or another for a very, very long time. I think I first saw it in TTDPatch. I haven't looked at the code, and for all I know there might be 99 technical reasons for not including it in the official release. But being useless is not one of them. And implying that people who have been hoping for all these years to see copy & paste included are idiots that don't get the lofty goals of OpenTTD just because you don't see an use for it, is not very nice. In my humble opinion it's actually offensive and myopic.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by Alberth »

|I was not implying anything. I am a techy, which means I separate arguments from emotions when discussing points. I don't imply things I don't write, especially at points where precision of what you say is important.

You asked me twice whether your point is invalid. If you look at your question as you wrote it LITERALLY, it is an invalid statement, since you're making assumptions on play style without mentioning them, ie your statement is underspecified.

I pointed that out, by distinguishing two cases, one with the original statement explaining how the statement can be falsified, and one with the additional requirement of play-style. As you can read, in the latter case I agree the c&p patch can be useful. That's all I said, and that's all I intended.

I also stated it is not my play style, which means just that, my play style is not better or smarter or whatever, it's just different. That doesn't say anything about people that do like that play style.
I also stated I have no personal interest in the patch, and suggested a small change in play style as a work around around the problem. If you don't want to do that, it's fine.

"no personal interest" means exactly that, I have no use for the c&p patch if it were part of OpenTTD, and no desire to develop such a patch either. I didn't say it was entirely useless in general (see the 2nd case description where I say the opposite). I am also not a-priory against such a patch.

I can see you are disappointed in not having the c&p patch in trunk, but the implementations of the patch so far are not up to standard with the other code. We aim for a stable game no matter what (you also don't want the game to crash if you do an unusual c&p action), and that requires code quality such that it ALWAYS works, and not just the average simple case (which you normally use 99% of the time). Making such code takes a lot of time and effort.

(Where time of existence in TTDPatch is totally irrelevant here, as OpenTTD and TTDPatch have no shared code base.)
Being a retired OpenTTD developer does not mean I know what I am doing.
User avatar
kamnet
Moderator
Moderator
Posts: 8548
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by kamnet »

Indeed, my comment wasn't about invalidating the usefulness of this patch, but the idea that this patch is so fundamentally important that everybody must use it.
lcd_47
Engineer
Engineer
Posts: 78
Joined: 27 Sep 2006 18:04

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by lcd_47 »

Alberth wrote:If you look at your question as you wrote it LITERALLY, it is an invalid statement, since you're making assumptions on play style without mentioning them, ie your statement is underspecified.
As far as I can tell the initial discussion was about opinions, which are by definition subjective. But, since you're a techie and you seem to want to analyse opinions by formal logic, let's do it, I'm game. :D

Let's look at what I said. My first claim:
lcd_47 wrote:Try building some 40 hubs on a LL_RR sideline. Chances are you'll feel the need for copy & paste before you're half way through it.
The negation of this statement would be something like this: "in a random game, if you build 40 hubs on a LL_RR sideline, you have less than 50% chances of feeling a need for copy & paste before you're half way through it". To prove that, you'd have to describe the set of all possible games, then you'd have to define what it would take to "feel the need for copy & paste". Then you'd have to define a field of probabilities, and prove that the above probability is less than 1/2. I don't think you managed to do that.

My second claim:
lcd_47 wrote:there are situations where it is a life saver
The negation of this is: "in no situation cut & paste can possibly be a life saver". Not only you didn't prove that, but you actually formally invalidated your own point, by claiming that:
Alberth wrote:If you add the restriction that you either play on a completely flat map or level all hills before making a junction, AND you always make the exact same junction, then sure, I can see that a c&p patch can be useful.
And yes, I'm assuming we can agree to alias "being a life saver" to "being useful".
kamnet wrote:Indeed, my comment wasn't about invalidating the usefulness of this patch, but the idea that this patch is so fundamentally important that everybody must use it.
Well, yes, nobody has yet run screaming in horror at the lack of copy & paste (at least as far as I know). But it would still be a nice feature, and I think there is abounding evidence that many people would find it useful.
Eddy Arfik
Transport Coordinator
Transport Coordinator
Posts: 260
Joined: 09 Apr 2014 11:10

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by Eddy Arfik »

Alberth wrote:Yeah, most server owners with competitive play will greatly appreciate that some advanced users that can copy/paste large chunks of infra structure in less than a second.
Exactly why this patch should never make trunk, we can't even get drag&drop for NewObjects because of fears it will be abused in multiplayer
Klaatu wrote:Playing OTTD without this patch is like using a text editor without basic copy and paste functionality, and who in their right mind would do that?
No, it's more like playing Starcraft 2 without binding multiple actions to a single keystroke
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by planetmaker »

Eddy Arfik wrote:
Alberth wrote:Yeah, most server owners with competitive play will greatly appreciate that some advanced users that can copy/paste large chunks of infra structure in less than a second.
Exactly why this patch should never make trunk, we can't even get drag&drop for NewObjects because of fears it will be abused in multiplayer
In my mind that's two entirely different things which - at least myself - assess completely differently.

With respect to object building I meanwhile do see the benefit of a drag&drop building with the emergence of the many landscape objects which cry for this feature. As for gameplay effect: Building objects never give you a competitive advantage - while copying infrastructure does. And it doesn't exactly increase means of griefing - there are enough ways to build stuff in order to block players. However object drag&drop maybe could possibly be limited by similar settings like terraform_per_64k_frame and terraform_frame_burst
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by Alberth »

Eddy Arfik wrote:
Alberth wrote:Yeah, most server owners with competitive play will greatly appreciate that some advanced users that can copy/paste large chunks of infra structure in less than a second.
Exactly why this patch should never make trunk, we can't even get drag&drop for NewObjects because of fears it will be abused in multiplayer
You quoted with too little context here. That message was about client-side c&p patch (http://www.tt-forums.net/viewtopic.php? ... 1#p1135391).
That means two different OpenTTD versions could exist, one with the patch and one without the patch, in one MP game. That would mean users with the version that does have the c&p patch get a huge advantage to players that don't have it. I don't think that's wanted in any case.

If c&p would be added to trunk with server-side support, the playing field is still level for everybody. Interesting question is then whether people would be allowed to copy each other layouts.
Being a retired OpenTTD developer does not mean I know what I am doing.
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by adf88 »

Hi folks. I would like to disprove some false arguments (whether I desire to have C&P in trunk is a separate issue). I believe that this falseness comes from the lack of knowledge about abilities of the current C&P implementation.

1. C&P is useless if you don't level/terraform the terrain - wrong. You can use C&P without terraforming. If some parts are failing to paste (there is visual indication for this), you can correct problems manually.

2. C&P is useful only for copy-pasting large chunks e.g. whole junctions and it won't help creating unique structures - MEGA WRONG!!! My play style is also like yours, Alberth. I tend to create unique structures that fit to existing terrain and available space. Do I use C&P for this? Of course I do! C&P is very useful for micro copy-pasting. While your structures may be different and unique, there are always some repetitive chunks. Ans that's where the C&P comes handy. For example, lets look at some openttdcoop film e.g. this one. Can you see how many repetitive chunks there is? Can't you imagine how C&P would be useful?

3.
Eddy Arfik wrote:
Alberth wrote:Yeah, most server owners with competitive play will greatly appreciate that some advanced users that can copy/paste large chunks of infra structure in less than a second.
Exactly why this patch should never make trunk, we can't even get drag&drop for NewObjects because of fears it will be abused in multiplayer.
Like planetmaker noticed, there may be a C&P limit. And actually there is a configurable setting which allows to limit C&P area size. It exist since the very beginning of multiplayer support in my patch. Moreover, C&P respects all things like terraform_per_64k_frame etc.

4.
Alberth wrote:...That means two different OpenTTD versions could exist, one with the patch and one without the patch, in one MP game. That would mean users with the version that does have the c&p patch get a huge advantage to players that don't have it. I don't think that's wanted in any case.

If c&p would be added to trunk with server-side support, the playing field is still level for everybody. Interesting question is then whether people would be allowed to copy each other layouts.
Wrong again. In multiplayer, clipboard content is not being send to the server and then to clients. In multiplayer, C&P is actually a clone tool. Firstly you mark area to be cloned. Then you pick a place where to put a clone. Copy-pasting is performed directly from map to map. Thus:
- it's not possible to copy-paste structures of other players
- it's not possible to paste content loaded from the disk


If someone says that C&P is useless I say that he/she doesn't know how to use it. I know it's a bold assumption, but if you compare what I just wrote to what others wrote before, the assumption seems true.

Do I desire to have C&P in trunk? When it's about single player I do not care - I can always use my own, patched client. However, it would be nice to have C&P in multiplayer.
:] don't worry, be happy and checkout my patches
shorty66
Engineer
Engineer
Posts: 3
Joined: 11 Nov 2014 02:30

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by shorty66 »

As there is an option to limit c&p area, it is also possible to limit it to zero - effectively disabling c&p.
Thus there shouldn't be a problem - if you don't want c&p on your server, disable it. Just don't use that argument to block this patch from trunk.
Switchblade
Engineer
Engineer
Posts: 9
Joined: 29 Feb 2008 21:26

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by Switchblade »

Any ETA for a new version? I'm building 24 identical cities and having to measure them all, is really exhausting.
deep42thought
Engineer
Engineer
Posts: 4
Joined: 28 Oct 2014 13:46

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by deep42thought »

Hi,

although your patch is great, I think, I found a bug:
To reproduce:
download r26400, patch, compile, start new game, use the leveling-tool (hot key "E") and level some land diagonally (hold "ctrl" pressed)

The mistake is that somehow the wrong tiles are being (tried to) level(ed): If I do the above in the center of the map, usually some tiles straight to the left top at the edge of the map are being raised (leveled to the height, I originally clicked). Sometimes I get errors like "oil rig in the way", when there's an oil rig at this position.

greetings,
deep42thought
Starbud
Traffic Manager
Traffic Manager
Posts: 211
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by Starbud »

The first post says to download the nightly r26400.
I just noticed that it's not possible to find version 26400 online anymore, the link is broken and i can't find it by browsing trough the versions, the closest one are 23599 but i doubt it will do any good.
Does anyone know if there is a solution to the problem?
I bet it's located somewhere :)
I just cant find it :(
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se
deep42thought
Engineer
Engineer
Posts: 4
Joined: 28 Oct 2014 13:46

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by deep42thought »

Starbud wrote:The first post says to download the nightly r26400.
I just noticed that it's not possible to find version 26400 online anymore, the link is broken and i can't find it by browsing trough the versions, the closest one are 23599 but i doubt it will do any good.
Does anyone know if there is a solution to the problem?
I bet it's located somewhere :)
I just cant find it :(
Have a look at http://www.openttd.org/en/development
I'm uncertain how to use svn itself, I prefer git. There you find commit r26400 at this url
http://git.openttd.org/?p=trunk.git;a=c ... 928030f69d
I guess at the link named "snapshot" you can download the respective tarball.

greetings,
deep42thought
bugmenotbaby
Engineer
Engineer
Posts: 10
Joined: 01 Jun 2012 11:49
Contact:

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by bugmenotbaby »

Is this going to be ported to a newer version of openttd?
SpaceOne
Engineer
Engineer
Posts: 1
Joined: 06 Feb 2016 12:24

Re: [patch] Clipboard (a/k/a "Copy and Paste")

Post by SpaceOne »

Based on OpenTTD 1.5.3 and the_clipboard_2.0.0_beta1-ottd_r27325-git.patch i compiled a binary for Windows.
I tested it only under Windows 10 64bit. It seems that is works.
(It was my first time that i compiled code under a Public License. I hope i did everything right.)
openttd-1.5.3-clipboard.zip
(5.68 MiB) Downloaded 264 times
I used this instructions and sources:
https://wiki.openttd.org/Compiling_on_W ... sing_MinGW
https://www.dropbox.com/sh/cwlrdqux4vqbv9x/yvVcQ2345o
https://binaries.openttd.org/releases/1 ... source.zip

There was only one change neccesary:
In map_type.h i must changed in struct TileIndexDiffC int16 to int for x and y.
2016-02-06 14_12_15-OpenTTD 1.5.3-CLIPBOARD.png
2016-02-06 14_12_15-OpenTTD 1.5.3-CLIPBOARD.png (6.14 KiB) Viewed 12710 times
2016-02-06 14_14_50-OpenTTD 1.5.3-CLIPBOARD.jpg
(195.19 KiB) Not downloaded yet
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 6 guests