trying to apply a patch to open ttd
Moderator: OpenTTD Developers
trying to apply a patch to open ttd
hi, i'm trying to apply an downloaded patch to open ttd, but i can't get it to work.
it is the patch thats making you able to turn off the opening/closing of industries.
i folowed the instruction in the ottd development forum for windows (i use win xp)
guess i'm doing something wrong or something?
is there any1 thet could help me please?
it is the patch thats making you able to turn off the opening/closing of industries.
i folowed the instruction in the ottd development forum for windows (i use win xp)
guess i'm doing something wrong or something?
is there any1 thet could help me please?
Re: trying to apply a patch to open ttd
You say you followed the instructions. After which step did something unexpected happen, and what exactly happened?
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Re: trying to apply a patch to open ttd
i did got some errors about saving files at the moment i sayed Patch all.
but that couldn't be the problem.
here is a screenshot of the errormessage.
and should the folder you apply patch to or download the files to be somwhere in ttd or ottd folder? it is in my documents now somewhere.

but that couldn't be the problem.
here is a screenshot of the errormessage.
and should the folder you apply patch to or download the files to be somwhere in ttd or ottd folder? it is in my documents now somewhere.
Re: trying to apply a patch to open ttd
Try to get the revision of OTTD that patch is made against. You're having trouble now because that patch changed some lines that were also changed in a later revision of OTTD. So you can either look at the source yourself and solve the problem or get the correct revision.
Re: trying to apply a patch to open ttd
The patch in question is intended for revision 11199. Not sure on how to do it in Tortoise, but tell it to use that revision and it apply the patch without problem. Alternately, you can always try and merge it manually, 11199 isn't all that old, and it may be possible to do it even without significant C++ experience.
Re: trying to apply a patch to open ttd
It was really easy to update as this patch was around 10 lines
. Anyway, I've posted an updated version that'll work with r11781 in the original thread.

Re: trying to apply a patch to open ttd
so it should work on 0.6 beta2 ?
just tryed to patch that latest version. still getting errors (different and less
) and still it aint working.
i did folow the exact steps as the guide tells me to do in the toping "how to apply a patch" and i use the one for windows xp
just tryed to patch that latest version. still getting errors (different and less

i did folow the exact steps as the guide tells me to do in the toping "how to apply a patch" and i use the one for windows xp
Re: trying to apply a patch to open ttd
No, the updated patch will not work with 0.6 beta2. You should check out the latest source from svn.dante wrote:so it should work on 0.6 beta2 ?
just tryed to patch that latest version. still getting errors (different and less) and still it aint working.
i did folow the exact steps as the guide tells me to do in the toping "how to apply a patch" and i use the one for windows xp
Can you post the exact error message again?
Re: trying to apply a patch to open ttd
ok this error message pups up a few times:

i just click ja (= yes) and go on.
now i also got this error message:

followed by this one:

and after patching the list looks like this now:"

i just click ja (= yes) and go on.
now i also got this error message:
followed by this one:
and after patching the list looks like this now:"
Re: trying to apply a patch to open ttd
Looking at these error messages makes me think there is a problem with checking out the newest revision from svn. Have you tried throwing your entire source directory away and start over?dante wrote: now i also got this error message:
followed by this one:
![]()
Re: trying to apply a patch to open ttd
Yes, there is a problem with checking out the newest revision. The newest revision is not the correct revision.Yexo wrote:Looking at these error messages makes me think there is a problem with checking out the newest revision from svn.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Re: trying to apply a patch to open ttd
that explains a lotDaleStan wrote:Yes, there is a problem with checking out the newest revision. The newest revision is not the correct revision.Yexo wrote:Looking at these error messages makes me think there is a problem with checking out the newest revision from svn.

so there is no way to apply the patch on 0.6 beta2 at the moment if i am correct?
**edit**
i made a new source folder as yexo surgested. no errors poped up, but still not working on 0.6beta2 win xp

Re: trying to apply a patch to open ttd
The patch should apply cleanly to revision 11871, and there haven't been any changes to the file in question since 11776. Beats me why tortoise can't apply the patch. In any case, its possible to merge it by hand. Go to line 203 of settings_type.h, and add the line
after the line
Save it, and compile it.
Code: Select all
bool allow_random_industry;
Code: Select all
bool enable_signal_gui; ///< Show the signal GUI when the signal button is pressed
Re: trying to apply a patch to open ttd
You can't apply the patch to beta2 as the patch is written for r11781, and beta2 and r11781 differ too much.dante wrote:that explains a lotDaleStan wrote:Yes, there is a problem with checking out the newest revision. The newest revision is not the correct revision.Yexo wrote:Looking at these error messages makes me think there is a problem with checking out the newest revision from svn.
so there is no way to apply the patch on 0.6 beta2 at the moment if i am correct?
**edit**
i made a new source folder as yexo surgested. no errors poped up, but still not working on 0.6beta2 win xp
If svn doesn't work for some reason, you can still try to get the r11780 by hand (http://nightly.openttd.org/source/OTTD- ... r11780.zip) That revision will work with the patch.
Re: trying to apply a patch to open ttd
i tryed changing code, nothing happend.
but something i still do not understand. why isn't there anywhere i need to link tortoise to my openttd directory or openttd to tortoise directory.
becouse i guess the problem is, ottd doent even know it has to use the other files tortoise downloaded and applyed the patch to.
did i do something wrong? help me understand this please
but something i still do not understand. why isn't there anywhere i need to link tortoise to my openttd directory or openttd to tortoise directory.
becouse i guess the problem is, ottd doent even know it has to use the other files tortoise downloaded and applyed the patch to.
did i do something wrong? help me understand this please
Re: trying to apply a patch to open ttd
Can you post EXACTLY what you do when trying to patch openttd?dante wrote:i tryed changing code, nothing happend.
but something i still do not understand. why isn't there anywhere i need to link tortoise to my openttd directory or openttd to tortoise directory.
becouse i guess the problem is, ottd doent even know it has to use the other files tortoise downloaded and applyed the patch to.
did i do something wrong? help me understand this please
Did you follow Howto apply a patch/diff file from the OpenTTD Development section?
And after this follow the other steps from that howto.Download the source files:
Make a new folder
Right click on it
Choose "SVN Checout..." from the menu
Set data fields like on attachement 1
Hit OK, wait 5-20 minutes for all files to download
[img=http://www.tt-forums.net/download/file.php?id=39645]Attachement 1 from that post[/img]
Re: trying to apply a patch to open ttd
ok all from the start on.
- Transport delux installed on pc.
- downloaded open ttd (can remember version)
- downloaded the latest patc (0.6 beta2)
- aded some new grf files
was getting anoyed by industries colsing on the huge maps so i wanted to download a patch.
i found 3 different patched 1 was a .patch file and 2 others a .diff (or it was 2 patc and 1 diff, doesn't matter anyway)
i didn't know how to make it work so i read the forum you also just linked.
i'm using windows XP so i did go straight to post nr 4. the one by meush on how to apply on windows xp.
i downloaded and installed TortoiseSVN.
- after that i made a folder in the MyDocuments directory (i just called it some like Tor), right clicked on it and used the checkout button.
i put the setting just like on the printschreen as in the post. only mine looks just a bit different (button of this post img 1.)
checkout only tooks about 1 to 2 minutes.
after done this i rightclick on the folder (called Tor) again and click the Apply Patch button.
the new window pops up and i click patch all.
last time i did it all wit a new folder and all the steps as described here i didn't got any errors, but....
after this it should be ok i thought, so i started openddt again and opend a savegame. but nowhere to be able to turn off or on the industry opening/closing. and after a few minutes i get a ingame messege that a coalmine has closed....
so i'm stil wondering why it does not word, and how open ttd can know that it has to use files that are in the MyDocuments/Tor cuz i didn't linked the folder in openttd, and didnt link it any other way. so i think openttd doesn't even know there should be a link between the Tor folder and the game itself.
if you need to know any more info let me know, cuz i really want this patch to work

img 1. the checkout window
- Transport delux installed on pc.
- downloaded open ttd (can remember version)
- downloaded the latest patc (0.6 beta2)
- aded some new grf files
was getting anoyed by industries colsing on the huge maps so i wanted to download a patch.
i found 3 different patched 1 was a .patch file and 2 others a .diff (or it was 2 patc and 1 diff, doesn't matter anyway)
i didn't know how to make it work so i read the forum you also just linked.
i'm using windows XP so i did go straight to post nr 4. the one by meush on how to apply on windows xp.
i downloaded and installed TortoiseSVN.
- after that i made a folder in the MyDocuments directory (i just called it some like Tor), right clicked on it and used the checkout button.
i put the setting just like on the printschreen as in the post. only mine looks just a bit different (button of this post img 1.)
checkout only tooks about 1 to 2 minutes.
after done this i rightclick on the folder (called Tor) again and click the Apply Patch button.
the new window pops up and i click patch all.
last time i did it all wit a new folder and all the steps as described here i didn't got any errors, but....
after this it should be ok i thought, so i started openddt again and opend a savegame. but nowhere to be able to turn off or on the industry opening/closing. and after a few minutes i get a ingame messege that a coalmine has closed....
so i'm stil wondering why it does not word, and how open ttd can know that it has to use files that are in the MyDocuments/Tor cuz i didn't linked the folder in openttd, and didnt link it any other way. so i think openttd doesn't even know there should be a link between the Tor folder and the game itself.
if you need to know any more info let me know, cuz i really want this patch to work

img 1. the checkout window
Re: trying to apply a patch to open ttd
Until here everything goes ok, but you still have to compile! If you don't know how to do that, the easiest thing is to download BuildOTTD (see thread in development section). And yes, that means starting over again.dante wrote: after done this i rightclick on the folder (called Tor) again and click the Apply Patch button.
the new window pops up and i click patch all.
last time i did it all wit a new folder and all the steps as described here i didn't got any errors, but....
Re: trying to apply a patch to open ttd
That sticky needs to be clarified.. this isn't patching as you understand it from commercial applications. With OpenTTD, you modify the source code and build your own openttd.exe. The tricky part of this is applying the patch, which is why the sticky and the people you asked concentrated on that part. Building the binary is very easy, at least it is if you know how - check the wiki for various ways to compile. On linux OSes, you need only two commands if all the tools are installed. ./configure to set it up, then make to build it.dante wrote: but something i still do not understand. why isn't there anywhere i need to link tortoise to my openttd directory or openttd to tortoise directory.
becouse i guess the problem is, ottd doent even know it has to use the other files tortoise downloaded and applyed the patch to.
On Windows, if all you want to do is apply one patch unmodified, BuildOTTD is the simplest solution, pretty much idiot proof. Point it at the patch, force the revision to match the patch, hit 'update and compile', and copy the resulting binary to your ottd folder. The only major problem with buildottd is that it doesnt work on Vista. Under Vista, or if you want to apply multiple patches, or modify an existing patch to work on more recent versions of the source, then cygwin is probably the way to go - however, you will have to find at least a basic tutorial on C++ in order to do any but the most trivial modifications.
Re: trying to apply a patch to open ttd
tnx for this oneYexo wrote:Until here everything goes ok, but you still have to compile! If you don't know how to do that, the easiest thing is to download BuildOTTD (see thread in development section). And yes, that means starting over again.dante wrote: after done this i rightclick on the folder (called Tor) again and click the Apply Patch button.
the new window pops up and i click patch all.
last time i did it all wit a new folder and all the steps as described here i didn't got any errors, but....


Who is online
Users browsing this forum: Google [Bot], peter1138 and 3 guests