Copy & Paste patch, reworked

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
LittleHelper
Engineer
Engineer
Posts: 75
Joined: 01 Apr 2006 01:52

Re: Copy & Paste patch, reworked

Post by LittleHelper »

Timitry wrote:...So, here is an actual version of this patch...
Thanks, Timitry, for your efforts. I will give it a try. 8)
Greetz


Edit: The patched trunk works, but I can't find the copy&paste symbol (copypaste.grf has been copied into the appropriate data folder). Any idea ?
User avatar
Timitry
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 01 Oct 2004 15:28
Contact:

Re: Copy & Paste patch, reworked

Post by Timitry »

It should appear in the landscaping toolbar, if it's not there, something must be wrong with my provided patch / binaries...
If the game can't find the copypaste.grf, it won't start at all, so that shouldn't be the problem!
Iguanna
Engineer
Engineer
Posts: 100
Joined: 21 Nov 2007 00:06

Re: Copy & Paste patch, reworked

Post by Iguanna »

Bilbo wrote:...Hmm ... I have many useful templates made by older version (the one still from Frostregen). Have anybody made some tool to convert the templates from old format to the new one, or should I write it myself?
Not that I'm aware of. Might be easiest to just paste all your templates onto a game using an old OTTD version then load the game in v0.7 and copy em from there.

The pretty recent version of C&P (maybe current) would crash if you load templates sometimes too - seems to work better to keep the templates you use in a savegame, then if you're playing and want to use one, save your game, load the template game, copy what you want, then load the game you're playing and paste (without using load template). Is yet to crash doing that.

There were a couple of bugs and I need to sit down sometime and reproduce em and post saves etc so they can be fixed, if they are not already. Bridges not being pasted after rotate, and sometimes signals not right when there are 2 on the tile coners and it is rotated were the others IIRC. And also sometimes not enough teraforming is done for tunnels I think I saw a few times, or maybe it was not demolishing stuff which needed to be for teraform, or something.
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: Copy & Paste patch, reworked

Post by 2007Alain2007 »

here is an update and 32 build r15821
CopyPaste_r15821.patch
copy and paste.7z
For Community Integrated Version http://code.google.com/p/civopenttd/
User avatar
LittleHelper
Engineer
Engineer
Posts: 75
Joined: 01 Apr 2006 01:52

Re: Copy & Paste patch, reworked

Post by LittleHelper »

Great, 2007Alain! Now copy&paste is working, even some of my old scenarios. Thanks for your efforts, much appreciated. 8)

Only problem now :roll: ... my old c&p templates don't work anymore. I get the message they have been created with a newer version !?
Is there any workaround editing the old templates ? :?:

Greetz
iklucas
Engineer
Engineer
Posts: 10
Joined: 02 Apr 2009 14:33

Re: Copy & Paste patch, reworked

Post by iklucas »

will there come a copy/paste patch for 0.7.0?
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: Copy & Paste patch, reworked

Post by belugas »

iklucas wrote:will there come a copy/paste patch for 0.7.0?
No, definitively not, since 0.7.0 is already out.
And I can add that there is very very very little chance it will ever hit trunk.
No, I won't give reasons.

But there's nothing wrong in using it with some private builds.
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Re: Copy & Paste patch, reworked

Post by SirkoZ »

belugas - you should really consider it for inclusion as it can be quite useful in both, single and multiplayer. And no, there have been no desyncs observed - I have used it extensively in network games. ;-)
iklucas
Engineer
Engineer
Posts: 10
Joined: 02 Apr 2009 14:33

Re: Copy & Paste patch, reworked

Post by iklucas »

is that sarcasm or realism?

whathever i have no experience with building patches so
Timmaexx
Transport Coordinator
Transport Coordinator
Posts: 301
Joined: 03 Jan 2009 17:55

Re: Copy & Paste patch, reworked

Post by Timmaexx »

It's realism!
I myself gave up to try patching its too complicated for me....
but there are good manuals, perhaps you couldlearn it! 2007Alain2007 learned it too ;)
And dont bump everything full with your C&P Patching. This thread is the right one :D
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Copy & Paste patch, reworked

Post by Rubidium »

SirkoZ wrote:And no, there have been no desyncs observed - I have used it extensively in network games. ;-)
For this statement I am assume using the latest version in this thread, i.e. the patch for r15821. I have not tested it in the real world; this is all based on a quick scan of the diff.

I'd take me probably 10-15 minutes to set up a server that "quickly" desyncs copy-paste users and if I want to I'd need 5 minutes to get all copy-paste users desynced from a server without copy-paste applied and the same amount of time to get all non-copy-paste users desynced from a server with copy-paste applied.

So this again such a marvel of a patch that "doesn't desync" and "isn't buggy" because no-one bothered to report the desyncs/bugs.
iklucas
Engineer
Engineer
Posts: 10
Joined: 02 Apr 2009 14:33

Re: Copy & Paste patch, reworked

Post by iklucas »

can't there be made a copy paste mod wich work on 0.7.0, why whould i do can make it for myself if they say it can't be made?
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Copy & Paste patch, reworked

Post by Bilbo »

Rubidium wrote:
SirkoZ wrote:And no, there have been no desyncs observed - I have used it extensively in network games. ;-)
For this statement I am assume using the latest version in this thread, i.e. the patch for r15821. I have not tested it in the real world; this is all based on a quick scan of the diff.

I'd take me probably 10-15 minutes to set up a server that "quickly" desyncs copy-paste users and if I want to I'd need 5 minutes to get all copy-paste users desynced from a server without copy-paste applied and the same amount of time to get all non-copy-paste users desynced from a server with copy-paste applied.

So this again such a marvel of a patch that "doesn't desync" and "isn't buggy" because no-one bothered to report the desyncs/bugs.
I think original author does not update it anymore and currently the patch is updated by "first random user that needs a newer version and happens to come by". That probably have somewhat affected its quality in last time :)

As for the bugs: I remember one crash to desktop when using the patch (though I have not managed to repeat the crash or isolate the cause), the pasting sometimes does not paste the tracks well. I think the patch is somewhat buggy, though I have not experienced a desync when using it. Where in the diff have you found that desync bug?
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: Copy & Paste patch, reworked

Post by belugas »

iklucas wrote:is that sarcasm or realism?
whathever i have no experience with building patches so
Sorry, no, as Rubidium explained, this is reality. As devs, we are not entitled to put everything that the users are sending us in trunk.
We need to keep the game in a working state. We have to make it grow.
This patch does not fall in the safe nor interesting side.
I'm sorry for you, iklucas, but that's the way it is.

Nice one Sirkoz. Very good joke "It's well tested" ! :mrgreen:
And oh yes, it is so useful. I agree. Up to the point that the game becomes boring.
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: Copy & Paste patch, reworked

Post by Ammler »

There is something much better then this patch: cooperative gameplay. If you like to build something really boring which would need this patch, join us and ask about help. If there are many people building on the same thing, it works without that patch and won't be boring...
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Re: Copy & Paste patch, reworked

Post by SirkoZ »

belugas wrote:Nice one Sirkoz. Very good joke "It's well tested" ! :mrgreen:
And oh yes, it is so useful. I agree. Up to the point that the game becomes boring.
I think I posted that on 2nd... anyhow - boring? Not really as one can use it for pasting only the very complex junctions, as I do. :idea:
Of course that doesn't mean at all the designs can't be improved...
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Copy & Paste patch, reworked

Post by Bilbo »

Ammler wrote:There is something much better then this patch: cooperative gameplay. If you like to build something really boring which would need this patch, join us and ask about help. If there are many people building on the same thing, it works without that patch and won't be boring...
Well, before PBS was part of trunk, I used copy & paste to insert prepared complex presignal tracks. Now with PBS things are much easier and I use C&P quite rarely, but it can ease some repetitive tasks, like:
* Pasting service station with depots every few tiles of track
* When building something symmetric, you build one part, then copy, mirror/rotate and paste the other half :)

C&P won't do things for you, but helps you if you want same things on more places
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: Copy & Paste patch, reworked

Post by 2007Alain2007 »

but for single player games its preaty good
For Community Integrated Version http://code.google.com/p/civopenttd/
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Re: Copy & Paste patch, reworked

Post by Frostregen »

Hm, desyncs should not be a problem, by the nature of this patch.
It used to only use DoCommandP's, which are the same as if a Player did it. (Random was not used at all too)

The only possibility could be the patch-setting (paste-speed) which was only half synchronized (since not everyone had this setting).
Back then it worked, but maybe a good start to look there ;)
(Check unpatched server + patched client, and the other way round)
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Copy & Paste patch, reworked

Post by Bilbo »

Frostregen wrote:Hm, desyncs should not be a problem, by the nature of this patch.
It used to only use DoCommandP's, which are the same as if a Player did it. (Random was not used at all too)

The only possibility could be the patch-setting (paste-speed) which was only half synchronized (since not everyone had this setting).
Back then it worked, but maybe a good start to look there ;)
(Check unpatched server + patched client, and the other way round)
I think in older copy & paste versions it was client setting, so it was never synchronized and kept only locally. Maybe I'll change it back to client settings and post updated patch, so you can change it in-game if your selected speed does not work :)

Well, as I examine the patch, there seems to be some possibly unrelated changes (function GetDepotDirection is moved from npf.cpp to depot.cpp - perhaps to make something easier? OrderGoesToStation is moved as well and there seem to be some unrelated changes in order_cmd.cpp - is the patch really changing the code how orders are copied between vehicles, or someone have accidentally mixed in another patch? That could explain desyncs)

Perhaps the "reworked" patch needs a little cleanup ...
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 20 guests