Hi ! :)
I want to export datas from Simutrans Save game for create a plan (like this : (http://www.tcl.fr/var/tcl/storage/images/media/images/plan-de-la-ligne-c34/5680936-1-fre-FR/Plan-de-la-ligne-C3.jpg).
Do you know tools for do that ? Or How I can parse Simutrans save game (I can create a tool if need) ?
It's a fairly straightforward XML file, so with a bit of work you can parse out the information you need... as for existing tools, I know that some people have made their own specific tools for other reasons, but nothing comprehensive, so you'll probably have to program one yourself for this application.
Hi :) Thanks you for your response ^^
The (uncompresse) file content is not very understandable :
(http://wstaw.org/m/2014/04/29/plasma-desktopPH3138.png) :/
You must set the save game format to xml first. As far as I know, the default is binary. I have no idea how to do that, however. You can try searching, or wait for someone who knows to pass by. The file format can change at any time, so the tool must keep track of changes in every new version of Simutrans.
Try changing the save format to "zip" in simuconf.tab, i.e. change
saveformat = bzip2 to saveformat = xml
Another possibility is to create a "fake" scenario. With some knowledge of Squirrel programming language, you have access to a lot of data from the game, you can process it from Squirrel and, hopefully (of this, I'm not sure now), save it in whatever format you like...
Hi again, thanks for your response. I Looking for a documentation about XML Save Game for know structure etc. Do you have a URL (or document) for more information ?
Unfortunately, I think this is a "figure it out yourself" / "the source code is the documentation" thing. Even if someone, most likely outside the dev team, have made some documentation, it is likely outdated.
Every schedule start with a "<fahrplan_t>" tag. The actual entries inside are "koord3d" which conist of x,y,and z coordinates of a stop.
But this information is virtually useless, as you need to load the whole map to find out, what stop is at these coordinates. Using game script (or a patch) is the only way to get these informations.
Since something like this was implemented in the minimap, it is probably best to read the original discussion on the implementations: http://forum.simutrans.com/index.php?topic=6760.0
Quote from: Aristide on April 30, 2014, 07:44:59 PM
Hi again, thanks for your response. I Looking for a documentation about XML Save Game for know structure etc. Do you have a URL (or document) for more information ?
Please proceed into the direction isodoro is suggesting: Create a dummy scenario that will read all the in-game information and process the output for you.
Try the attached scenario file: Create new directory under
simutrans/<yourpakset>/scenario/linestats
or
(My Documents)/simutrans/addons/<yourpakset>/scenario/linestats
copy the file there.
Start simutrans with flags '-debug 2 -log 1', load your savegame, load the scenario 'linestats'. It should print some information to the console (and the log file simulog.log).
Edit: Uploaded the wrong file accidentally. Please redownload.