PDA

View Full Version : Sort CC swatches how-to


Helianthea
1st Oct 2014, 12:15 PM
Hi everyone,

this thread aims to describe and document all possible changes you can apply in s4pe to sort your CC, thus having your swatches appear in an order of your liking.
I am using eyecolors as my prime example because these are what I've worked with the most and thus feel most comfortable with, but I don't see why the methods I am about to illustrate shouldn't work for any other CC (in fact, I can confirm they work for facepaint, too ;))
These methods are used in ADDITION to creating CC. Nothing here will explain how to retexture something, or create a non-default / default replacement item. There's tons of tutorials for this already, you can find them in the list of tutorials thread in this forum ;)

before I continue: SimplyMorgan already has a tutorial on how to sort CC by changing the SecondarySortIndex value (in her tutorial this value is called „ColorCode“ because that was its name prior to s4pe v0.2a). You can find the tutorial on her tumblr (http://simplymorgan77.tumblr.com/post/98073121136/tutorial-how-to-change-swatch-display-order).

Enough blabbering, let's get started!

There are, from what I've gathered up to this point, two possibilities, or rather two values one can change for sorting purposes
the SecondarySortIndex value (found in the datagrid of the CASP-file)
the CASP-files Instance Number

Before we go in-depth on this, let's look at some numbers, shall we?
These are, in alphabetical order, the SecondarySortIndex values of the 18 Eyecolors currently in the game:
Eye Color Name || SecondarySortIndex value || Eye Color Name (2) || SecondarySortIndex value (2)
Amber || 0x0050 || HazelBlue || 0x002D
Aqua || 0x0032|| HazelBlueDark || 0x0028
Black || 0x0000|| HazelGrayBrown || 0x004B
Blue || 0x003C || HazelGreen || 0x0014
Brown || 0x000A || HazelOliveGreen || 0x0019
DarkBlue || 0x0041 || LightBlue || 0x0037
DarkBrown || 0x0005 || LightBrown || 0x000F
Gray || 0x0046 || LightGreen || 0x001E
Green || 0x0023 || Purple || 0x0055
Looking at these values, we can clearly see that it's the SecondarySortIndex values that dictate the order in which the swatches appear: First is Black with a value of 0x0000, followed by DarkBrown (0x0005), Brown (0x000A), LightBrown (0x000F) and so on and so forth.

Method 1 - The SecondarySortIndex value
We can use this to our advantage, of course :). Say, for instance, I want to create a non-default eyecolor whose swatch I want to appear immediately after HazelGreen.
HazelGreens value is 0x0014 as we can see from consulting the above table. The next higher value used by the game is 0x0019 (HazelOliveGreen). That means I am free to use 0x0015, 0x0016, 0x0017 and 0x0018 if I want my swatch to appear between these two.

The exact method by which to achieve this is as follows:
Open your non-default package in s4pe (provided of course it has already been created ;))
Select the CASP-file
Open the datagrid by clicking the „Grid“ button at the bottom of s4pe
Seek out the „SecondarySortIndex“ field. (This will be filled, by default, with the value of the swatch you cloned your non-default from.)
Change the value to something of your liking
Save and done!
http://thumbs2.modthesims2.com/img/9/0/0/8/7/3/9/MTS_Helianthea-1469228-method1_ssi-value_screen1.jpg
http://thumbs2.modthesims2.com/img/9/0/0/8/7/3/9/MTS_Helianthea-1469231-method1_ssi-value_screen2.jpg

But what if, for instance, I want to have more than 4 non-defaults to appear between HazelGreen and HazelOliveGreen? After all, there's only 4 SecondarySortIndex values that I can freely use as we've seen. Surely, there must be a way to add more than four swatches, no?
Of course there is.

Method 2 - The Instance number
This brings us to the Instance Number of the CASP-file :)
Upon creating non-default CC in ColorMagic (and other programs probably too, but I've used ColorMagic exclusively so far), the program will assign an instance number of its liking to the newly created package. The number is pretty random, although I've also seen it making consecutive instance numbers.
The instance number, too, regulates sort priority. It can also manually be changed.
Let's say, for instance, that my first non default eye color has an instance number of 0xFA718F44B00B7AC8.
The next non default I create I want to appear right after it – thus, its instance number will have to be of a higher value. 0xFA718F44B00B7AC9, for example.

The exact method by which to achieve this is as follows:
Open your first non-default package in s4pe
Doubleclick the CASP-file. A fancy window with data will open
Copy the number listed in „instance“. You may close this package now if you wish, you will not have to apply any further changes to it.
Open your second non-default package in s4pe. (i.e. the one you want to appear AFTER the first)
Doubleclick the CASP-file
Paste the instance number and then change the pasted value to something higher (this is crucial! They shouldn't be the same! I don't know what exactly will happen if they are, but my gut tells me that will make the game crash)
This is not plainly laid out in the picture below, but you're of course pasting the copied instance in the resource details of the second non default package!
save and done!
http://thumbs2.modthesims2.com/img/9/0/0/8/7/3/9/MTS_Helianthea-1469232-method2_instance-number_screen1.jpg
http://thumbs2.modthesims2.com/img/9/0/0/8/7/3/9/MTS_Helianthea-1469247-method2_instance-number_screen2.jpg

You are free to use both methods at the same time. Be aware though that the SecondarySortIndex value has PRIORITY over the instance number. This means that no matter what the instance numbers are, content with a SecondarySortIndex value of 0x0001 will ALWAYS appear before content with a SecondarySortIndex value of 0x0002. The instance number is only consulted for sorting orders if the SecondarySortIndex values are identical.

Both methods can be used for standalone content (i.e. stuff that has its own thumbnail) too. Note that for standalone content, you will not have to hunt down any already existing SecondarySortIndex values prior, you're free to assign them to your own liking.

N.B.: there's also a field called "SortPriority", but changing it hasn't changed anything as far as order of appearance is concerned. I don't know exactly what it does. For that reason, I leave it alone and make no changes.

Menaceman44
18th Oct 2014, 10:31 PM
Thank you SO much for explaining this! I knew it was possible but not how to do it, so this was a great help. :) Thanks again.

SleepyTabby
26th Oct 2014, 3:06 AM
This makes creating so much more enjoyable; it's far more rewarding to see my content in nice, tidy order. Thank you for this awesome tutorial!

The only issue I ran into was purely on my end. I hadn't realized the ghost patch had changed the sequence eyes appeared in, so my old defaults were messing up my attempts to organize my non-defaults. Then it dawned on me that I simply needed to update the defaults and voila! everything was beautifully organized.

Yes, I am a fanatic. :)

SimsForever15
2nd Nov 2014, 4:33 AM
Thank you SO much for this easy tutorial! I can finally keep my OCD at rest, knowing that I can finally sort everything.