Latest News: OOTP PATCH 9.1.6 released! - OOTP 9 RELEASED! - Title Bout Championship Boxing 2.5 released! - OOTP 2007 receives Editors Choice Award from PC Gamer - Inside the Park Baseball Patch 1.03 released, DEMO now available

Click here to download Out of the Park Baseball 9!

Go Back   OOTP Developments Forums > OUT OF THE PARK BASEBALL 9 > OOTP 9 - Mods
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

OOTP 9 - Mods Logos, roster packs, historical databases, OOTP tools, FaceGen files... it's all here!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 06-26-2006, 07:58 PM   #1 (permalink)
Major Leagues
 
MidKnight's Avatar
 
Join Date: Nov 2003
Location: San Luis Obispo, CA
Posts: 340
Photoshop CS2 Random Photo Generation: OOTP FaceScript

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.
MidKnight is offline   Reply With Quote
Old 06-27-2006, 11:13 AM   #2 (permalink)
Major Leagues
 
Hageneezz's Avatar
 
Join Date: Sep 2005
Location: The Hague,Netherlands
Posts: 381
Amazing,just what i needed
Hageneezz is offline   Reply With Quote
Old 06-27-2006, 11:17 AM   #3 (permalink)
All Star Starter
 
truthserum's Avatar
 
Join Date: Jul 2002
Location: Waterloo Iowa
Posts: 1,345
Some kind of mod here. I will have to try it out, when I get the chance.
truthserum is offline   Reply With Quote
Old 07-13-2006, 07:01 PM   #4 (permalink)
All Star Reserve
 
Deft's Avatar
 
Join Date: Dec 2001
Posts: 773
Very cool. Glad you like the templates.
__________________
ATHL Louisville Jockeys (2001-present)
2002, 2007, 2010, 2012, 2014, 2015 World Champions
Consolidated Jersey Styles or here
Jersey and Cap GIMP/Photoshop Templates
Deft is offline   Reply With Quote
Old 07-13-2006, 07:26 PM   #5 (permalink)
Major Leagues
 
MidKnight's Avatar
 
Join Date: Nov 2003
Location: San Luis Obispo, CA
Posts: 340
Quote:
Originally Posted by Deft
Very cool. Glad you like the templates.
Hey, thank you...I was spending ages trying to make a bunch of photos by hand, but I realized it was going to take 15 hours or so to get the number I wanted. Figured there must be some way to automate the process. Thought there might be a bit more of a response to this, but maybe not since it's dependent on having Photoshop. Ah well, I've got several thousand photos now - I'm happy.
MidKnight is offline   Reply With Quote
Old 07-18-2006, 11:02 AM   #6 (permalink)
Minors (Triple A)
 
asaintsfan's Avatar
 
Join Date: Feb 2003
Location: Born and raised in New Orleans LA
Posts: 224
I guess it doesnt work with regular photoshop as I dont have a "scripts" option under file browse. That sucks
__________________
Retired Gunnery Sergeant of Marines
Never forget 9/11
asaintsfan is offline   Reply With Quote
Old 07-18-2006, 04:52 PM   #7 (permalink)
Major Leagues
 
MidKnight's Avatar
 
Join Date: Nov 2003
Location: San Luis Obispo, CA
Posts: 340
Quote:
Originally Posted by asaintsfan
I guess it doesnt work with regular photoshop as I dont have a "scripts" option under file browse. That sucks
Do you mean Photoshop CS1? I thought it was somewhere there, but I don't have a copy to dig around. I'm planning on tweaking the script a bit, generating a couple thousand faces, and hosting a facepack somewhere if you're interested.
MidKnight is offline   Reply With Quote
Old 07-20-2006, 07:59 PM   #8 (permalink)
All Star Starter
 
tcblcommish's Avatar
 
Join Date: Mar 2002
Location: Canada
Posts: 1,686
Is there a way to use just 1 uniform at a time?

I am curious becuase I would like to run this with the 1 uni and populate about 500 players per each one in a seperate folder and then have them for every draft for the new players without having to search each picture for ther uni.

Thanks

Great program by the way
tcblcommish is offline   Reply With Quote
Old 07-20-2006, 08:02 PM   #9 (permalink)
All Star Starter
 
tcblcommish's Avatar
 
Join Date: Mar 2002
Location: Canada
Posts: 1,686
NM, I figured it out. thanks
tcblcommish is offline   Reply With Quote
Old 07-23-2006, 01:26 PM   #10 (permalink)
Minors (Triple A)
 
Layton is my Homeboy's Avatar
 
Join Date: Apr 2006
Location: London, On
Posts: 204
Great work! If you'd like, I can send you all of the faces I have once I'm done working on my tool. This is really excellent stuff!
__________________
"Man can now fly in the air like a bird, swim under the ocean like a fish, he can burrow into the ground like a mole. Now if only he could walk the earth like a man, this would be paradise."
-Tommy Douglas

www.DevinJohnston.ca
Layton is my Homeboy is offline   Reply With Quote
Old 07-25-2006, 01:51 AM   #11 (permalink)
Major Leagues
 
MidKnight's Avatar
 
Join Date: Nov 2003
Location: San Luis Obispo, CA
Posts: 340
Quote:
Originally Posted by Layton is my Homeboy
Great work! If you'd like, I can send you all of the faces I have once I'm done working on my tool. This is really excellent stuff!
Definitely! Thanks for the feedback, too. I'm anxiously awaiting your program; it looks like it'll be a helluva lot more impressive than my roundabout method. Almost makes me wish I stayed a CompSci major...almost.
MidKnight is offline   Reply With Quote
Old 07-29-2006, 07:01 PM   #12 (permalink)
Minors (Single A)
 
Rockpsl76's Avatar
 
Join Date: Oct 2003
Location: Mass
Posts: 58
Nice I made myself a home and away Indians uniform to put on all my players

Cool! I can tell what hand my players are now just by looking at their picture

BTW, for people who want a quick and easy way to figure out player numbers without getting into the database, go to the "data\saved_games\YOURLEAGUEHERE.lg\news\html\players" directory. Delete all the files, and then in game, look at the SION page for one of your players. A new ".html" page will appear in the directory with the players number in the name (player_1234.html)

Last edited by Rockpsl76 : 07-29-2006 at 08:09 PM.
Rockpsl76 is offline   Reply With Quote
Old 08-06-2006, 11:07 PM   #13 (permalink)
Hall Of Famer
 
Faroo6's Avatar
 
Join Date: Jan 2004
Location: The Real Northern California
Posts: 2,036
Quote:
Originally Posted by Rockpsl76
Nice I made myself a home and away Indians uniform to put on all my players

Cool! I can tell what hand my players are now just by looking at their picture

BTW, for people who want a quick and easy way to figure out player numbers without getting into the database, go to the "data\saved_games\YOURLEAGUEHERE.lg\news\html\players" directory. Delete all the files, and then in game, look at the SION page for one of your players. A new ".html" page will appear in the directory with the players number in the name (player_1234.html)
I'm guessing that everytime you look at someone it overwrites their ".html" page. If this is the case you don't need to delete all the files. Just sort by date modified and your player should be at the top.
__________________
Quote:
Originally Posted by Anyone broadcasting an A's game
The A's leave 2 men on and fail to score.
Faroo6 is offline   Reply With Quote
Old 08-11-2006, 02:28 PM   #14 (permalink)
Minors (Single A)
 
diamond2377's Avatar
 
Join Date: Jan 2006
Location: Hartford, CT.
Posts: 92
I would like to use this for OOTP6. So I will have to take the jpg's that are generated and use a batch conversion program to make them bmp's. OK, that's no problem. But how can I get the uniforms to match with each team. I may be missing the point to this utility, and maybe that can't happen.

What I'm thinking is that I can:
- use one grey colored uniform for everyone. It will look bland, but at least they will all have faces.
- Then, I will generate 1500 faces which will cover all major and minor league players in my league.
- Use the program I was talking about to convert the jpg's to bmp's
- Use the program to convert the "player-..." filename to p1 through p1500.
- Throw it in the photo folder under my league folder.
Then, Voila!

I just want some advice on if there is a better way to accomplish this. Remember, I am using OOTP6, and I have a 16 team fictional solo league.
diamond2377 is offline   Reply With Quote
Old 08-11-2006, 04:52 PM   #15 (permalink)
Minors (Single A)
 
diamond2377's Avatar
 
Join Date: Jan 2006
Location: Hartford, CT.
Posts: 92
Sweet baby Jesus... it worked.

I created a custom league with 8 teams, and there were pictures for every player. The only problem was they all had grey uniforms (not so bad). But also you had guys named Jose Valasquez who looked like they should be in an old karate movie (meaning that the ethnicity often did not match the face). But I am satisfied for now. I'm guessing Layton's utiliity takes this a step further.
diamond2377 is offline   Reply With Quote
Old 08-18-2006, 09:02 AM   #16 (permalink)
Hall Of Famer
 
silvam14's Avatar
 
Join Date: Apr 2004
Location: Medford, MA
Posts: 2,894
Great program! I created 10 uniforms that correspond to my league and it works great!
__________________
Check out my Fictional Uniform Project!
http://s76.photobucket.com/albums/j1...007%20Jerseys/

Also, Check out my collection of Circular OOTP logos (Kudos to cephasjames for his original logos)
http://s76.photobucket.com/albums/j10/silvam14/
silvam14 is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 09:00 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 Out of the Park Developments