Page 9 of 15

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 26 Feb 2008 14:47
by Roujin
The number is not exactly the problem with savegames. The numbers are only used to make stuff backwards compatible. e.g. the game "knows" that back in savegame version xx, features Y and Z that are saved in savegames weren't existant yet. So don't load these from the savegame if it says "I'm version xx".

If you change something internally in a patch, that affects what and/or how it's saved, there's no savegame compatibilty even if you use the same number for savegame version.

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 26 Feb 2008 17:37
by Gonozal_VIII
but i didn't change anything inside the patch except some lines where running cost is calculated because trunk changed that... so savegame compatibility should be exactly the same

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 26 Feb 2008 17:48
by Trond
Thats what I figure too, from what you both say... So the only thing I can think of is the fact that those errors with the running cost have destroyed something in a way so it is not compatible any more... No big deal, I'll just go to 2051 and start another game again, hehe :P

BTW, is there any way I can look at the .sav file and see what release I saved it from?

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 26 Feb 2008 21:49
by PhilSophus
You can use the following debug switch to show which savegame version openttd is trying to load:

Code: Select all

openttd -d sl=1
Use higher values instead of the 1 to get more info (I think 2 already shows the chunk it is just loading),

Lease be aware that the intro screen is also a savegame which is loaded (version 4 I think), so it also appears in the debug output.

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 27 Feb 2008 04:09
by Trond
Well, I'm confused :P

All I know is that when I patch r12263 with the patches attached below, it loads my old savegames fine. This is a file with 5 merged patches, wich I merged trough dos to be able to use buildottd and apply several patches. The patching will give the errors noted above.

Now, I make a game with those 5 patches on r12263 or earlier version and it works fine. If I then use only this new daylenght update, or daylenght +the 4 others, it says the savegame is from a newer version... now this is where I get lost, I dont understand why that is happening...

(The all5.patch is containing daylength_r12170.patch + distant_join_stations_r12170.patch + station_supplies_v3_r12035.patch + middle_stop2_r12170.patch + build_and_refit_r12176.patch)

PhilSophus: Where and how should that debug line be entered? I tried in console but it said error... (guessing I have to do this when compiling? Wich isnt an open when using BOTTD :P)
all5+.patch
(78.44 KiB) Downloaded 154 times
EDIT: If its wrong to post the patchfile here, I will remove it if a mod doesnt...

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 27 Feb 2008 11:23
by PhilSophus
Trond wrote:PhilSophus: Where and how should that debug line be entered? I tried in console but it said error... (guessing I have to do this when compiling? Wich isnt an open when using BOTTD :P)
You should start openttd on the console (the command line of your OS not the in-game console :wink:) with the options I gave. It might either be that on Windows you have to use /d instead of -d or that you have to explicitly enable debugging support when compiling to make it work.

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 27 Feb 2008 11:29
by Roujin
it's -d on windows aswell.

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 27 Feb 2008 11:38
by Trond
Ah, okey :P

it says my game is savegame version 99. I couldnt load a v86 savegame on 'my' version, but I could load a v84 version.
with latest update from gonozal I couldnt load my v99, but I could load the v86, and I didnt try the v84...

I tought I was confused earlier, and now I'm even worse :lol:

So, are we at savegame version 99, or is this wrong?

EDIT: when saving and loading a game from r12263 with lates daylenght patch I get v90... I guess I messed something up :/

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 27 Feb 2008 11:45
by PhilSophus
Well, with all these patches around you can't be sure that the same savegame version really means the same savegame format.

Hypothetic example:
Current trunk savegame version: 85
A patch modifies the savegame format and bumps to 86.
Later trunk changes something and also bumps to 86.

No you have two incompatible version 86 savegames, To find out, from which version of the game they could have come from you have to look into src/saveload.cpp which defines the savegame version.

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 27 Feb 2008 12:32
by Trond
I found this in the ORIGINAL r12170 daylenght patch from Gonozal:

Code: Select all

-extern const uint16 SAVEGAME_VERSION = 89;
+extern const uint16 SAVEGAME_VERSION = 99;
This is from the unaltered patch as it comes when you download the patches from 1st post in Gonozal's patchpack thread...

This is what is making trouble for me I guess, because in the latest version of his patch attached to his post earlier in this thread it says

Code: Select all

-extern const uint16 SAVEGAME_VERSION = 89;
+extern const uint16 SAVEGAME_VERSION = 90;
So I guess it wasnt something I did after all... And its probably gonna be a problem for other than me too?

But then again, I'm guessing I could just change that line in the latest patchfile and voila, I'm able to play my game with a patch that dont give compile errors... Thats what I'm hoping for anyway :D

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 27 Feb 2008 16:02
by Gonozal_VIII
the merged patch has savegame version trunk + 10, until now the single patches in my patches.zip also have trunk + 10 but i decided to make them trunk + 1 to make it easier to use them without the rest and use trunk + 10 only in the merged patch... manually changing it to 99 should let you load the savegame

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 27 Feb 2008 16:06
by Trond
Yeh, I did it after posting and it works as a charm...

Doesnt this make all savegames made with your previous patches incompatible with savegames saved with those patches installed? (Atleast untill savegames version is v99...)

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 29 Feb 2008 17:01
by mitch10593
It could be possible to have the Daylength patch in the official release ?

I want to test it on my dedicated servers (to make endless-like games) and if I apply the patch, no clients could connect to my server...

Or perhaps, some servers are already running Daylength modified games ?

I hope this patch will be officialised very soon.

Regards.

Mitch

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 01 Apr 2008 06:25
by Trond
Posting here and hoping someone will update this patch. Gonozal already did some updating, but this is now in need of updating again it seems. The latest version from Gonozal (including clock when dl > 32 I think) is to be found here: http://gonozalviii.go.funpic.de/openttd ... 2345.patch and would be really nice to see that updated to latest trunk... Please.

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 03 Apr 2008 02:47
by vwspeedracer
Would love to see this official. It's always bothered me that it takes a day or 2 for a bus to cross the city once. :P

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 03 Apr 2008 22:28
by Nappe1
I have this patch now updated to rev 12550, but I'll add one more new feature before releasing it... :)

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 03 Apr 2008 23:11
by Nappe1
Here's update patch to 12550.

As addition, now there's new option to disable daylength affecting industry production. :)

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 04 Apr 2008 03:44
by Trond
sweet Nappe1!

Edit: Making a build with this new one, I realize it wount load my old savegames (something about chunk size). I'm not sure, but I guess this is because of the new setting you added? So I updated the old patch (looking at yours seeing how you fixed the conflicts I got) and using that making a build with newest trunk, I can still load my old savegames... Just tought this info my be good to know :)

I guess I could attach my uploaded patchfile if anyone wants it, but then again, I have very little idea about making patches, so you never know if its buggy or whatever...

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 09 Apr 2008 20:07
by Gedemon
Do you think it may be possible to add the following feature for server :

adjustable daylength value by number of player, like slowest if there is only one player connected, but faster with more players ?

Re: Daylength Patch [03/09/2007] Compatibility: r11060

Posted: 20 Apr 2008 04:12
by Trond
Please could someone update this to latest trunk (r12801+) :bow: