Page 1 of 1

Import 1.0.0 map into older version?

Posted: 20 Jan 2010 19:39
by Domovoi
Hi,

while testing 1.0.0 beta I discovered the new feature for the map generation; variety distribution.
Using this function makes it in my opinion for the first time possible to generate realistic maps. But I still miss some other important features in 1.0.0 so I'm still playing with russian patchpack 1.5.0. Is there any possibility to import a generated map (or scenario) into this older version?

Thanks!

Re: Import 1.0.0 map into older version?

Posted: 20 Jan 2010 19:45
by FooBar
No. Unless you're interested manual editing of the savegame...

Re: Import 1.0.0 map into older version?

Posted: 20 Jan 2010 19:53
by Domovoi
I already thought about it, but I have no idea how to do that, which programs I would need etc. :?

Re: Import 1.0.0 map into older version?

Posted: 20 Jan 2010 20:46
by petert
FooBar wrote:No. Unless you're interested manual editing of the savegame...
Would you care to expand on that? I tried opening *.sav with gedit on Ubuntu, but it gave me an error.

Re: Import 1.0.0 map into older version?

Posted: 20 Jan 2010 20:51
by Yexo
petert wrote:
FooBar wrote:No. Unless you're interested manual editing of the savegame...
Would you care to expand on that? I tried opening *.sav with gedit on Ubuntu, but it gave me an error.
That is because gedit is a text editor and can't open non-text binary files. Try a hexeditor, although most likely you won't be able to make any sense from the data.

Re: Import 1.0.0 map into older version?

Posted: 20 Jan 2010 21:02
by Domovoi
Yexo wrote:Try a hexeditor, although most likely you won't be able to make any sense from the data.
It's cryptic... ?( Isn't there a documentation who these .scn-files are structured?

Re: Import 1.0.0 map into older version?

Posted: 20 Jan 2010 21:06
by Yexo
I'm afraid that the only documentation in this case is the actual source code.

Re: Import 1.0.0 map into older version?

Posted: 20 Jan 2010 22:06
by Eddi
Domovoi wrote:
Yexo wrote:Try a hexeditor, although most likely you won't be able to make any sense from the data.
It's cryptic... ?( Isn't there a documentation who these .scn-files are structured?
  1. make an uncompressed savegame [can be set in openttd.cfg]
  2. it's a RIFF structure, so 4-byte chunk name, 4-byte chunk size, appropriate amount of data. the chunk names should appear in the source somewhere
  3. docs/landscape.html and docs/landscape_grid.html might be useful
or go with the idea to create a patch that can export into a PNG heightmap... [which, if done right, might even go to trunk]