Page 13 of 14

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

Posted: 03 Feb 2020 12:17
by McDeffice
kamnet wrote: 03 Feb 2020 05:26 You're attempting to apply a patch written for OpenTTD 1.8.0 (over 2 years ago) against OpenTTD 1.9.3 (several months ago). Source code is continually updated. In order to successfully apply this patch you will first need to update the patch to match the changes in the source code. The failed lines will give you a clue as to what's changed. You'll probably need to analyze the 1.8.0 code to figure that out.

Also, if you apply a patch against OpenTTD 1.9.3, it no longer is technically version 1.9.3, and it will not be compatible with other 1.9.3 clients. It's best to apply it against a nightly, so at least you get the benefits of game improvements and bug fixes.
Thank you for your response and this information.
I have some knowledge of English, sorry if I misunderstand or speak poorly. excuse me.
Indeed the code is updated continuously. An OpenTTD version 1.10.0-beta2 is available. https://www.openttd.org/downloads/opent ... sting.html

I understand that if I modify the code - with a patch - The client is that technically it no longer has the same version, an improvement is to be made. does this mean that this version is no longer compatible with other Openttd Clients of the same original version?

I am thinking of communities such as n-ice or btpro which modify the connection interface as well as some aspects of the client side of the game. This client remains recognized as version 1.9.3 and allows connection to servers 1.9.3. No verification of checksums is carried out.


The patch I'm trying to apply is for version 1.8.0 at least two years ago.

In the meantime, some lines that the patch trying to match may have moved or been changed. This explains why the patch does not know how to carry out the insertion of code to implant the clipboard in several files.

Is the solution to look at the lines that the patch can no longer find and modify so that it can return to where the modifications are to be made?

Or is it some more complicated things because between 1.8.0 and 1.9.3 the coding style to change and functionality have been completely replaced? Perhaps dependencies that have evolved and the way of typing to change?

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

Posted: 03 Feb 2020 12:44
by jfs
There's been several changes to code style standards since 1.8, which will make most old patches unable to apply. There's also many new features that have touched files and functions all across the code, which patches will need to be adjusted to. Making it work again might need rewriting large parts of the code.

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

Posted: 30 Apr 2020 16:07
by staale
I have managed to rebase 1.10.0 on top of the 1.8 version with the clipboard patch, and have pushed this to my own github:

https://github.com/staale/OpenTTD/tree/clipboard-1.10.0

I have just briefly tested this, and it works for me. I will try and play a bit more with it to see if I encounter any more errors. There where about 1300 commits to rebase, and quite a few merge errors. I am not a C++ developer, so I had to make a best effort to fix things. However, everything compiles now, and I have installed it in Manjaro via the openttd-git package there. I will report back if I continue to develop this, or find any issues.

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

Posted: 30 Apr 2020 18:24
by agentw4b
staale wrote: 30 Apr 2020 16:07 I have managed to rebase 1.10.0 on top of the 1.8 version with the clipboard patch, and have pushed this to my own github:

https://github.com/staale/OpenTTD/tree/clipboard-1.10.0

I have just briefly tested this, and it works for me. I will try and play a bit more with it to see if I encounter any more errors. There where about 1300 commits to rebase, and quite a few merge errors. I am not a C++ developer, so I had to make a best effort to fix things. However, everything compiles now, and I have installed it in Manjaro via the openttd-git package there. I will report back if I continue to develop this, or find any issues.
Could you make an .exe file for people who can't compile and patch the program?

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

Posted: 01 May 2020 06:14
by staale
agentw4b wrote: 30 Apr 2020 18:24 Could you make an .exe file for people who can't compile and patch the program?
Unfortunately it crashed pretty quickly once I tried to copy and paste some larger structures.

I will see if I can make an exe - though I am not sure how as I currently play this on linux.

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

Posted: 06 May 2020 09:09
by agentw4b
staale wrote: 01 May 2020 06:14

Unfortunately it crashed pretty quickly once I tried to copy and paste some larger structures.

I will see if I can make an exe - though I am not sure how as I currently play this on linux.
Eventually I created openttd.exe from your application source, but quite often the game crashes, so it's not completely fixed.
But when I have an almost blank map without industry and few cities, it works and that's enough for me. Thank you and I am putting here to download a compiled program in the form of a ZIP for Windows 10 64bit. But I can't guarantee it will work on all computers because I'm not a programmer and I can't fix these things.
clipboard.zip
(20.05 MiB) Downloaded 202 times

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

Posted: 06 May 2020 10:24
by agentw4b
agentw4b wrote: 06 May 2020 09:09
staale wrote: 01 May 2020 06:14

Unfortunately it crashed pretty quickly once I tried to copy and paste some larger structures.

I will see if I can make an exe - though I am not sure how as I currently play this on linux.
Eventually I created openttd.exe from your application source, but quite often the game crashes, so it's not completely fixed.
But when I have an almost blank map without industry and few cities, it works and that's enough for me. Thank you and I am putting here to download a compiled program in the form of a ZIP for Windows 10 64bit. But I can't guarantee it will work on all computers because I'm not a programmer and I can't fix these things.

clipboard.zip
I'm sorry, but this is not a suitable exe. Unfortunately, the game crashes very often. I will probably have to wait for someone to properly adapt the patch to the new versions of OpenTTD :-(

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

Posted: 02 Jun 2020 17:54
by Torben DH
agentw4b wrote: 06 May 2020 10:24
agentw4b wrote: 06 May 2020 09:09
staale wrote: 01 May 2020 06:14

Unfortunately it crashed pretty quickly once I tried to copy and paste some larger structures.

I will see if I can make an exe - though I am not sure how as I currently play this on linux.
Eventually I created openttd.exe from your application source, but quite often the game crashes, so it's not completely fixed.
But when I have an almost blank map without industry and few cities, it works and that's enough for me. Thank you and I am putting here to download a compiled program in the form of a ZIP for Windows 10 64bit. But I can't guarantee it will work on all computers because I'm not a programmer and I can't fix these things.

clipboard.zip
I'm sorry, but this is not a suitable exe. Unfortunately, the game crashes very often. I will probably have to wait for someone to properly adapt the patch to the new versions of OpenTTD :-(
I have used this exe for the last couple of weeks and not experiencing many crashes.

But dont copy bridges and tunnels or it will crash.

For some reason ctrl+build station is broken.

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

Posted: 20 Jan 2021 15:42
by DayLight9382
anybody here fixing this? :-(

My friends and me want so make another Monster Map, and without copy&paste of crucial connections thats not fun at all :-(

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

Posted: 29 Jan 2021 21:00
by _dp_
FWIW, I just posted an experimental version of CityMania client with copy&paste tool and am currently gathering feedback. It's not based on this particular patch but from what I've read here it should be relatively similar. You can get it here: https://citymania.org/forum/topic/123

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

Posted: 12 Feb 2021 20:28
by DayLight9382
Hi all,

this is something I want to copy & paste.
or even more complicated train crossings....
Unbenannt.PNG
(931.4 KiB) Not downloaded yet

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

Posted: 15 Feb 2021 18:11
by Dante123
DayLight9382 wrote: 20 Jan 2021 15:42 anybody here fixing this? :-(

My friends and me want so make another Monster Map, and without copy&paste of crucial connections thats not fun at all :-(
yea same here;
Tried to do a marathon playtrough with a friend on a 4kx4k map; but after the 20th leafclover crossing i wish i could compile this into my fav. patchpack :mrgreen:

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

Posted: 21 Feb 2021 16:32
by agentw4b
_dp_ wrote: 29 Jan 2021 21:00 FWIW, I just posted an experimental version of CityMania client with copy&paste tool and am currently gathering feedback. It's not based on this particular patch but from what I've read here it should be relatively similar. You can get it here: https://citymania.org/forum/topic/123
It doesn't reach many of the features of the original patch, but at least thanks for something. The good thing is that the game still looks like 1.10.3 :-) Please try to improve it even more, especially rotating objects around the axis would be good.

...Unfortunately, it is not stable, the game crashes with that. :-(

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

Posted: 21 Feb 2021 17:47
by _dp_
agentw4b wrote: 21 Feb 2021 16:32 It doesn't reach many of the features of the original patch, but at least thanks for something. The good thing is that the game still looks like 1.10.3 :-) Please try to improve it even more, especially rotating objects around the axis would be good.

...Unfortunately, it is not stable, the game crashes with that. :-(
It does have rotation. And if you have a crash please report it properly, just saying that it crashes isn't helpful :p

Template creating for rails

Posted: 26 Feb 2021 14:09
by QbuS
Hello everyone!

I want to use the copypaste grf. But i dont know how to install it. The thread about this grf is very old so i dont know if its a good idea to write in this thread. So:

How to make this grf working?
Is there a "better" or newer grf for the exact same purpose?

Im new to this forum so if i created this thread in the wrong sub forum im sorry :(

Have a nice day!

[Moderator note: this post, and the next two, were merged back into the Clipboard patch thread -- Kamnet]

Re: Template creating for rails

Posted: 26 Feb 2021 14:35
by _dp_
It's not a grf, you need a modified version of the game to use copy&paste. And AFAIK the only one currently working is the experimental branch of CityMania client. It's fully compatible with vanilla OpenTTD version so you can just download and use it instead without losing any savegame or network compatibility. You can read more about it here: https://citymania.org/forum/topic/123-c ... ta-testing

Re: Template creating for rails

Posted: 26 Feb 2021 15:21
by QbuS
Thx! i will try this one!

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

Posted: 02 Mar 2021 20:23
by agentw4b
It does have rotation. And if you have a crash please report it properly, just saying that it crashes isn't helpful :p
Just a running game with this client will fall in a few minutes, I don't know why and what more can I tell you about it. And I didn't find the objects rotating.

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

Posted: 28 May 2021 14:44
by jez
It's a shame this patch didn't add a button in its clipboard panel for "persist clipboard". The clipboard could be persisted between games, meaning you could load a map with useful track structures, copy from there, then load your game and paste into there. Alas, the clipboard is cleared when you load and I don't think there's a way to stop that.

Re: Template creating for rails

Posted: 04 Jun 2021 00:45
by McDeffice
_dp_ wrote: 26 Feb 2021 14:35 It's not a grf, you need a modified version of the game to use copy&paste. And AFAIK the only one currently working is the experimental branch of CityMania client. It's fully compatible with vanilla OpenTTD version so you can just download and use it instead without losing any savegame or network compatibility. You can read more about it here: https://citymania.org/forum/topic/123-c ... ta-testing
Very Nice Job ! very tks