More Awesome Than You!
Welcome, Guest. Please login or register.
2024 May 13, 22:11:02

Login with username, password and session length
Search:     Advanced search
540274 Posts in 18066 Topics by 6514 Members
Latest Member: Llama
* Home Help Search Login Register
+  More Awesome Than You!
|-+  TS2: Burnination
| |-+  Peasantry
| | |-+  Tutorial: Changing hairstyle with outfits
0 Members and 1 Chinese Bot are viewing this topic. « previous next »
Pages: [1] THANKS THIS IS GREAT Print
Author Topic: Tutorial: Changing hairstyle with outfits  (Read 5949 times)
Theo
Lipless Loser
***
Posts: 602



View Profile
Tutorial: Changing hairstyle with outfits
« on: 2006 December 13, 03:08:38 »
THANKS THIS IS GREAT

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 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:


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)
gender = 0x00000002 (male)



Once you find it, open the resource tab below, and take note of its TGI numbers:
Code:
Type = 0xEBCF3E27 (GZPS)
SubType = 0x00000000
Group = 0x5F04E844
Instance = 0x00000004



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, 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 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:


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 properties
Here is a cheat-sheet if you want to change the hairstyle for other categories:
Code:
Category 	lk value
Everyday 65537
Swimwear 524289
PJ 1048577
Formal 2097153
Undies 4194305
Maternity 16777217
Sportswear 33554433
« Last Edit: 2006 December 13, 16:46:57 by Theo » Logged
miros
Retarded Reprobate
****
Posts: 1280


View Profile
Re: Tutorial: Changing hairstyle with outfits
« Reply #1 on: 2007 January 26, 07:47:28 »
THANKS THIS IS GREAT

Well, that's still Lies and Propaganda, but I hope it's true!
Logged
Orikes
Knuckleheaded Knob
**
Posts: 518


Spifftastically Fantabulous!


View Profile
Re: Tutorial: Changing hairstyle with outfits
« Reply #2 on: 2007 January 26, 12:07:42 »
THANKS THIS IS GREAT

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).
Logged

Theo
Lipless Loser
***
Posts: 602



View Profile
Re: Tutorial: Changing hairstyle with outfits
« Reply #3 on: 2007 February 01, 05:31:55 »
THANKS THIS IS GREAT

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...   Roll Eyes
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.084 seconds with 19 queries.