Longer history of Finances
Moderator: OpenTTD Developers
Longer history of Finances
Edit: See below for an updated version by BamBam.
I started on a patch that shows a longer history in the finances window. Currently you can only see the last 2 and the current year, this patch adds a horizontal scrollbar to that window and has 5 years of history.
There are however some problems:
- I don't really know C, so the code might suck.
- When the company has just started the screen doesn't really work as it should. It's not totally broken though.
- When you change the date (via the cheat menu) and set it back to before the inauguration date, the thing borks.
- The history isn't saved. I suppose a change in the savegame stuff would have to be made. Wouldn't know where to begin :-)
I might try to fix some of these things, but if someone else feels like doing so, please feel free ;-)
I started on a patch that shows a longer history in the finances window. Currently you can only see the last 2 and the current year, this patch adds a horizontal scrollbar to that window and has 5 years of history.
There are however some problems:
- I don't really know C, so the code might suck.
- When the company has just started the screen doesn't really work as it should. It's not totally broken though.
- When you change the date (via the cheat menu) and set it back to before the inauguration date, the thing borks.
- The history isn't saved. I suppose a change in the savegame stuff would have to be made. Wouldn't know where to begin :-)
I might try to fix some of these things, but if someone else feels like doing so, please feel free ;-)
- Attachments
-
- economy_history.002.diff
- Patch file
- (4.56 KiB) Downloaded 523 times
Last edited by oVRoM on 13 May 2011 20:02, edited 2 times in total.
Nice patch - I remember sometimes wanting this behaviour back when I was playing TTD and even now it would be nice, to see who destroyed the terrain (OpenTTD - multiplayer game).
I'll be quiet about the programming part too, as I'm also not strong in C.
I'll be quiet about the programming part too, as I'm also not strong in C.
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Well then - the finance window should then be set to the year, that is chosen via the date_change cheat and maybe save the previous state/progress...
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Bob Smith wrote:Yay, no more making logs in Excel....
Really - did you mean that?
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
- webfreakz.nl
- Director
- Posts: 627
- Joined: 11 Aug 2005 08:22
- Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
- Contact:
Ha. When I first started playing TT when I was like 10 I used to write down the years finances on paper so I check back all the way to the beginning. Later I copied the list onto Excel. I remember being annoyed that I still had to write it down on paper first, since TT ran on DOS and Excel Win3.1.
I think I only ever did it for my first game or two though. So not for a long time.
I think I only ever did it for my first game or two though. So not for a long time.
Hm, I did that Excel stuff too, until I realized that using Microsoft software may be damaging to your health ;-)
A while ago I wrote a patch for openttd which printed the finances data to a logfile each year, and made a perl script that used that data to generate an overview in HTML... I've since stopped working on that patch & script, because I figured a history in TTD itself is nicer.
A while ago I wrote a patch for openttd which printed the finances data to a logfile each year, and made a perl script that used that data to generate an overview in HTML... I've since stopped working on that patch & script, because I figured a history in TTD itself is nicer.
- webfreakz.nl
- Director
- Posts: 627
- Joined: 11 Aug 2005 08:22
- Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
- Contact:
why not XML? Think that works better (cross-platform...)Bob Smith wrote:If you could make the patch export to a standard csv format you could import the data in Excel and have endless amounts of graphs generated. Just a thought.
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
Whatever. So long as it is a generic format (which CSV is, to my knowledge).
Another benefit is that you could remove inflation, so you could see if you're really making more money than you were 10 years ago (since the numbers will get bigger over time without you having to do anything).
@Arsenal: well if you're going to do a job, best do it properly. Anyway, I like to reminisce over past glories.
Another benefit is that you could remove inflation, so you could see if you're really making more money than you were 10 years ago (since the numbers will get bigger over time without you having to do anything).
@Arsenal: well if you're going to do a job, best do it properly. Anyway, I like to reminisce over past glories.
I like the idea of this patch.
So I updated it to aktually trunk (r9824) and extended it.
- You can choose in the config how long the history are.
- The whole history-length (you choose in config) will be saved.
- If your company not exist so long how the adjustment will be it only show as many as years you played.
I hope you enjoy it and please post bugs/comments.
-BamBam
Edit 19. June 2007: update to r10230 and some code changes (particularly the saveload thing)
So I updated it to aktually trunk (r9824) and extended it.
- You can choose in the config how long the history are.
- The whole history-length (you choose in config) will be saved.
- If your company not exist so long how the adjustment will be it only show as many as years you played.
I hope you enjoy it and please post bugs/comments.
-BamBam
Edit 19. June 2007: update to r10230 and some code changes (particularly the saveload thing)
- Attachments
-
- finance_history_10230.patch
- (10.96 KiB) Downloaded 353 times
-
- finance_history_10230.7z
- Win32 executable
- (905.46 KiB) Downloaded 297 times
Last edited by BamBam on 19 Jun 2007 22:05, edited 1 time in total.
Who is online
Users browsing this forum: peter1138 and 44 guests