View Single Post
Old 09-09-2006, 09:58 AM   #7 (permalink)
Comedian2004
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,895
Thanks: 0
Thanked 27x in 17 posts
Well, they did not release an Almanac function and it don't look like we are going to get one put in there. A real shame they did not add one.

So, I have started to code in an almanac. The bad news is, that in order to use my almanac, you will have to run my program at the end of the season. I am not sure what date it will be ran at, as I have to do a series of tests to find out when certain information disappears.

The 1st step was to examine the box score folder. At the end of the year, this folder is NOT erased. So, as the years carry on, you have left over box score files.

In my 1940 season, that started in 1940 and is currently in 1942, I examined the folder and discovered these box scores were in the folder:

1941 - 2,507 games
1942 - 2,624 games

In my 1952 league, which I ran from 1952 to 2005:

1966 - 1 game
2001 - 1 game
2005 - 1430 games

So, the 1st thing I will do is to clean up and erase the old box scores, so they are not put in the almanac folder in the wrong year.

The same thing will happen with the play by plays. Plus, we have another added bad thing. When you play a game out, even if you have SAVE ALL BOX SCORES and SAVE ALL PLAY BY PLAYS, the play by play is not saved for the game you play out. BUG!

However, there is a work around. The play by play can still be generated and I have found a way to work around this.

To generate a play by play, simply bring up the box score in OOTP and then click on the PBP link. It will generate the PBP on the fly and it saved.

So, when you are playing a game out, when the game is over, it automatically launches the box score, thus saving it to the disk. But this is where the bug is, it does not generate the play by play. So, you should click on the play by play link and it will generate it.

This is VERY important that you do this, as my program will be using the play by play to generate some HTML files.

I will also require you to do a CSV dump before running my program. This CSV dump will also be backed up in my Almanac. This will allow me to do some cool stuff, like show a players ratings history, year by year.

I am not sure what else I am going to backup, as I will know as I work on the program. You will be able to pick the location where the backup will be. It could be a different hard drive if you want.

My program will create a main html page, where you can access any year in the history and see box scores and play by plays for any giving game. There will be an achievement list, like the no-hitters, but it will have links back to the box score of that game, so you can view a no-hitter's box score 5 years after it happens.

I have figured out a way to link to an outside HTML source while in the game. So, you will be able to have access to this information from within the game. At this point, I have not looked at doing it 'while you are playing a game', but I will look into this.

This is going to be a very complex program, it is not just as simple as copying over files. It is going to be creating HTML files and links, so it will take some time to write this one, plus I will continue to work on the other projects at the same time. When I am ready, I will post it so we can get some people to try it, find bugs and make suggestions.
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
Comedian2004 is offline   Reply With Quote