News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

Exporting gamedata (vehicles and other)

Started by hreintke, January 13, 2013, 11:23:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hreintke

LS,

I made a "proof of concept" patch which enables the export of all vehicle data to a csv file and which can be expanded to other "bauers" like roads, factories and other.

I do not yet understand the gui code enough to be able to add buttons etc. That is why I piggybacked to the "save game" button.

If you save the game, it also exports a file simu_gamedata.zip which includes a file simu_gamedata which is the actual export.
See the attachment for the export from my pak64+addons game.

I made this because I read several time people asking for "what is in a pakset".
Altough this does not directly this, you can open a game with any pakset/addon you wish and get the data.

Can you look at this patch and comment on usage and implementation ?

Herman

Ters

Do the people asking "what is in a pakset" know what to do with CSV files? I'd expect a PDF would be more suited for those kinds of questions, as it can also show an image of the vehicles. CSV is more suited for analyses, which there is also a demand for.

wlindley

CSV may be easily opened with LibreOffice or any other spreadsheet... much more useful (and simpler) than  PDF.

Although some pak-analysis might be better done by parsing the .dat files from which the paks are made, this approach could be most excellently used to save data about the game, or even to write the elusive "pak-set de-compiler" ...!

Ters

Quote from: wlindley on January 13, 2013, 02:39:23 PM
CSV may be easily opened with LibreOffice or any other spreadsheet... much more useful (and simpler) than  PDF.

I know. You know. That doesn't mean most people know. A CSV inside a zip in some directory might be difficult enough. Having Simutrans open the file in the associated program would be helpful to them. I still think images would be a big plus.

VS

Would there be a huge demand for this ("illustrated") kind of data? I have some collections of scripts that can do reports like this from sources. This documentation could be packed with the sets.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Ters

Huge might be an exaggeration, but it could add some value. Players of the railway buff (or similar for road, air, sea) type would perhaps also like it if vehicles had short descriptions like buildings and attractions have, especially for paks with proper vehicles, unlike the half-real half-fictional vehicles in pak64.
(I also have a utility for making reports, but from the compiled files.)

hreintke

Positive on this option is

1/ the "do not need to install any addtional software/scripts".

That makes it available for every non-technical player too.
Location and naming of the export file(s) can be made configurable. 

I saw a comment in the source "text mode no longer supported." but it would also be possible to export csv files directly instead on covered in zip file.

2/ Game specific export

It shows what is cofigured in your game. combinig the initial pakset and all addons which adds/removes specific items.

Herman

VS

We have access to this kind of data easily. That said, people with less knowledge/power could find this very useful. Having a zipped csv enables processing in Excel etc, which are understood by far bigger user base than general computing and text manipulation (I believe).

Personally: The data is static and could be fetched earlier. This feels pointless. But perhaps it is just a programmer/power user feeling that it is not "right" to compile, load and then export the data when there can be only one step (overoptimization? :D ). And having it in game means that users do not need another program.

In the end... why not.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

prissi

Most of those data is even show on loading with debug level 3 ...

hreintke

LS,

OK, no problem.
I keep this in my personal patch library for own usage.

Up to next experience.

Herman

greenling

hreintke
A tool how can copy the Data from Vehiclepakfiles in a Textfiles it very useful.
Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!

dennosius

What would be really useful in my eyes is a tools that illustrates vehicle timelines by loadtype and waytype, for example a timeline of all passenger road vehicles or all railway oil vehicles. This would make gaps in the timeline better visible.

VS

In that case:

pak128 svn -> tools -> timeline-veh.py (or something similar)

IIRC I made it accept goods filters and such...

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!