View Single Post
Old 07-20-2007, 11:34 AM   #8
Nukester
All Star Starter
 
Nukester's Avatar
 
Join Date: Dec 2001
Location: Newburgh, NY
Posts: 1,923
Quote:
Originally Posted by Ragin Cajun View Post
Hey Nukester, just curious how do you do the random db thing? That might be interesting to do.
I wrote a little program in Visual Foxpro, but you dont need Foxpro to run it. Basically, you copy whatever database you want to use into a folder, then run the program. Press a button and the game will create a new database. Press another button and the game will export the database into .csv files. Then you copy the new .csv files wherever your game is looking for them, then start a new historical league. However, the way it is set up now, you should start the league in 1903, and you must have an inaugrial(?) draft.

The program creates new debut years for every player in the database, between 1900 - 2006 (I dont have the code in front of me, so Im going by memory) , even the players from the 1800's (of course you could remove them from the original DB first if you dont want to use them). The it goes through and updates birthyears and adjusts the years in the batting, pitching, fielding, and fielding OF files.

The reason you should start in 1903 is because that will give you 3 years of players to use for the initial draft, pretty much insuring that you have enough players to fill the teams. You also need to do an initial dump of players into the FA pool, then release them for a draft. You need to do this because the game will only put in the initial draft players whos teams are actually in the league for that year. So any player that isnt on one of the 16 teams of 1903 will not show up for the initial draft. This program gets by that by assigning all players one of the teams that were around in 1903. You must dump and redraft though in order for all teams to have players (I think I have all players whos last name starts with A,B, C, and D on the Reds for example).

It is really quite simple and takes about 30 seconds to run the program. It takes longer to copy and paste the files to wherever the game is looking for it. Also, it creates a different database everytime it is run, so one time Babe Ruth may debut in 1910 and the next he might debut in 1979. So far the game is handling the stats very well, except for the first season. It tends to want to give big power numbers in 1903, so you have to play with the league totals alittle for that first season so that everything doesnt get out of whack. The game straightens itself out after a couple of seasons though. For instance, my HR leader for 1905 was Morgan Ensberg with 12.

I may go back and modify it so that a user could choose the range in years for the debut. Its working prefectly for my own purposes as it is though, so I havent really been focusing on that yet

Last edited by Nukester; 07-20-2007 at 11:40 AM.
Nukester is offline   Reply With Quote