Replies: 3 (Who?), Viewed: 6676 times.
Lab Assistant
Original Poster
#1 Old 1st Oct 2014 at 11:15 AM Last edited by plasticbox : 21st Oct 2014 at 1:16 AM. Reason: We have categories now!
Default Sort CC swatches how-to
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.

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 NameSecondarySortIndex valueEye Color Name (2)SecondarySortIndex value (2)

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:
  1. Open your non-default package in s4pe (provided of course it has already been created )
  2. Select the CASP-file
  3. Open the datagrid by clicking the „Grid“ button at the bottom of s4pe
  4. Seek out the „SecondarySortIndex“ field. (This will be filled, by default, with the value of the swatch you cloned your non-default from.)
  5. Change the value to something of your liking
  6. Save and done!

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:
  1. Open your first non-default package in s4pe
  2. Doubleclick the CASP-file. A fancy window with data will open
  3. 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.
  4. Open your second non-default package in s4pe. (i.e. the one you want to appear AFTER the first)
  5. Doubleclick the CASP-file
  6. 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!
  7. save and done!

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.
4 users say thanks for this. (Who?)
Mad Poster
#2 Old 18th Oct 2014 at 9: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.

My deviantART, MTS Yearbook Origin ID = Alistu
#3 Old 26th Oct 2014 at 2: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.
Lab Assistant
#4 Old 2nd Nov 2014 at 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.

The Sims Forever
Back to top