Suppose that your sim normally has a messy hair, but you wish it could have a decent haircut for formal situations.
Using
Gwill's tutorial, you can easily accomplish this, but of course you'd need to create a new hair package for that purpose.
Yet, there is a way to make a character use existing and unrelated hairstyles, each one chosen for different outfits (or categories, as henceforth they shall be named).
You should be aware that due to limitations of the game itself, these changes will be lost if the sim changes appearance in a mirror, so if you wish a more permanent solution, you may have to follow Gwill's tutorial that applies the category selection on the hair package.
1. Choosing the hair styleIn this example, we will pick a custom hairstyle, because it's easier to open the package and find the required resources.
You can also use any base hairstyle, if you know how to locate the
Skins.package file and find the correct PropertySet.
So we have a sim that is using a determined hair at all times, but we want it to use a different hair when changing to formal clothes.
We shall begin by opening the chosen hair's package in SimPe, and view the list of PropertySets:
Now we must find the PropertySet that applies to our sim's age and gender (for instance, Adult Male). Inspect the PropertySets, until you find one with the properties:
age = 0x00000008 (adult)
gender = 0x00000002 (male)
Once you find it, open the resource tab below, and take note of its TGI numbers:
Type = 0xEBCF3E27 (GZPS)
SubType = 0x00000000
Group = 0x5F04E844
Instance = 0x00000004
2. Fiddling with the character's packageNow that we have identified the correct hair PropertySet, it's time to open the target sim's character package, and begin the operation itself...
2.1 - The theoryThe only resources you have to change are the AgeData (AGED) and the 3D ID Reference File (3IDR) resources, but first we need to know which properties can be changed safely.
Recalling the
notes on the AgeData resource, we see that it defines a table containing the pointers to the PropertySets.
What we are going to do is change the pointer to the Formal/Hair selection, but when we open the AgeData resource, we only see an immense list of properties, so I will save you the trouble of actually reading those notes, and tell you what properties must be changed.
First, find an
lkn property that has the value "2097153".
The 2097153 number in hexadecimal is 0x00200001. The first half (0020) tells us the it's the "Formal" clothing category, while the second half (0001) determines the "Hair" outfit type.
After that value is found, remember (or write down) the
n number, in this case
10.
Now we should change the value of the
le10_0 property, and assign the new index number to it.
2.2 - Editing the resourcesThe new index number must be a valid index of the 3IDR resource list, so we will open the 3IDR that has the same instance number as the AGED, and add the selected hairstyle resource (identified by the TGI numbers we took note earlier) to the resource list:
After you click the "add" link button, the resource pointer is added to the bottom of the list, making its zero-based index easy to determine (the number of resources in the list minus one).
In this case, the index is
22:
Don't forget to commit the changes to the 3IDR resource.After that, open the AgeData resource once more, locate the
le10_0 property, and change its value to the new index number, without forgetting the conversion to hexadecimal (0x000000016)
Commit the changes to the AgeData, and save the package.
You can now start the game, and see the effect when you instruct your sim to change outfit in a wardrobe.
Remember that this editing will vanish if you change the sim's appearance in a mirror.
3. Commonly used codes for the lkn propertiesHere is a cheat-sheet if you want to change the hairstyle for other categories:
Category lk value
Everyday 65537
Swimwear 524289
PJ 1048577
Formal 2097153
Undies 4194305
Maternity 16777217
Sportswear 33554433