Daylength Patch [12/09/2008] Compatibility: r14293
Moderator: OpenTTD Developers
Re: Daylength Patch [03/09/2007] Compatibility: r11060
Didn't I post a fixed patch? I know I meant to. Anyway, the crash is indeed due to the game attempting to save a value, part of the date description, into a variable which is too small for it. (Why the OTTD developers allow a variable to be 32 bit in memory but 16 in the save file is beyond me, its just asking for trouble. But no doubt theres a sound reason for it). Also, it doesn't adjust the savegame structure to account for the new patch which breaks savegame compatibility with all prior versions.
Ill merge my version against something more recent and post it.
Ill merge my version against something more recent and post it.
Re: Daylength Patch [03/09/2007] Compatibility: r11060
sweet
thank you.

Re: Daylength Patch [03/09/2007] Compatibility: r11060
Here it is then - not the cleanest code, but it should work.
EDIT] And now, a version with actual savegame compatibility.
EDIT] And now, a version with actual savegame compatibility.
- Attachments
-
- daylength_r11934.patch
- (13.01 KiB) Downloaded 117 times
Re: Daylength Patch [03/09/2007] Compatibility: r11060
hi, i would like to apply this patch but already have a no random industry patch installed.
is it posseble also to install this patch? so i have both? and how should i do this?
is it posseble also to install this patch? so i have both? and how should i do this?
Re: Daylength Patch [03/09/2007] Compatibility: r11060
Yes, easily.dante wrote:hi, i would like to apply this patch but already have a no random industry patch installed.
is it posseble also to install this patch? so i have both? and how should i do this?
Apply first patch, then apply second one.
patch -p0 <first.patch
patch -p0 <second.patch
if you are lucky, there won't be any patch conflicts for you to resolve.
Then recompile
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)
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)
Re: Daylength Patch [03/09/2007] Compatibility: r11060
Or, cat first.patch second.patch | patch -p0
The latter works really well for applying lots of known non-conflicting patches, and it's even better when you need to zcat instead.
The latter works really well for applying lots of known non-conflicting patches, and it's even better when you need to zcat instead.
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: Daylength Patch [03/09/2007] Compatibility: r11060
Or, stuff all patches in the root of the source tree and do:DaleStan wrote:Or, cat first.patch second.patch | patch -p0
The latter works really well for applying lots of known non-conflicting patches, and it's even better when you need to zcat instead.
cat *.patch | patch -p0
Applies them all :)
Though I've not seed gzipped patches floating around on the forums, so I doubt zcat would be necessary in this case.
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)
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)
Re: Daylength Patch [03/09/2007] Compatibility: r11060
The above replies are correct, but wont work under BuildOTTD, and windows doesnt provide a cat command. Simplest solution is to use any text editor, and add all the patch files to one big patch which BuildOTTD will accept. (If the patches dont have linebreaks, then use a better text editor. notepad may have problems).
Failing that, get build tools which werent explicitly designed to apply one and only one patch with no technical knowledge needed. Check the wiki for options.
Failing that, get build tools which werent explicitly designed to apply one and only one patch with no technical knowledge needed. Check the wiki for options.
-
- Traffic Manager
- Posts: 165
- Joined: 03 Dec 2007 15:06
Re: Daylength Patch [03/09/2007] Compatibility: r11060
i noticed a bug in the patch, the running cost in the vehicle details window gets multiplied with the daylength twice (daylength 30 --> 900 times the value) it's correct in the purchase list and gets substracted correctly, it's only the display there that's wrong
edit: only for trains
edit: only for trains
-
- Traffic Manager
- Posts: 165
- Joined: 03 Dec 2007 15:06
Re: Daylength Patch [03/09/2007] Compatibility: r11060
---------------------------
TortoiseMerge
---------------------------
An unknown line type was found in line 184 !
---------------------------
OK
---------------------------
line 184 of the patch is empty... if i remove it, i get the same error with line 183
TortoiseMerge
---------------------------
An unknown line type was found in line 184 !
---------------------------
OK
---------------------------
line 184 of the patch is empty... if i remove it, i get the same error with line 183
Re: Daylength Patch [03/09/2007] Compatibility: r11060
Odd. Works for me, but I did modify that section of the patch by hand, perhaps this is confusing your patch program.
Regardless, this version is exactly as SVN spit it out, so it should work.
Regardless, this version is exactly as SVN spit it out, so it should work.
- Attachments
-
- daylength_11952.patch
- (13.11 KiB) Downloaded 156 times
-
- Traffic Manager
- Posts: 165
- Joined: 03 Dec 2007 15:06
Re: Daylength Patch [03/09/2007] Compatibility: r11060
yes, now it works fine, thanks 

Re: Daylength Patch [03/09/2007] Compatibility: r11060
The only reliable hand modifications of a patch are to remove a complete patch band and to remove a complete file. Anything else should be done by rediffing.andrewas wrote:Odd. Works for me, but I did modify that section of the patch by hand, perhaps this is confusing your patch program.
Especially when you're handing files to TortoiseMerge. It's at least as fragile as WinME.
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: Daylength Patch [03/09/2007] Compatibility: r11060
ok but i'm a noob in patches still 
i use buildttd to apply a patch. so is there some explenation on how to apply a second patch (for dummies) ?

i use buildttd to apply a patch. so is there some explenation on how to apply a second patch (for dummies) ?

Re: Daylength Patch [03/09/2007] Compatibility: r11060
Open both patches in wordpad (not notepad, as that might not work) and copy-past one after the other. Then save as combined.patch (or something else) and use that as the patch file for buildottd. If both patches change the same lines of code however, it won't work (and there's no way to fix that except by hand).dante wrote:ok but i'm a noob in patches still
i use buildttd to apply a patch. so is there some explenation on how to apply a second patch (for dummies) ?
Re: Daylength Patch [03/09/2007] Compatibility: r11060
yes why not...
did you ever try that?
maybe with patches which modify different files "might" work, but if both patches want to modify the same file i'm not so sure it works
and both windows notepad (which doesn't support unix EOL style) and wordpad (the best way to destroy a source file if not done in the right way) aren't the right programs to do that
try with notepad++, editpad lite, programmer's notepad etc
did you ever try that?
maybe with patches which modify different files "might" work, but if both patches want to modify the same file i'm not so sure it works
and both windows notepad (which doesn't support unix EOL style) and wordpad (the best way to destroy a source file if not done in the right way) aren't the right programs to do that
try with notepad++, editpad lite, programmer's notepad etc
Re: Daylength Patch [03/09/2007] Compatibility: r11060
Add both patches to the source with TortoiseSVN (edited) .. then create one combined patch from it.. Apply that patch in BuildOTTD.
of course make sure there are no errors... and if one or both patches adds new files make sure tortoiseSVN add them to the .diff file as well (I'm not sure thats default behavior)
edit: corrected windows app name (sorry, I usually just use svn and patch myself)

edit: corrected windows app name (sorry, I usually just use svn and patch myself)
Last edited by Forked on 23 Jan 2008 20:04, edited 1 time in total.
Re: Daylength Patch [03/09/2007] Compatibility: r11060
Yes. Tortoise, not turtle. TortoiseSVN.Forked wrote:Add both patches to the source with TurtleSVN (tortoise?)
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)
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)
Re: Daylength Patch [03/09/2007] Compatibility: r11060
Unfortunately, you're getting into 'dummies need not apply' territory, there are very likely going to be problems that no software can solve, and BuildOTTD is not going to do anything to make life easier. If you want to continue with BuildOTTD, then follow the advice above and add all the patches to one file. Otherwise, go to this page:dante wrote:ok but i'm a noob in patches still
i use buildttd to apply a patch. so is there some explenation on how to apply a second patch (for dummies) ?
http://wiki.openttd.org/index.php/Categ ... ng_OpenTTD
Of those options, I use cygwin most of the time, and use BuildOTTD to test that a patch is going to work on a clean environment.
Who is online
Users browsing this forum: Ahrefs [Bot] and 6 guests