Page 1 of 1

Statistix Tools [r2]

Posted: 28 Aug 2005 16:02
by ganzpopp
Without having any knowledge of C, I managed to create a small patch for OpenTTD: Statistix!

It adds statistical windows to the town, train and road vehicle dialogs, so you can monitor for example the growth of population, or the decrease in value of trains. It's only minor, but usefull I think.

Please give comments. Note that this 'project' is mainly to increase my C programming skills... :D

r2 [2005-08-29]:
-Fixed window bugs
-Added statistics for road vehicles
-Now in .patch file
-Should work with OTTD r2900

Known bugs:
-Closing vehicle main window doesn't close statistics window
-Train value incorrect

Posted: 28 Aug 2005 16:41
by lucaspiller
I guess you have an svn checkout? So just run "svn diff > mypatch.diff".

Posted: 28 Aug 2005 19:25
by DaleStan
For future reference, unified diffs (diff -u) are usually preferred.

EDIT: That is, when you're not using svn diff. svn diff is preferable when working on projects that use svn.

Posted: 29 Aug 2005 00:05
by ganzpopp
OK, new version uploaded. Hope anyone will try it!

Posted: 29 Aug 2005 08:08
by gkirilov
divide the population by factor of ten, so the numbers are approximately in the same range.

Posted: 29 Aug 2005 08:09
by MeusH
It would be interesting to see more statistics, like:
Cargo (passengers, mail, coal, whatever) produced
Cargo accepted
% Transported

Anyway, that's great patch and I hope it will be ready soon to add to the trunk

Posted: 29 Aug 2005 18:28
by Bruno
MeusH wrote:It would be interesting to see more statistics, like:
Cargo (passengers, mail, coal, whatever) produced
Cargo accepted
% Transported

Anyway, that's great patch and I hope it will be ready soon to add to the trunk
I agree

Posted: 10 Nov 2005 18:35
by Majestical
Won't this use a whole lot of memory?

Other than that, great work. Some people can't have enough graphs with games like this.

Posted: 10 Nov 2005 20:43
by Gorre
Like me, I like playing with tons of minor and useless graphs, statistics and so on ...

Posted: 10 Nov 2005 21:43
by osai
great patch, I really like it.

More stats, as MeusH said, would be fantastic. 8)

Maybe it is easy to implement:
- passengers per month and passangers
- transported per month
because these values are shown in the city information window

Posted: 23 Nov 2005 20:09
by ganzpopp
nice to see there's still some interest in this patch. no time for now, but I'm following C++ classes and so hopefully soon I will finish this patch.

Posted: 23 Nov 2005 20:39
by MeusH
Check OTTD IRC channel irc://irc.freenode.net/openttd and talk to developers - Wiki says Celestar is working on statistics, too, and it would be bad if your work wouldn't be used