Statistix Tools [r2]

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
ganzpopp
Engineer
Engineer
Posts: 46
Joined: 20 Oct 2004 20:36
Location: The Netherlands

Statistix Tools [r2]

Post 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
Attachments
Example
Example
Gentfingbourne Transport, 3rd Jun 1987.png (121.83 KiB) Viewed 1511 times
statistix.patch
Statistix Tools r2
(21.69 KiB) Downloaded 319 times
Last edited by ganzpopp on 29 Aug 2005 00:05, edited 5 times in total.
User avatar
lucaspiller
Tycoon
Tycoon
Posts: 1228
Joined: 18 Apr 2004 20:27

Post by lucaspiller »

I guess you have an svn checkout? So just run "svn diff > mypatch.diff".
No longer active here, but you can still reach me via email: luca[at]stackednotion[dot]com
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post 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.
Last edited by DaleStan on 29 Aug 2005 04:39, edited 1 time in total.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
ganzpopp
Engineer
Engineer
Posts: 46
Joined: 20 Oct 2004 20:36
Location: The Netherlands

Post by ganzpopp »

OK, new version uploaded. Hope anyone will try it!
User avatar
gkirilov
Chief Executive
Chief Executive
Posts: 696
Joined: 03 May 2005 09:32
Location: Othala

Post by gkirilov »

divide the population by factor of ten, so the numbers are approximately in the same range.
OTTDCoop NewGRF Pack|Different sets of GRFs for TTDPatch (some of them work in OTTD) - 1|- 2|GRF sets for OTTD|OTTD nightly
Image
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post 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
Bruno
Engineer
Engineer
Posts: 38
Joined: 15 Dec 2004 22:34
Location: Portugal

Post 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
Majestical
Engineer
Engineer
Posts: 52
Joined: 10 Nov 2005 17:47

Post 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.
User avatar
Gorre
Transport Coordinator
Transport Coordinator
Posts: 322
Joined: 03 Jan 2004 10:28
Location: Somewhere over the rainbow
Contact:

Post by Gorre »

Like me, I like playing with tons of minor and useless graphs, statistics and so on ...
User avatar
osai
Traffic Manager
Traffic Manager
Posts: 132
Joined: 22 Sep 2004 14:56
Location: 10.0.1.254
Contact:

Post 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
Last edited by osai on 23 Nov 2005 20:34, edited 1 time in total.
ganzpopp
Engineer
Engineer
Posts: 46
Joined: 20 Oct 2004 20:36
Location: The Netherlands

Post 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.
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post 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
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 4 guests