Title: Tutorial: Changing hairstyle with outfits Post by: Theo on 2006 December 13, 03:08:38 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 (http://www.modthesims2.com/showthread.php?t=197098), 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 style In 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: (http://theos.chewbakkas.net/tutorials/res/reslist_hair_gzps.png) 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: Code: age = 0x00000008 (adult) (http://theos.chewbakkas.net/tutorials/res/simpe_amhairpgskater_brown.png) Once you find it, open the resource tab below, and take note of its TGI numbers: Code: Type = 0xEBCF3E27 (GZPS) 2. Fiddling with the character's package Now 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 theory The 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 (http://theos.chewbakkas.net/doc/aged_resource.html), 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. (http://theos.chewbakkas.net/tutorials/res/aged_list_before.png) 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 resources The 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: (http://theos.chewbakkas.net/tutorials/res/3idr_add_pset.png) 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: (http://theos.chewbakkas.net/tutorials/res/3idr_reslist.png) 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) (http://theos.chewbakkas.net/tutorials/res/aged_list_after.png) 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 properties Here is a cheat-sheet if you want to change the hairstyle for other categories: Code: Category lk value Title: Re: Tutorial: Changing hairstyle with outfits Post by: miros on 2007 January 26, 07:47:28 Well, that's still Lies and Propaganda, but I hope it's true!
Title: Re: Tutorial: Changing hairstyle with outfits Post by: Orikes on 2007 January 26, 12:07:42 The Chief Agent of Propaganda and Lies recently did a 'Producers Letter' on the lies and propaganda and they stated that you'll be able to set hairstyle with outfit.
I hate to say it, but I'm really excited about this upcoming lies and propaganda. If it lives up to expectations, it may jump ahead of Nightlife in my ranking system (Nightlife, University, Pets, OFB). Title: Re: Tutorial: Changing hairstyle with outfits Post by: Theo on 2007 February 01, 05:31:55 This 'trick' is already supported by the game's infrastructure, so it's only a matter of adding a graphical interface where you can set it easily.
Is it true that the new pack (Seasons), when it comes out, will give this ability. I think you will be able to automatically change hairstyles and makeup when changing outfits. Note this only concerns hair, and not makeup or facial hair, which are set in a different type of resources. I wonder how many things they're going to change in Seasons for that purpose... ::) |