[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
Streckenläufer
Engineer
Engineer
Posts: 57
Joined: 22 Jun 2012 14:45
Location: Berlin-Germany

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

Post by Streckenläufer » 06 Feb 2016 20:51

Hello,
Thanks for the implementation, the binary works but when compiling appear error.
Attachments
fehler.jpg
fehler.jpg (198.03 KiB) Viewed 5032 times
MfG Streckenläufer
OpenTTD V1.7.1, r27930 - Trafficlight - Bridge/tunnel Signals - Watertunnel - HousePlacing - SeaplaneAirport - Clipboard - Win7 64bit - MinGW/msys
!Sorry for my google English translator!

User avatar
Streckenläufer
Engineer
Engineer
Posts: 57
Joined: 22 Jun 2012 14:45
Location: Berlin-Germany

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

Post by Streckenläufer » 08 Mar 2016 16:05

Hello adf88, I get the following error when compiled with mingw under Win7.
Openttd 1.6.0 RC1 - the_clipboard_2.0.0_beta1-ottd_r27325-svn.patch
Error in map.cpp you can help me?
Attachments
clip_fehler.jpg
(25.32 KiB) Not downloaded yet
clip_fehler1.jpg
clip_fehler1.jpg (68.64 KiB) Viewed 4987 times
MfG Streckenläufer
OpenTTD V1.7.1, r27930 - Trafficlight - Bridge/tunnel Signals - Watertunnel - HousePlacing - SeaplaneAirport - Clipboard - Win7 64bit - MinGW/msys
!Sorry for my google English translator!

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 » 11 Mar 2016 07:25

Try changing

Code: Select all

TileTransformation ret = { dtr, { to_x - tile.x, to_y - tile.y } };
to

Code: Select all

TileTransformation ret = { dtr, { (int16)(to_x - tile.x), (int16)(to_y - tile.y) } };
:] don't worry, be happy and checkout my patches

User avatar
Streckenläufer
Engineer
Engineer
Posts: 57
Joined: 22 Jun 2012 14:45
Location: Berlin-Germany

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

Post by Streckenläufer » 12 Mar 2016 00:12

Hello adf88,

this line produces more errors.
MfG Streckenläufer
OpenTTD V1.7.1, r27930 - Trafficlight - Bridge/tunnel Signals - Watertunnel - HousePlacing - SeaplaneAirport - Clipboard - Win7 64bit - MinGW/msys
!Sorry for my google English translator!

Starbud
Traffic Manager
Traffic Manager
Posts: 207
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

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

Post by Starbud » 16 Mar 2016 23:11

I have noticed an error when pasting.
It seem to occur sometimes but not always, to me it seems to pick up bad data to put into the copybuffer because some layouts works fine but then i pick something up that cant be pasted exept if i use full terraform.
Some crashes at the exact moment of pushing paste.

Added two screenshots
Attachments
pastingerror when not using full terraform.png
Pastingerror when not using full terraform
(3.92 MiB) Not downloaded yet
functional pasting when using full terraform.png
functional pasting when using full terraform
(2.51 MiB) Not downloaded yet
Last edited by Starbud on 16 Mar 2016 23:34, edited 2 times in total.
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se

Starbud
Traffic Manager
Traffic Manager
Posts: 207
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

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

Post by Starbud » 16 Mar 2016 23:13

Can the terraforminlimit be increased?
I often hit that limit when pasting big layouts.
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se

Eddi
Tycoon
Tycoon
Posts: 7371
Joined: 17 Jan 2007 00:14

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

Post by Eddi » 19 Mar 2016 02:59

you can change that from the console
You might not exactly be interested in Ferion, but if you are, have fun :)

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 » 20 Mar 2016 09:41

Starbud wrote:It seem to occur sometimes but not always, to me it seems to pick up bad data to put into the copybuffer because some layouts works fine but then i pick something up that cant be pasted exept if i use full terraform.
Some crashes at the exact moment of pushing paste.

Added two screenshots
By "crashes" did you mean just red "Can't paste here..." boxes? Or the game really crashes? On the first screenshoot it looks like you are just trying to paste something which is too high and the land cannot be terraformaed because of a bridge in a way, nothing unusual... It's too little information. If there is an issue I'll fix it but you must provide me a better description. Give me a savegame, show me (e.g. on a screenshot) what exactly to copy and where exactly to paste and describe me why do you thing that results should be different. I must be able to reproduce the thing on my computer.

There are some caveats that you may be unaware of:
  • In multiplayer, this is rather a clone tool than a copy-paste tool. There is no clipboard buffer. When copying you actually just select a piece on the map. When pasting, contents from the previously selected area will be cloned onto paste area (with all the changes that occurred on the copy area since it was selected).
  • Minimal terraforming is not "terraform as less as possible", it's almost like that. The actual rule is "if there's anything on the tile that is about to be copy-pasted then also copy-paste height from all 4 corners surrounding the tile".
Starbud wrote:Can the terraforminlimit be increased?
I often hit that limit when pasting big layouts.
Try changing construction.terraform_per_64k_frames and/or construction.terraform_frame_burst in console.
:] don't worry, be happy and checkout my patches

User avatar
musznik
Engineer
Engineer
Posts: 1
Joined: 13 Apr 2016 10:31
Contact:

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

Post by musznik » 13 Apr 2016 10:39

Hello!

Here is patch for "openttd-trunk-r27537" and precompiled binaries
Attachments
the_clipboard_2.0.0_beta1-ottd_r27537-svn.patch
clippboard 2.0b1 patch for r27537
(572.07 KiB) Downloaded 213 times
openttd-trunk-r27537-windows-win86.zip
precompiled openttd r27537 with clipboard 2.0b1 patch/mod
(10.59 MiB) Downloaded 287 times

vredko
Engineer
Engineer
Posts: 4
Joined: 23 Aug 2010 10:05

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

Post by vredko » 22 Nov 2016 21:54

hellou need help :( how can i install "copy and paste mod" under ver 1.6.1 and running servers under 1.6.1?

Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4718
Joined: 09 Sep 2007 05:03
Location: home

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

Post by Alberth » 23 Nov 2016 04:59

vredko wrote:hellou need help :( how can i install "copy and paste mod" under ver 1.6.1 and running servers under 1.6.1?
You cannot.

First of all, 1.6.1 comes without copy/paste patch. If you change the code in any way, for example, by adding the copy/paste patch, it is not 1.6.1 any more, it's a modified 1.6.1 ("1.6.1 + copy/paste" would be its name, for example, but at least not just plain "1.6.1").

Secondly, all games in a multi-player game must be the exact same version. An 1.6.1 multi-player game only runs if all participating machine runs the exact same 1.6.1 version (which is easy, as there is only one version named 1.6.1),

If you want to use a modified version in a multi-player game, then all participating machines must use that exact same modified version.
Being a OpenTTD developer does not mean I know what I am doing.
Also, other OpenTTD developers may have different opinions.

agentw4b
Traffic Manager
Traffic Manager
Posts: 154
Joined: 14 Apr 2017 15:51
Location: Czech Republic

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

Post by agentw4b » 17 Apr 2017 14:52

musznik wrote:Hello!

Here is patch for "openttd-trunk-r27537" and precompiled binaries
I cannot load/save template with this patch.

I do not see any button for it.
How do I do that ?
Owner and admin of servers:Experimental games 01 (92.63.57.152:3979), Experimental games 02 (92.63.57.152:3879), Experimental games 03 (92.63.57.152:3779), Experimental games 04 (92.63.57.152:3679), Experimental games 05 (92.63.57.152:3579).
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS

htk0708
Engineer
Engineer
Posts: 2
Joined: 25 May 2017 21:02

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

Post by htk0708 » 25 May 2017 22:23

Here is patch for "openttd-trunk-r27875" and precompiled binaries
Attachments
the_clipboard_2.0.0_beta1-ottd_r27875-svn.patch
(571.78 KiB) Downloaded 113 times
clipboard_r27875_win_x86.rar
(6.28 MiB) Downloaded 180 times
clipboard_r27875_linux_x86.tar.gz
(6.29 MiB) Downloaded 93 times

agentw4b
Traffic Manager
Traffic Manager
Posts: 154
Joined: 14 Apr 2017 15:51
Location: Czech Republic

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

Post by agentw4b » 07 Jul 2017 12:34

htk0708 wrote:Here is patch for "openttd-trunk-r27875" and precompiled binaries
missing clipboard.grf .
Owner and admin of servers:Experimental games 01 (92.63.57.152:3979), Experimental games 02 (92.63.57.152:3879), Experimental games 03 (92.63.57.152:3779), Experimental games 04 (92.63.57.152:3679), Experimental games 05 (92.63.57.152:3579).
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS

User avatar
birsk
Engineer
Engineer
Posts: 29
Joined: 29 Nov 2010 07:44

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

Post by birsk » 17 Jul 2017 18:14

i thing it the most useful patch ever when making big maps :-)
I have upgraded, and need help from some one to compile it for working in r27886" !! :bow:

aberro
Engineer
Engineer
Posts: 64
Joined: 20 May 2013 20:20

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

Post by aberro » 10 Oct 2017 14:23

Enjoy. Barely tested, for now. Will test in my gameplay later. You can get required clipboard.grf from first message in this topic.
Upd.: it's working, kinda, but has many bugs.
Attachments
the_clipboard_2.0.0_beta1-ottd_r27875-svn.patch
(571.78 KiB) Downloaded 124 times

Starbud
Traffic Manager
Traffic Manager
Posts: 207
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

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

Post by Starbud » 31 Mar 2018 13:10

agentw4b wrote:
htk0708 wrote:Here is patch for "openttd-trunk-r27875" and precompiled binaries
missing clipboard.grf .
Uploading clipboard.grf extracted from one of the files in the current original post.
Attachments
clipboard.grf
clipboard.grf
(5.28 KiB) Downloaded 115 times
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se

agentw4b
Traffic Manager
Traffic Manager
Posts: 154
Joined: 14 Apr 2017 15:51
Location: Czech Republic

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

Post by agentw4b » 31 Mar 2018 14:16

Starbud wrote:
agentw4b wrote:
htk0708 wrote:Here is patch for "openttd-trunk-r27875" and precompiled binaries
missing clipboard.grf .
Uploading clipboard.grf extracted from one of the files in the current original post.
I know, but I do not need to deal with it for a long time.
Owner and admin of servers:Experimental games 01 (92.63.57.152:3979), Experimental games 02 (92.63.57.152:3879), Experimental games 03 (92.63.57.152:3779), Experimental games 04 (92.63.57.152:3679), Experimental games 05 (92.63.57.152:3579).
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS

Starbud
Traffic Manager
Traffic Manager
Posts: 207
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

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

Post by Starbud » 31 Mar 2018 14:29

agentw4b wrote:I know, but I do not need to deal with it for a long time.
Ok, fair enough.
I uploaded it because i had the same problem of finding clipboard.grf.
When i found it i figured i save those comming after me some time by simply uploading it :)

Here is a game with 9 000 000 T pounds in a company and somewhat raised terraforming limits and magic bulldozer
Attachments
9 000 000T Pounds money Starbud, 2973-08-19.sav
a 4096x4096 savegame with too much money
(4.71 MiB) Downloaded 44 times
9 000 000T Pounds money Starbud, 2980-09-17.sav
anoter version, later date
(4.71 MiB) Downloaded 38 times
Last edited by Starbud on 31 Mar 2018 15:58, edited 2 times in total.
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se

Starbud
Traffic Manager
Traffic Manager
Posts: 207
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

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

Post by Starbud » 31 Mar 2018 14:42

Btw, anyone feeling like hosting that map?
I dont know how to get trough my linux gateway, Xubuntu if anyone happen to know how to forward ports.
I happily host it myself if i just know how.
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 5 guests