Page 4 of 12
Re: Copy & Paste patch, reworked
Posted: 04 Apr 2009 13:37
by kraZz
the patch i had used in 0.6.3 never caused any desyncs or crashes for me or two other admins on my servers. it's still somewhat buggy, as it often left out some commands and you always had to check again what you built with it. that only happens online though, single player always works fine.
from a gameplay point of view: it often happened that i had great plans what connections i would build next but then i just thought about the several depot spots i'd need to build on the way and other repetitive tasks to do. these repetitive things don't belong to the creative (= fun) parts of the game, they are just a a hurdle you unfortunately got to jump. it often made me change my mind to not start a bigger line that would have been fun in itself, to build it but without enough depot spots so i suffered from many breakdowns or to even quit the game because it was just too annoying. i am like "playing a game should be fun, what i gotta do now isn't fun, so i'll stop right now" and just leave.
for 0.6.3 i initially found the copy-paste patch and it removed this hurdle and thus increased the fun. i am not using it for big junctions though usually, they belong to the creative part fitting it into the existing landscape is an interesting thing to do. nevertheless i do agree that other people use it to just throw a gigantic junction at some place where it wouldn't be even needed (in this size) and level much more land then necessary for it. this part of it is one of the reasons why it shouldn't go into any official version.
i don't know anything about how clean that patch is and i do think it doesn't need to go into the normal version if main coders don't see any good relation between the risks and benefits it would bring into the work version. i would just be happy if, like with 0.6.3, someone would come up with an inofficial patch i could use.
Re: Copy & Paste patch, reworked
Posted: 05 Apr 2009 13:10
by Iguanna
A couple of bugs with the 15821 version:

- Copy-Paste Bug1.PNG (35.22 KiB) Viewed 5678 times

- Copy-Paste Bug2.PNG (48.39 KiB) Viewed 5677 times
I also had trouble with previous versions, with crashes upon loading some templates which had just been saved and also with land not being raised/lowered in certain cases when it's set to neutral, but couldn't reproduce this. Not sure exactly what caused it - maybe the problems were fixed or maybe I didn't do whatever caused the problem when testing.
Re: Copy & Paste patch, reworked
Posted: 05 Apr 2009 20:19
by SirkoZ
IguannaB - did you perhaps experience any desyncs with the patch?
Re: Copy & Paste patch, reworked
Posted: 05 Apr 2009 21:06
by Bøtteknott
Will we see an update for 0,7,0? Does it work with 0,7,0?
Re: Copy & Paste patch, reworked
Posted: 05 Apr 2009 22:27
by Bilbo
Bøtteknott wrote:Will we see an update for 0,7,0?
No.
Bøtteknott wrote:Does it work with 0,7,0?
Yes. Just pick the patch for 0.7.0-RC1 - it applies without any modification to 0.7.0-RC2 and final 0.7.0 too.
Get the patch from my post in this thread about two pages ago, or simply click this link to get there:
http://www.tt-forums.net/viewtopic.php? ... 47#p773947
Apply the patch and compile...
Re: Copy & Paste patch, reworked
Posted: 06 Apr 2009 12:53
by Iguanna
SirkoZ wrote:IguannaB - did you perhaps experience any desyncs with the patch?
I only used it in single player, so didn't have the opportunity.
Saving a template where there is a bridge over a tunnel will cause a crash:
Edit: This only occurs with the CopyPaste_r15821.patch version of this patch. the 0.7.0 version seem ok.
Re: Copy & Paste patch, reworked
Posted: 06 Apr 2009 13:42
by Bilbo
I tried drawing exactly the same thing as you, then copying, saving, loading and pasting the template, but no crash happened and it seems to be pasted correctly.
Weird ... have you done something that I have not in the process? Have you managed to reproduce that bug?
Re: Copy & Paste patch, reworked
Posted: 06 Apr 2009 13:50
by Iguanna
This was from the CopyPaste_r15821.patch, and the build I'm using has a couple of other patches, but they are very minor things, like altering some debug text, so I wouldn't expect them to have any effect. I'll compile with just copy and paste and see if it changes.
Here's the savegame anyway.
Edit: yeah it happens every time, for new games too.
Re: Copy & Paste patch, reworked
Posted: 06 Apr 2009 15:54
by Iguanna
I tried with the 0.7.0 rc1 version, and the save/load bug didn't occur, so I assume that's what's different. The first 2 bugs I reported, with signals around the wrong way and bridges disappearing after rotation still occur in the 0.7.0 version however.
There was problem applying the 0.7.0 RC1 patch to 0.7.0 in settings.cpp with tortoise SVN (patch outdated etc), but I dunno why as the files looked the same in that section. So I copied the 3 lines across for that file and made a new patch from that for 0.7.0 (attached) and a win32 binary which is attached too.
Quick question, if someone using this binary connects to a server without C&P and desyncs, will that affect the other people on the server at all?
Re: Copy & Paste patch, reworked
Posted: 06 Apr 2009 16:34
by Bilbo
IguannaB wrote:There was problem applying the 0.7.0 RC1 patch to 0.7.0 in settings.cpp with tortoise SVN (patch outdated etc)
Weird, it worked fine for me ....
IguannaB wrote:Quick question, if someone using this binary connects to a server without C&P and desyncs, will that affect the other people on the server at all?
desync means that your game state will be different than what is on server - if the desync is due to your patches, it will be only your problem, it won't affect other people.
Re: Copy & Paste patch, reworked
Posted: 06 Apr 2009 16:52
by Iguanna
cool, thanks
Bilbo wrote:IguannaB wrote:There was problem applying the 0.7.0 RC1 patch to 0.7.0 in settings.cpp with tortoise SVN (patch outdated etc)
Weird, it worked fine for me ....
Yeah, I'm not surprised, I get that all the time applying patches which sound like have worked for others no probs. If there was a button accompanying that message 'I don't care, just take your best guess' I would be a happy fella

. I've got the latest version of tortoiseSVN, 1.6 IIRC, but I'm considering finding a different SVN client for windows to see if it can merge patches any better. If anyone has any suggestions, pls let me know.
Re: Copy & Paste patch, reworked
Posted: 06 Apr 2009 21:57
by Toiski
If I say something really stupid, it's probably because I'm new at this. This is my first time applying a patch to ottd, but all the instructions I've found have helped me mostly through. My current problem is this:
The patch by IguannaB gives me an error with settings.cpp at 1591, and I looked through the source code. I find nothing of the sort of code that was supposed to be there before the patch, at that line or anywhere else in the file. It appears the trunk has changed since that patch. What revision should I download for that patch to work?
Re: Copy & Paste patch, reworked
Posted: 07 Apr 2009 06:30
by Iguanna
It's made against the 0.7.0 tag, svn://svn.openttd.org/tags/0.7.0
Re: Copy & Paste patch, reworked
Posted: 07 Apr 2009 12:48
by Toiski
Ok, now the patch applies without problems, but when I try to compile it, I get errors with missing strings:
/home/vtoiviai/.openttd/src/0.7.0/src/lang/russian.txt

warning: String name 'STR_CAN_T_COPY_SHARE_ORDER' does not exist in master file
/home/vtoiviai/.openttd/src/0.7.0/src/lang/russian.txt

warning: String name 'STR_CAN_T_ADD_ORDER' does not exist in master file
/home/vtoiviai/.openttd/src/0.7.0/src/lang/russian.txt

warning: String name 'STR_CAN_T_ADD_ORDER_SHARED' does not exist in master file
Which repeats for all the languages, as far as I can see. I'm sorry to crowd this topic with my problems... If I have more, should I make a topic in Problems?
Re: Copy & Paste patch, reworked
Posted: 07 Apr 2009 13:41
by Bilbo
Those are not errors, merely a warnings. Just ignore them :)
Re: Copy & Paste patch, reworked
Posted: 07 Apr 2009 18:33
by Toiski
Okay, it seems to work in game mode, but in the scenario editor, a part of the c/p button appears outside of the landscaping window, and disappears if anything moves over it (looks like a graphics glitch). Is it supposed to work in the scenario editor as well?
Re: Copy & Paste patch, reworked
Posted: 07 Apr 2009 19:07
by Frostregen
Yes it should work. seems like some updater lost the dialog size addition.
Re: Copy & Paste patch, reworked
Posted: 07 Apr 2009 19:33
by kraZz
many thanks IguannaB, your win32 patch is just what i wanted, really appreciate that. it works just fine.
unfortunately it can't load my old templates, as it says they are newer. comparing some files and looking into the diff file you posted i see the 0.7.0 copy paste patch has a header with 4x4 bytes ['TMPL'], [version], [width], [height] while the templates i got use ['TMPL'], [width], [height], [version], which also explains the "newer" message - it takes the width as version which is always higher than 1 (the current internal version). also the rest of the file seems to be different.
i am a little confused, i thought i had used the copy paste patch in 0.6.3 from the same author but that does not seem to be the case or he broke his own specification.
speaking of specifications, does anybody know a place where these template formats are described? too bad i don't have the source code of the old patch anymore, i was using a binary, otherwise i could just compare the code.
i guess i will just paste my templates in 0.6.3, save the game, load it in 0.7.0 and copy them again

Re: Copy & Paste patch, reworked
Posted: 07 Apr 2009 22:46
by kyosuke1989
IguannaB wrote:I tried with the 0.7.0 rc1 version, and the save/load bug didn't occur, so I assume that's what's different. The first 2 bugs I reported, with signals around the wrong way and bridges disappearing after rotation still occur in the 0.7.0 version however.
There was problem applying the 0.7.0 RC1 patch to 0.7.0 in settings.cpp with tortoise SVN (patch outdated etc), but I dunno why as the files looked the same in that section. So I copied the 3 lines across for that file and made a new patch from that for 0.7.0 (attached) and a win32 binary which is attached too.
Quick question, if someone using this binary connects to a server without C&P and desyncs, will that affect the other people on the server at all?
Thank you very much for the binary!

Re: Copy & Paste patch, reworked
Posted: 13 Apr 2009 16:08
by maartena
I have been using the 0.7.0 binary (thanks for that) and played several online games over the weekend without any issues or desyncs. Of course I have a 100 Mbps link to my servers, and a 15/2 Mbps pipe to the internet, so that may make a difference. But from what I have been able to test, it looks pretty stable.