Daylength Patch [12/09/2008] Compatibility: r14293

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

Which daylength are you playing at?

1-5
53
41%
6-15
27
21%
15+
50
38%
 
Total votes: 130

Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

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

Post 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.
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
Gonozal_VIII
Traffic Manager
Traffic Manager
Posts: 165
Joined: 03 Dec 2007 15:06

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

Post 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
Trond
Tycoon
Tycoon
Posts: 973
Joined: 25 Jan 2008 07:32
Location: Gamle Ørnenuten

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

Post 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?
..: Trond :.. because you deserve it! Image

The whole problem with the world is that fools and fanatics are always so certain of themselves,
and wiser people so full of doubts.
Bertrand Russell

MyGRFs: Norwegian Funny Town Names 4 | LOTR & WoW Town Names 2 | Islandic Town Names 1 | Random Norwegian Town Names
Favorites: GRFCrawler | ISR | WIKI | Now Playing: OpenTTD 1.3.2 w/YAPP 3.0-RC3.9ish
PhilSophus
Chairman
Chairman
Posts: 776
Joined: 20 Jan 2007 12:08
Location: Germany

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

Post 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.
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
Trond
Tycoon
Tycoon
Posts: 973
Joined: 25 Jan 2008 07:32
Location: Gamle Ørnenuten

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

Post 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...
..: Trond :.. because you deserve it! Image

The whole problem with the world is that fools and fanatics are always so certain of themselves,
and wiser people so full of doubts.
Bertrand Russell

MyGRFs: Norwegian Funny Town Names 4 | LOTR & WoW Town Names 2 | Islandic Town Names 1 | Random Norwegian Town Names
Favorites: GRFCrawler | ISR | WIKI | Now Playing: OpenTTD 1.3.2 w/YAPP 3.0-RC3.9ish
PhilSophus
Chairman
Chairman
Posts: 776
Joined: 20 Jan 2007 12:08
Location: Germany

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

Post 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.
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

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

Post by Roujin »

it's -d on windows aswell.
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
Trond
Tycoon
Tycoon
Posts: 973
Joined: 25 Jan 2008 07:32
Location: Gamle Ørnenuten

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

Post 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 :/
Last edited by Trond on 27 Feb 2008 11:46, edited 1 time in total.
..: Trond :.. because you deserve it! Image

The whole problem with the world is that fools and fanatics are always so certain of themselves,
and wiser people so full of doubts.
Bertrand Russell

MyGRFs: Norwegian Funny Town Names 4 | LOTR & WoW Town Names 2 | Islandic Town Names 1 | Random Norwegian Town Names
Favorites: GRFCrawler | ISR | WIKI | Now Playing: OpenTTD 1.3.2 w/YAPP 3.0-RC3.9ish
PhilSophus
Chairman
Chairman
Posts: 776
Joined: 20 Jan 2007 12:08
Location: Germany

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

Post 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.
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
Trond
Tycoon
Tycoon
Posts: 973
Joined: 25 Jan 2008 07:32
Location: Gamle Ørnenuten

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

Post 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
..: Trond :.. because you deserve it! Image

The whole problem with the world is that fools and fanatics are always so certain of themselves,
and wiser people so full of doubts.
Bertrand Russell

MyGRFs: Norwegian Funny Town Names 4 | LOTR & WoW Town Names 2 | Islandic Town Names 1 | Random Norwegian Town Names
Favorites: GRFCrawler | ISR | WIKI | Now Playing: OpenTTD 1.3.2 w/YAPP 3.0-RC3.9ish
Gonozal_VIII
Traffic Manager
Traffic Manager
Posts: 165
Joined: 03 Dec 2007 15:06

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

Post 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
Trond
Tycoon
Tycoon
Posts: 973
Joined: 25 Jan 2008 07:32
Location: Gamle Ørnenuten

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

Post 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...)
..: Trond :.. because you deserve it! Image

The whole problem with the world is that fools and fanatics are always so certain of themselves,
and wiser people so full of doubts.
Bertrand Russell

MyGRFs: Norwegian Funny Town Names 4 | LOTR & WoW Town Names 2 | Islandic Town Names 1 | Random Norwegian Town Names
Favorites: GRFCrawler | ISR | WIKI | Now Playing: OpenTTD 1.3.2 w/YAPP 3.0-RC3.9ish
mitch10593
Engineer
Engineer
Posts: 7
Joined: 16 Apr 2004 11:27

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

Post 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
Trond
Tycoon
Tycoon
Posts: 973
Joined: 25 Jan 2008 07:32
Location: Gamle Ørnenuten

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

Post 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.
..: Trond :.. because you deserve it! Image

The whole problem with the world is that fools and fanatics are always so certain of themselves,
and wiser people so full of doubts.
Bertrand Russell

MyGRFs: Norwegian Funny Town Names 4 | LOTR & WoW Town Names 2 | Islandic Town Names 1 | Random Norwegian Town Names
Favorites: GRFCrawler | ISR | WIKI | Now Playing: OpenTTD 1.3.2 w/YAPP 3.0-RC3.9ish
User avatar
vwspeedracer
Engineer
Engineer
Posts: 28
Joined: 31 Mar 2008 01:37
Location: Colchester, VT, USA
Contact:

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

Post 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
Fan of: Image
Nappe1
Traffic Manager
Traffic Manager
Posts: 175
Joined: 19 Jan 2004 17:25
Location: kotka or Savitaipale, Finland
Contact:

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

Post by Nappe1 »

I have this patch now updated to rev 12550, but I'll add one more new feature before releasing it... :)
Nappe1
Traffic Manager
Traffic Manager
Posts: 175
Joined: 19 Jan 2004 17:25
Location: kotka or Savitaipale, Finland
Contact:

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

Post by Nappe1 »

Here's update patch to 12550.

As addition, now there's new option to disable daylength affecting industry production. :)
Attachments
DayLength-rev12550.patch
(26.2 KiB) Downloaded 175 times
Trond
Tycoon
Tycoon
Posts: 973
Joined: 25 Jan 2008 07:32
Location: Gamle Ørnenuten

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

Post 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...
..: Trond :.. because you deserve it! Image

The whole problem with the world is that fools and fanatics are always so certain of themselves,
and wiser people so full of doubts.
Bertrand Russell

MyGRFs: Norwegian Funny Town Names 4 | LOTR & WoW Town Names 2 | Islandic Town Names 1 | Random Norwegian Town Names
Favorites: GRFCrawler | ISR | WIKI | Now Playing: OpenTTD 1.3.2 w/YAPP 3.0-RC3.9ish
User avatar
Gedemon
Traffic Manager
Traffic Manager
Posts: 150
Joined: 29 Apr 2004 21:53

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

Post 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 ?
Trond
Tycoon
Tycoon
Posts: 973
Joined: 25 Jan 2008 07:32
Location: Gamle Ørnenuten

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

Post by Trond »

Please could someone update this to latest trunk (r12801+) :bow:
Attachments
daylenght r12558.patch
(24.84 KiB) Downloaded 110 times
..: Trond :.. because you deserve it! Image

The whole problem with the world is that fools and fanatics are always so certain of themselves,
and wiser people so full of doubts.
Bertrand Russell

MyGRFs: Norwegian Funny Town Names 4 | LOTR & WoW Town Names 2 | Islandic Town Names 1 | Random Norwegian Town Names
Favorites: GRFCrawler | ISR | WIKI | Now Playing: OpenTTD 1.3.2 w/YAPP 3.0-RC3.9ish
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 7 guests