Black School Uniform Notes
If you just want the completed mod-mod,
these are the required full body clothes and meshes and the finished package file.
My notes on converting my Public School Uniforms mod to use alternative black uniforms.
UPDATE: You can avoid the spreadsheet and all the copy/paste in SimPe by using SceneGraph Plus.
Analysis
Firstly we need the full body clothes to use as uniforms for TM, CM, TF and CF
Download, un-rar and add to Downloads folder
Start Bodyshop and see what we've got
Child Male (CM)
- Shirt, untucked, sleeves rolled up, open collar; Tie; Jumper, sleeveless; Trousers, gray; Shoes, smart black
Child Female (CF)
- Shirt, untucked, sleeves rolled up, open collar; Tie; Jumper, sleeveless; Skirt, above knee; Socks, long, dark gray; Shoes, smart black
Teen Male (TM)
- Shirt, untucked, sleeves rolled up, closed collar; Tie; Jumper, sleeveless; Trousers, gray; Shoes, smart black
- Shirt, untucked, closed collar; Tie; Blazer; Trousers, gray; Shoes, smart black
- Shirt, untucked, closed collar; Tie; Blazer; Trousers, gray; Shoes, casual brown
Teen female (TF)
- Shirt, untucked, sleeves rolled up, open collar; Tie; Jumper, sleeveless; Skirt, short; Socks, long, dark gray, Shoes, smart black
- Shirt, untucked, sleeves rolled up, open collar; Tie; Jumper, sleeveless; Skirt, short; Socks, long, medium gray, Shoes, trainers
- Shirt, untucked, sleeves rolled up, open collar; Tie; Jumper, sleeveless; Skirt, short; Socks, long, medium gray, Shoes, smart brown
- Shirt, tucked, closed collar; Tie; Blazer; Skirt, short; Socks, long, dark gray, Shoes, smart black#
Not really a summer/winter mix, not really a conforming/non-conforming mix, just variations on a theme
There are four clothing templates in my public school uniforms mod (one is unused) so we'll make four sets of uniforms and just pick one at random
Recording Clothing TGI Values
Looking at the config notes we need the resource node (CRES) and property set (GZPS) details for each outfit
I feel a spreadsheet coming on! - See PublicUniform_Black_Step0.xlsx
Time to start SimPE and find those numbers
Open "SkeletonTea-PrivateSchoolND-CM.package"
In the top left Resource Tree, click on 3D ID Referencing File (3IDR). If you don't have a 3IDR entry, don't panic as you've probably opened the mesh package and not the recolour!
In the top right Resource List, click on the (only) 3IDR resource
In the bottom area, make sure the Plugin View tab is active
Click on the Resource Node line
Copy the Subtype, Group and Instance numbers to the spreadsheet (across all four sets)
Click on the Category line
Copy the Subtype, Group and Instance numbers to the spreadsheet (across all four sets)
Repeat the last 8 steps above for "SkeletonTea-PrivateSchoolND-CF.package"
As there are two TM uniforms with blazers, we'll double up the non-blazer one
Open "keoni-SpringBreakTMuniformSpencer.package"
Copy the CRES and GZPS details into both sets 1 and 2 for TM
Open each of the other two TM blazer outfits and add their details to the spreadsheet
Repeat for all four of the TF outfits. As we will be selecting a random outfit, the order doesn't matter, although you may want to associated the two more formal uniforms with the TM blazer ones
With the spreadsheet complete, pat yourself on the back and take a break
PublicUniform_Black_Step1.xlsx
Recording 3IDR Values
Download the WH_PublicSchoolUniform.package file and rename it as "Xyz_PublicSchoolUniform_Black.package" where Xyz is something to identify you (I use my initials WH)
Open "Xyz_PublicSchoolUniform_Black.package" in SimPE
If you are ONLY going to use this package in your own game, you can skip the next bit
IMPORTANT, if you intend to upload/send this mod-mod anywhere you MUST change the GUIDs associated with the FOUR objects "Outfit - Public School Summer - Template", "Outfit - Public School Summer Alt - Template", "Outfit - Public School Winter - Template", "Outfit - Public School Winter Alt - Template"
If you don't know how to get and change GUIDs there are various tutorials/threads at MTS on how to do this
Click on the 3IDR entry in the left hand Resource Tree
There are SIXTEEN entries in the resource list and we have to get the correct values into all of them!
This is the part that most often goes wrong, so we'll add the 3IDR Group and Instance numbers we need to the spread sheet to help us
If you look at the numbers in the spreadsheet, you should see that the GZPS SubType is always 0x00000000 and the GZPS Instance is always 0x00000001, these are standard values and means we only have to copy two-thirds of the numbers, so I've greyed them out in the spreadsheet
PublicUniform_Black_Step2.xlsx
Updating TGI Values
We will enter the uniform details by age and sex, so in the right hand Resource List view, click on the Instance column heading to sort the entries by instance number (ie age and sex)
Click on the first one
In the Group column, match the number with the TM (Instance 1) entry in the spreadsheet and copy the Resource Node (CRES) and Property Set (GZPS) details from the spreadsheet into SimPE
IMPORTANT: Click the "Commit" button, the values will be updated and the line under Resource List goes italic
I like to highlight the values I just copied in the spreadsheet to show that they've been done
Click on the next line in the Resource List
Using the Instance and Group numbers, locate the required values in the spreadsheet
Copy the values across and Commit
Repeat for the other 14 entries, do not assume that just because the TM values entered in the order set 4, set 2, set 3, set 1 (or whatever it was) that any of the other CM, TF or CF entries will be in the same order!
You should end up with 16 italic lines and all entries in the spreadsheet highlighted
From the SimPE File menu, select Save.
Exit SimPE
Give yourself another pat on the back.
PublicUniform_Black_Step3.xlsx
Initial Testing
We're now going to test what we've got so far, so start The Sims 2 and while it loads take another break from the keyboard.
Open your test hood and either find a family with TM, TF, CM and CF children who go to public school, or make a new family.
Pause the game, and using your favourite time/day setter, change the day to Monday and the time to 7:55am
You're going to be back here a lot, so save the family.
Run the game and wait for the kids to go to school - if they're not in the correct uniforms you'll need to double check your copy/paste work earlier
Exit the game
Coding For Randomness
Now for some code (I'll try to keep it simple)
Open "Xyz_PublicSchoolUniform_Black.package" in SimPE
In the left hand Resource Tree, click on Behaviour Function (BHAV)
In the right hand Resource List, click on "CT - Dress for School"
Scary code should appear in the bottom half of the screen, if not click on the Plugin View tab
The first part of the code deals with "dress down days", if you don't want these there is no need to remove the code, just disable them by setting entry 0x00 (Dress Down Day) to -1 in BCON 0x1030 (Tuning - Dress For School)
The second part of the code (from line 0x14 (20)) onwards deals with picking a uniform based on season and personality.
We don't want the decision making part as is, we need to replace it, but we do need to keep the last four "Clothes - Change Outfit - External Guid" lines
We want to pick one of the four uniform variants at random. We could generate a random number between 0 and 3 inclusive and then test what value we have, but we could also flip a coin (50/50 chance) twice. As there is a simple way to do the latter, we'll use that
Click to highlight line 0x14(20): [global 0x05B8] Season ...
On the right hand side, where OpCode: shows 0x05B8 change that to 0x01D2
The line should change to read 0x14 (20): [global 0x01D2] Coin Flip()
At the bottom right, click on the "Ins/false" button, you'll get a new line 0x15 (21): [global 0x01D2] Coin Flip() added and highlighted
Click back on line 0x14 (20) to highlight it and click the "Ins/true", you'll get another new line 0x15 (21): [global 0x01D2] Coin Flip() added and highlighted
You should now have THREE Coin Flip lines
Look at the right hand end of the 0x14 (20) line it should end "true: 15 false: 16"
Click to highlight the 0x15 line
On the right hand side, change "True Target:" to "0x001D" and "False Target:" to "0x001E"
Click to highlight the 0x16 line
On the right hand side, change "True Target:" to "0x001F" and "False Target:" to "0x0020"
Click to highlight the 0x17 line, note the black incoming arrow, this means that the line is unreachable, we meant to do this.
Click the "Delete" button (it's below the "Add" button, IGNORE the "Pescado's Delete" and the "Delete to end" buttons!)
The line is deleted and the new line 0x17 is also unreachable, click the "Delete" button again
Repeat four more times, if all went well there should be three "Coin Flip" lines and four "Clothes - Change Outfit" lines at the end of the BHAV and the last line should be 0x1A (26)
Click the "Commit File" button
From the "File" menu, select "Save"
Exit SimPE
If everything went well, you should now have a working WH_PublicSchoolUniform_Black.package file
Full Testing
We now need to test four uniform variants that are chosen at random, this could take some time ...
We're going to do it by reloading the test family many times, personally I'd do it by temporarily removing the random element and test the uniform sets, then reinstate the random element to test the random selection a couple of times - either way will probably take the same amount of time depending on how fast your game loads
Start The Sims 2, open your test hood and load the family you saved at 7:55am earlier
Let the kids change for school, check that CM and CF are in uniform and note the TF/TM combination
Exit to hood WITHOUT SAVING and repeat until you've seen all four TF uniforms and all three TM uniforms (or you get bored and think there's an error!)
These are my results (** indicates first sighting of that uniform)
- **TF Blazer**, **TM Black shoes**
- **TF Brown shoes**, **TM Blazer loafers**
- TF Blazer, TM Black shoes
- TF Brown shoes, **TM Blazer black shoes**
- TF Blazer, TM Blazer loafers
- TF Brown shoes, TM Blazer loafers
- **TF Black shoes**, TM Blazer loafers
- TF Brown shoes, TM Blazer loafers
- TF Blazer, TM Blazer loafers
- TF Black shoes, TM Blazer loafers
- **TF Trainers**, TM Blazer black shoes
All appears to be working
But I want private school uniforms!
Rename (or copy) "Xyz_PublicSchoolUniform_Black.package" to "Xyz_PrivateSchoolUniform_Black.package"
Open "Xyz_PrivateSchoolUniform_Black.package" in SimPE
If you want BOTH public and private school uniforms you MUST change the GUIDs now
Select the "CT - Dress for School" BHAV
Click on the "Resource" tab
Change Group: from 0x7F647BAD to 0x7F2DCBC6
Change Instance: from 0x00001004 to 0x00001002
Click "commit" of "force commit"
From the "File" menu, select "Save"
Exit SimPE
Hope these notes are of use to someone. Enjoy!