Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Lab Assistant
Original Poster
#1 Old 20th Oct 2014 at 5:04 AM
Altering Instance IDs for CASP files
From help I have been given here, I have found out that it is the CASP file instance value that determines the swatch order in CAS. However, I am hesitant in sharing my findings right now since I am unsure if altering the instance value will cause conflicts with other content. If changes are made within the package file to these values, do they only affect the package file being altered? or can the changes cause issues outside of the modified package file? I ask this because I generally don't mess with the values within a package and I want to be sure that if I write up a tutorial that it wont bork any content due to conflicts. I have not experienced any issue with altering the instances myself (as long as it is done right) but I can only test so much. I am afraid that issues may arise that are not evident in my game from this, and I want to be sure that is not a possible outcome.

Call it paranoia, but I rather be sure that there wont be any issues arising from changing CASP instance values. Plus, I will hopefully learn something new
Advertisement
Pettifogging Legalist!
retired moderator
#2 Old 20th Oct 2014 at 5:34 AM
Do you know the Best Practice for naming as outlined in the Maxis CC guide? If not, you should read that (short description is on page 3/4 I think, more detail later on in the document). Link see the sticky in Modding Discussion.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Lab Assistant
Original Poster
#3 Old 20th Oct 2014 at 6:37 AM
Yes, I just refreshed my memory and re-read the copy I have. TBH, it's vague about what you should and should not do (no surprise there) but does state that instances generated can conflict, whether randomly generated or not, with resources outside of the package or with EA content if it is incremented values like Maxis content. So editing the instance can lead to conflicts, although given its a 64bit resource key, it should reduce the chances. It is a shame that CASP instances determine the order of swatches. If you actually want swatches in a specific order, there is no other option to order them, at least none that I have found (including the tutorial by simplymorgan regarding thumbnail ordering for eyes)
Sir Not Appearing In This Film
#4 Old 20th Oct 2014 at 8:13 AM Last edited by Snaitf : 20th Oct 2014 at 8:25 AM.
The CASP swatch order is determined by the SecondarySortIndex (low to high), not the instance.

Only when two or more swatches under the same thumbnail have the same SecondarySortIndex will they be sorted by their instance.

So, to arrange your swatches the way you want, open your package in s4pe, click on your CASP files, click the Grid button (at the bottom) and either increase or decrease the SecondarySortIndex.

Remember, this is a hex value, so each digit not only goes 0-9, but also A-F. So 0x0000000A is one higher than 0x00000009, and 0x00000010 is one higher than 0x0000000F.
Pettifogging Legalist!
retired moderator
#5 Old 20th Oct 2014 at 10:39 AM Last edited by plasticbox : 20th Oct 2014 at 2:05 PM.
Quote: Originally posted by peacemaker IC
does state that instances generated can conflict, whether randomly generated or not, with resources outside of the package or with EA content if it is incremented values like Maxis content.


Well, “incremented” in that context means that you cannot just give your content IDs like 01, 02, 03 .. but if you do the hash thing and *that* happens to be incremental (I believe that can happen when you hash stuff like pbox_thing01, pbox_thing02 etc) there is no problem with that. Also, since we are supposed to set the high bit and Maxis will never do that, anything with a properly generated instance cannot conflict with their stuff. (“Setting the high bit” means, if there were 100 available numbers 00-99 (decimal), that CC creators must use 5 or higher for the first digit – i.e. we use ID# 50 and up, EAxis use 00–49.)

Other than that, I wouldn't worry about conflicts, really .. there are 18446744073709551616 possible IDs if I counted my F’s correctly .. I wonder how long it would take the entire world population to produce that much CC? =P

(But regarding sorting and thumbnails and stuff, Snaitf is surely correct -- I'm only talking about the actual instances here)


Edit to answer my own question: There are 1.273.280.910 instances available per human currently living on Earth (there’s currently 7,243,784,121 of us give or take a few), so if everyone would work really hard and produce 10 mods a day that use 10 instances each, 12732809 days until we’ve used them all. With 250 workdays per year, this would take 50931 years. With a shelf life of four years per Sims game, and for sake of simplicity a stable (not shrinking or growing) population on Earth, we’d be done with TS4 just in time before TS12732 hits the shelves!

Edit to wow, fascinating o.O: 18446744073709551616 is in other words 18 quintillion *or* 18 trillion depending on where you live (i.e. the billion/milliard confusion on a larger scale). And it is also the number of rice grains in the famous wheat and chessboard problem (Rice! It was rice! Not wheat!), plus one since we don’t have a zeroth rice grain. And it’s in the same range as total number of insects living on earth and total number of transistors produced in one year. One year! More facts about hyperinflation in Zimbabwe, combinations of the Rubik cube and other mindboggling things with very many digits can be found here.

All of which is totally on-topic BTW because I was just trying to find a way of saying “18446744073709551616” without having to remember that number.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Lab Assistant
Original Poster
#6 Old 21st Oct 2014 at 3:30 AM
thank you both for the help. Sometimes it becomes obvious why it takes so long to learn to create cc. There is always something new to learn too, especially with such a new game
Back to top