View Single Post
Old 01-08-2007, 12:42 AM   #4
Comedian2004
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
OK, I added the fictional section, at least the start.

PLEASE, backup your image folder before you run it. Just zip it up.

Now, the plan is to add fictional players without duplicates. The original collection contains just over 24,000 players. I have tested it on a 3000 player league and it adds them in less than 2 minutes.

First, you will have to erase the player_x.jpg files from the IMAGE folder. This is to insure that we have no duplicates. The program will NOT create fictional players for players named with the format of firstname_lastname.jpg. It will leave that player as is.

As you run the routine, it will first ask you if you want to do the retired players also. If you answer no, it will just do the photos for active players. If you answer yes, it will do all the players. It will then quickly run through and do it's thing. It will show what player it is working on, but it runs so fast, you just see your OOTP life flash by your eyes. If the player already has a player_ID.jpg file in the image folder, it will also skip over him.

There is a safeguard in, if it tries 1000 times and can't find a random number, it will let you know and give up. I added this, as it would just loop forever.

There are two INI files that are created in your IMAGE folder.

PhotoInv.ini - This contains the playerID and his assigned photo (as numbered in the RANDOM folder. It is in the format of:

1-23217
2-9483

The other file is called PhotoInv2.ini - This file contains weather not the random number is used. It will just contain 24,000+ entries of TRUE or FALSE.

DO NOT mess with these files.

There is one more file that is created in the AU2007 folder called Random_Photos.ini. This file contains the number of photos in the RANDOM photo. You can add photos as you want and delete photos, but it is your responsibility to make sure they are numbered from 1 to xxxx. You would then run the COUNT PHOTOS routine to update this file, or you could edit the text file.

Next up, I will add another function for retired players. This will basically go through the player file and look at retired players. If they do not have a certain amount of at bats or IP, it will recycle their photo and that player will have no photo. It will prompt you to set the AB and IP that you want to use for the cutoff.

What would you suggest that I set as the default for AB and IP?

I will also add a count function that will count how many unused photos you have.
__________________
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