News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

TOOL - Pak analyzer

Started by Milko, January 15, 2014, 04:45:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Milko

Hello

I 'm working on a tool that takes the source files of a pak and transforms them into an Excel spreadsheet .
This tool is very useful if you want to extract statistics from the massive pak .
This tool is still in its infancy but to me it was very useful for checking errors in pak , I do not know if it works with the locale as I tried it with only the Italian version .
To use it you must enable macros , launched the macro will need to select (then press ok) the folder where the files (*.dat) . The question " Cerco nelle sottocartelle", in English, is equivalent to "search subfolders" and enable the macro to scan all subfolders in the folder specified initial.
The macro also creates a file " file.log " ( in the home folder you specified) in the file you'll find all the rows of the files inspected and you will be told whether or not the parameters indicated are recognized ( this is useful for identifying errors in text entry , for example when you miss a character or if it add one more ) , " Riconosciuto "= recognized, "NonRiconosciuto" = not recognized .
I am attaching the macro so that it can try and use, I do not assume responsibility for its use , I've used it several times without any problems . I am available (within the limits of the time I have available ) to improve it.
The macro is compatible with all pakset and not only with the britain.
Excuse me for English.
Giuseppe

jamespetts

This looks very interesting! That must have taken a lot of effort, too.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Milko

Hello

I am attaching an example of the results obtained.
This is the section of the air pak britain experimental, converted into a table. In addition to the excel file I put its log files.

Giuseppe

jamespetts

That is one rather large spreadsheet! Very interesting indeed.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

Some listings and statistics can be also gained from the simutranslator ...

The Hood

Haven't had time to look at this properly but this looks like it could be really useful, especially for balancing projects. All we need now is something that can take the contents of the excel file and write out the dat files so you can import to excel, make changes, then export to dat quickly and easily. Should be easy enough with a VBA script?

isidoro

Just in case it can help: some times I am forced to work with spreadsheets, which I deeply and quite irrationally hate.  I use to read them (and possibly write to them) this Python package:

http://sourceforge.net/projects/pyexcelerator/

Once in Python, I can convert, modify, etc. the data without as much pain...


jamespetts

What we really need is some sort of game that will take the data from the spreadsheet and let us play in a sort of simulated environment with these vehicles...
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ves


Quote from: jamespetts on January 16, 2014, 11:57:37 PM
What we really need is some sort of game that will take the data from the spreadsheet and let us play in a sort of simulated environment with these vehicles...


James, i started in excel a sheet where I tried to simulate income for vehicles. I looked in simuconf.cfg, goods.pak and other places to find all relevant input (that I could find) and created rules in the sheet. I set it up so I could easily make changes to see what would result. However the sheet is incomplete and I have probably missed something too.
If you want it I could send it to you. Since you know the game engine you maybe can complete it to an extent I can not :-)


Sent from my iPhone using Tapatalk

jamespetts

Interesting. What exactly was your spreadsheet intended to do?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ves

I try to create pak.sweden eventually, and some month ago I decided to try a basic test balancing, or at least start to.
I don't precisely remember here on the go, but you write in the distance and some info on the vehicle, and it would calculate how much profit the vehicle would do. I also had plans to calculate the investment cost needed in vehicle and infrastructure and after that the ROI (return on investment) but it never made it so far.
I stopped working on it, when I realized you would change the passenger code.


Sent from my iPhone using Tapatalk

jamespetts

Interesting. Ahh, yes, forthcoming changes might alter balance somewhat: see here for a discussion of that issue as applied to Pak128.Britain-Ex.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Milko

Hello The Hood

Quote from: The Hood on January 16, 2014, 08:47:31 PM
Haven't had time to look at this properly but this looks like it could be really useful, especially for balancing projects. All we need now is something that can take the contents of the excel file and write out the dat files so you can import to excel, make changes, then export to dat quickly and easily. Should be easy enough with a VBA script?

I can update the macro to convert the sheet in *.dat file, but you would lose all the comments and any parameters that are not recognized.

Giuseppe