What Is OOTP FaceScript?
A javascript file written for Photoshop CS2 that randomly generates and saves photos composed from a base photoshop file that has over 300 layers by activating and deactivating certain ones at a time.
I got the idea when I saw Layton is my Homeboy's thread on his project, the OOTP FaceTool (
http://www.ootpdevelopments.com/boar....php?t=118171). This is a pale imitation of that. This isn't a stand-alone program and isn't a fraction as robust as his looks like it'll be. FaceScript is mostly just to tie anyone over in the mean time if you're looking for some quick and dirty generation of photos.
It's been over year since I coded, so I bugged my roommate, a software engineer, to do most of the tough work (i.e. about 90% of the coding), so thank him more than anyone else. The faces came from Blue Turf's, Bobble's, and Chredwdew's "Bag O'Heads" templates which can be located here:
http://newrepublic.silvergriffin.com/ootptools.html. Additionally, the uniform templates from this these uni's were created were from Deft, and can be found at the aforementioned site. My hat's off to you guys, the templates are pretty damn amazing. (Note: If you don't want a smattering of those templates used with this program, say the word and it's gone).
It isn't the most efficient script, but it works. It's run directly from Photoshop itself. It works with CS2, but I'm not sure it'll work with any other version. A sample of some output:
Download
You can grab the file here:
http://www.the405.org/playergen/OOTPFaceScript.zip
If anyone could rehost, please do. Feel free to redistribute or whatnot.
How to Use:
1) Extract the zip file into a folder somewhere. If using WinZip, make sure you extract with directories intact.
2) Open up "Photo File.psd" in Photoshop CS2.
3) With it open, go to File => Scripts => Browse..., and then select "OOTP FaceScript.jsx"
4) You'll be prompted to enter in the number of photos to generate and the starting number for the naming convention.
5) Sit back and wait. All photos will be thrown into the Generated folder, which needs to be in the same folder as Photo File. It took about 2 hours on my decent rig to generate 2000 files. They should all follow standard OOTP2006 naming convention.
6) Copy them into your OOTP save folder under Data, Saved_Games, [League Folder], News, HTML, Images.
Adding Faces, Backgrounds, Uniforms, and Accessories
To add faces, merely place them into one of the three Face Layer Folders in "Photo File.psd." By default, Face 1 has African American heads, Face 2 has Asian heads, and Face 3 has White and Hispanic faces. All faces have an equal probability of being generated.
To add backgrounds, just add them to the Background Layer Folder. To add accessories, it's the same process.
It's a bit trickier to add uniforms. You'll have to create a new Layer Folder next to the others and name in Uniform X, where X is the next number in succession of the last one. I.E., by default you'd need to create Uniform 14. Then throw all the uniform components in there and turn them visible, but have the overall Layer Folder turned off like the others. Then you'll need to open the script file with a text editor (like Wordpad) and change the "13" of the line "var numUniforms = 13;" to whatever number of uniforms you have. Save the file, and it should run fine.
Notes
Keep in mind of the visibility settings for layers and Layer Folders. Layer Folder "Accessories" must be set to visible, but all components inside to invisible. All Uniform Folders need to be set to invisible, but the layers within them to visible. All "Faces" Layer Folders must be set to visible, but the layers within them to invisible. The Background Layer Folder must be set to visible, but all layers within to invisible.
The frequency of accessories can be lessened by adding more blank ("Empty") layers into the Accessories Layer Folder.
Any problems? Shoot me a PM on the OOTP boards (name: MidKnight) or fire an email to me at
honorshade@gmail.com.