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!
Department of Post-Mortem Communications
Original Poster
#1 Old 2nd Feb 2017 at 8:33 PM
Default Several CASP questions
Following an answer that I got in the Stupid Questions thread I learned that hair meshes for T-YA-A and Elder are essentially the same, meaning that I can get rid of the elder meshes by simply editing the CASP for the T-YA-A to include elder.
This question arose for me after I looked at a Store hair that I own that came as a single file but contained two separate CASP resources, one for tyaaf and one for ef, that showed up in CAS perfectly fine for all four ages.

The advantage of this approach of 2 CASP resources for me now is that this causes CAS to generate a separate thumbnail for elders with the "proper" elder hair colour and so I would like to do this for all my hairs, i.e. add an extra CASP for elders.

But I have a few questions about this:

(1) In the case of (converted to package) Store hairs it seems that it is just a question of exporting the CASP resource from the elder hair and import that into the TYAA file. At least it worked with the one test hair I just installed. The hair appeared in the usual colouring as thumbnail in TYAA and with the grey colour for elders as they were defined in the second CASP. Is this just a superficial success or is this really the solution?

(2) If I only have one file and no elder version where I can export the CASP, how would I proceed to add a second CASP for elders with S3PE?

(3) The cherry on top of the cake would then be if I knew how the game handles age-up. Base-game and EP hairs seem to always persist when a Sim ages from adult to elder, but as these hairs are also duplicates in the relevant FullBuild.package files there must be some setting that tells the game to switch from one hair to the other and to choose now the elder version of the previously used one. Does anyone know what part of the files determines this?
(Of course, this wouldn't be an issue if I simply edited the TYAA to include elders, too, but as I said I'd like to have the luxury of a separate elder thumbnail.)

Thanks in advance for any answer I get.
Advertisement
Virtual gardener
staff: administrator
#2 Old 3rd Feb 2017 at 10:16 PM
Quote:
(3) The cherry on top of the cake would then be if I knew how the game handles age-up. Base-game and EP hairs seem to always persist when a Sim ages from adult to elder, but as these hairs are also duplicates in the relevant FullBuild.package files there must be some setting that tells the game to switch from one hair to the other and to choose now the elder version of the previously used one. Does anyone know what part of the files determines this?
(Of course, this wouldn't be an issue if I simply edited the TYAA to include elders, too, but as I said I'd like to have the luxury of a separate elder thumbnail.)

Thanks in advance for any answer I get.


That's an easy one! The delta packs (the one with the folders, not the packages ), are basically 'default replacements'. With that, say a resource has been updated, it will need the same exact instance name and all to be replaced with EAs original file. Unlessss you mean like duplicated meshes in the fullbuild package and deltabuild packages (Because that's basically the same thing. Delta overrides fullbuild things).

The other 2 questions, I do need to find a package to get you a better answer on it though. ^-^ So I'll get back on them, unless someone else knows of course
Department of Post-Mortem Communications
Original Poster
#3 Old 3rd Feb 2017 at 10:35 PM
Hm, I'm not sure whether I understand so cannot even say whether we understand each other
What I mean is that every hair exists twice in the game, as a t-ya-a version and as an elder version. Now when an adult Sim ages up to elder they usually keep their hair style, i.e. they change from the adult version to the elder version of the same style even though they are separate objects. I guess something in the CASP resource tells the game that on age-up it should look for the elder equivalent and give it to that Sim.
But I am glad that you think this is the easiest part because for me it poses the biggest riddle.
Virtual gardener
staff: administrator
#4 Old 4th Feb 2017 at 1:02 PM Last edited by Greenplumbbob : 4th Feb 2017 at 1:05 PM. Reason: Typo! everyone's worst enemy
I think I got it. As I was looking for anything identical to any EF CASP file, I found out that EA might have done this with the 'SortPriority' which you can edit when you're editing the CASP (CASP> Grid)

As you can see, I just selected the AF low pigtails CASP:



It's 'SortPriority' is 1140,0000.

And here's the EF low pigtails's CASP:



Also the same sortpriority. Of course I made sure that this is with all EF and AF CASP.

But then! I found something more interesting... CasPart1Index and CasPart2Index...:
Every CasPart1Index has it's own Instance, group, etc.(Check the cool colors ):



Aaand here we'll be checking the AFlowpigtails CASP when still looking at EF's CASP's CasPart2index:



Sooo... You'll find a child's CASP when checking the AF's CasPart2index. So it's basically this linked loop! That's why when you download custom hair and it's cloned with like the pigtails hair and a sim will age, it will always have that same weird EA pudding hairstyle when aging up ^-^
So this means that CASParts are basically one happy families joined together in the CasPart2Index And that you can add your own as well.
Department of Post-Mortem Communications
Original Poster
#5 Old 4th Feb 2017 at 1:16 PM Last edited by Don Babilon : 4th Feb 2017 at 5:27 PM.
Ah, now that is interesting. So, when a male Sim ages up and receives the female pigtales, this is not necessarily a case of bad CC (or at least not in the sense we use that term) but a case of the game strictly following the directions given by CASPart2index.

That will make answering Help threads much easier and gives me now something to do while weeding out my duplicate hairstyles.

And it also means that when copying over CASP resources from EF into the TYAAF package it might be a good idea to ensure that both sortpriority and CASPart2index match for both resources.

Thanks very much for this.

Edit: Wait, no, correction. CASPart2index of the elder hair matches CASPart1index of the adult hair. Right? It's a cross-reference between 1 and 2.
Department of Post-Mortem Communications
Original Poster
#6 Old 4th Feb 2017 at 5:26 PM
Double post, I know, I know, but this is a new train of thought. I was just thinking about something else. Seeing that age-up rules are most probably handled by CASP alone, maybe there is also something in there that tells the game what hairstyle to use as a replacement when the one a Sim was wearing is not in the game anymore (uninstalled or otherwise removed)?
Virtual gardener
staff: administrator
#7 Old 4th Feb 2017 at 5:56 PM Last edited by Greenplumbbob : 4th Feb 2017 at 5:59 PM. Reason: Edit because of question ;)
That's a really great question though! But hmm...it might be like one of those CC replaces, like say your sim was wearing a CC top, and you deleted it from your mods folder, it will always have this white with blue top. Sooo maybe that's how the game generates it? But it might be a script thingy. I'm not really sure actually. >.<

Quote:
Edit: Wait, no, correction. CASPart2index of the elder hair matches CASPart1index of the adult hair. Right? It's a cross-reference between 1 and 2.


Yep that's totally right! :D
Department of Post-Mortem Communications
Original Poster
#8 Old 4th Feb 2017 at 7:57 PM Last edited by Don Babilon : 4th Feb 2017 at 9:20 PM.
Hm, I fear that this is going to a bit more complicated. I have in the meantime opened several hair package files and a lot of them show the CasPart1index as empty (0x00000000-0x00000000-0x0000000000000000). Shouldn't it show the values of Type-Group-Instance with the values that can be seen in the main window? In addition this seems to confuse S3PE because sometimes it opens CasPart1index in that little menu in Grid view then with the values of CasPart2index.

Besides how would I change the values anyway? I found now way to open CasPart2index for editing.Ok, skip that. I just noticed the little arrow at the left. Let's see where it takes me...

Update: So, it seems to have worked, I think:
(1) Importing the ef CASP resource into the tyaaf package causes the hair to show correctly in CAS with the correct thumbnail for the corresponding age. Win!
(2) Replacing CasPart2index of the ef CASP with the contents of CasPart1index of the tyaaf CASP lets the test Sim keep the hairstyle in all age stages from teen through to elder, both backwards and forwards (at least while aging up and down in CAS). Win!
The process is a bit tricky as I cannot simply choose the resource from the drop-down menu or edit the values manually. I have to copy the resource and add it as a new resource and then it becomes available in the drop-down. I just hope that this doesn't break anything, because, as usual, I have no idea at all what I am doing .

(3) The only thing that still bothers me a bit is these zero value CasPartindex resources in the original files. I mean, I know that consistency and consequential logic aren't exactly EA's middle names, but still. Do we know what the function of CasPartindex is exactly?
And does this resource appear in CTU anywhere, perhaps with a different name?
Virtual gardener
staff: administrator
#9 Old 4th Feb 2017 at 11:36 PM
Uuuuuuhm... That;'s a great question! Not gonna lie, I came across that one as well. Though, usually that would mean (I think) the bald hairstyle in-game. Because, of course, it has no mesh. Not sure which hairstyle you selected, or maybe it's something EA did on purpose? To like, make the game choose random hairstyles instead of specificly that one hairstyle when aging up/down?
Department of Post-Mortem Communications
Original Poster
#10 Old 5th Feb 2017 at 1:08 AM Last edited by Don Babilon : 5th Feb 2017 at 2:07 AM.
After having exported the CASPs from all of my elder female Store hairs (some 60) now, I'd say that at least half of them have empty CasPartindex resources, either one or both of them.
Of course without any means to look into proper .ebc files from the Launcher it is hard to say whether this might not actually be a consequence of having used s3rc on these files. Apart from your new discovery of the function of CasPart2index these index files do not seem to serve any known or at least obviously important function. They don't prevent the hairs from working in the game even if both resources have zero values.

ETA: Okay, I found this on the wiki:

Quote:
BYTE index // of 0x034AEECB - CAS Part Data (naked) reference
BYTE index // of 0x034AEECB - CAS Part Data (parent) reference
meaning CasPart2index is the "parent" which would explain that having the other CASP in there makes sure that on age up the same hair is used again, or rather what the choices are when a Sim ages up. (I was able to track the "genealogy" of the short afro hair for male children to several related styles for TYAA males, the short afro adult version and the short corn rows - they both have the cm short afro as "parent")
And if CasPart1index is for the naked state it might explain why some hairs simply refuse to stick to the nude state even though they are enabled for nude.
Ugh, now I have something else to test in addition, because I have several hairs that don't stick when a Sim becomes nude.

Edit2: Aha, another mystery solved. I think. One of the reasons why some Sims default to a different hairstyle when naked even though their hair was enabled for naked is that this is being overridden by whatever CasPart1index demands.
Virtual gardener
staff: administrator
#11 Old 5th Feb 2017 at 11:51 AM
This whole CASpartindex thingy is still a mystery to me, the fact that I found out about it surprises me. But Hmm... that would make sense, so I was sort of right about the 'no mesh' thingy. Anyway, I didn't know about the nude hair state. That one's very interesting to me. So that would mean that CASpart1index is basically controlling the nude clothing state, and probably like career clothing and skill outfits. Basically the ones you can't directly select without any mods when changing your sims clothing. Might be wrong about that one, but I do believe the nude thingy. At least it would make sense in a way.

Do keep me updated! It's really interesting to follow :D
Department of Post-Mortem Communications
Original Poster
#12 Old 5th Feb 2017 at 7:42 PM
Okay, here are my first additional findings on CasPart1index.

(I)
My first test hair was an elder female hair from the Store. The hair was special in that the CasPart1index had a specific entry that referenced an adult female hair and was by default only enabled for everyday, formal, sleepwear and career.

1st run: default package
The hair applied correctly to everyday, formal, sleepwear and career. For swim and athletic the game chose a random hair and a different random hair for naked. The result for outerwear was a bit inconsitent: dependent on what tab in CAS I had open before switching to outerwear the game chose that style.

2nd run: I changed CasPart1index to reference the CASP of an elder female base game hair
The test hair applied correctly to everyday, formal, sleepwear and career. For swim, athletic and naked the game now chose the hair referenced in CasPart1index.
Result: The game forces the naked outfit to use CasPart1index if it references an existing CASP that is in accordance with the AgeGender of the hair. In addition CasPart1index is also the default hair for any category for which the chosen hair is not enabled.

3rd run: I changed CasPart1index to be empty, enabled it for naked and disabled it for career
The test hair applied to everyday, formal and sleep. For swim, athletic and career it chose whatever style the test Sim had in CAS before I gave it the new hair.
For naked, on the other hand, it chose the new hairstyle.
Result: If CasPart1index is "empty" the hairstyle chosen for everyday will likely persist for naked, but will either randomise or choose the previously chosen hairstyle for all categories for which the new hair is not enabled.

Changing CasPart2index, btw, had no effect at all on any outfit choices.

Final Result:
If a hairstyle is supposed to persist through all outfit categories, including naked, then there are two choices:
(a) leave CasPart1index empty and make sure that the hair is enabled for all categories
(b) add the RK of your hair's CASP to CasPart1index inside that CASP to force the game to use your hair as the naked default and all other categories for which the hair is not enabled.

CasPart1index and CasPart2index do not reference meshes per se, only CASP resources. If CasPart1index references a CASP that does not comply with your age group the game will ignore it, even if the mesh is identical.

@Greenplumbbob The fact that you found the cross references in CasPart2index fo the elder hair is, I think, actually a lucky coincidence because EA made doubly sure that the pigtails are used for the naked state, too, and therefore "doubled" the CASP RK to become the reference in CasPart1index for the adult hair. They could as well have left that part empty and the result in game would have been the same, on the condition that the adult hair was enabled for all categories.
Instructor
#13 Old 5th Feb 2017 at 10:45 PM Last edited by Butterbot : 5th Feb 2017 at 10:48 PM. Reason: Typo
Quote: Originally posted by Don Babilon
(2) Replacing CasPart2index of the ef CASP with the contents of CasPart1index of the tyaaf CASP [...] The process is a bit tricky as I cannot simply choose the resource from the drop-down menu or edit the values manually. I have to copy the resource and add it as a new resource and then it becomes available in the drop-down.


Adding a new resource might not be necessary. The CasPart1index and CasPart2index rows contain a value on the right-hand side, something like "0x12" for example. This points to an index position in the TGIBlockList. If you expand the "TGIBlocks" entry at the bottom of Grid view, and look at the row ([12] for example) corresponding to the value contained in CasPart1/2index, you'll see that the resource key in that row corresponds to the resource key in CasPart1/2Index, because this TGIBlock is where that resource key comes from. If you change the resource key in the TGIBlock, commit the change, then return to Grid view, CasPart1/2index will show the change accordingly. I haven't tested this in-game, but it should work and would be less hassle/file bloat than adding a new resource.

Thanks for starting an interesting and informative thread.

Own Grandma's Canning Station? Check out the Canning Station Overhaul.
Like doing laundry? Check out the Infinite Laundry Buffs Fix.
Department of Post-Mortem Communications
Original Poster
#14 Old 6th Feb 2017 at 12:52 AM
Wow, now that sounds like the proper solution. I did have the nagging feeling that adding a resource was somehow something that only someone who doesn't really know what they are doing would do.
Good thing that I haven't begun to edit my hairs yet.
Department of Post-Mortem Communications
Original Poster
#15 Old 6th Feb 2017 at 5:10 PM Last edited by Don Babilon : 6th Feb 2017 at 5:37 PM.
@Butterbot @Greenplumbbob
Yes, it seems to have worked. The new test Sim with my test hair now properly changes into the Supernatural toad head when naked.

The procedure was the following.
- Copy the RK of the toad head (in this case I copied it from S3OC)
- Open the target hair file and select the Grid view of the CASP resource, CasPart1index was 0x10
- Go down to TGIBlocks, click the little (...) button to open ResourceKey List Editor, select the original CasPart1index entry, paste RK, Save
- Back in Grid view click Commit and then save the file.

Quick question: what does the Group entry mean or do? This test hair now has a different Group entry in CasPart1index entry from what it had before (was 0x00000000 is 0x70000000 now)

Edit: BTW, as a side effect I found out how to change the sound shoes make when a Sim is walking.
Instructor
#16 Old 6th Feb 2017 at 6:18 PM
Glad to hear it worked.

In the third step ("Go down to TGIBlocks..."), you can click the small triangle to the left of the TGIBlocks row. That will expand the entire block right in the Grid View--it's easy then to just scroll down to row [10] and paste the resource key directly into the right-hand side of the row, bypassing the ResourceKey List Editor altogether.

AFAIK, the group ID denotes which EP or stuff pack the CAS part comes from. If a CAS part bears a particular pack's group ID, but the pack is not installed, the part will not appear in CAS even if it's present in the Mods folder. This can be remedied by changing the group ID to 0, which is basegame.

Own Grandma's Canning Station? Check out the Canning Station Overhaul.
Like doing laundry? Check out the Infinite Laundry Buffs Fix.
Department of Post-Mortem Communications
Original Poster
#17 Old 11th Feb 2017 at 3:06 PM
Minor update:

(II) CasPart2index

So far, nothing that I have found suggests that CasPart2index serves for anything else but control of the age-up process, or rather the choice of hair after age-up. Whenever I found a hair with a valid entry for CasPart2index it invariably contained a reference to the CASP of a hair of the previous age state. I.e. elder hairs referenced t-ya-a hairs and t-ya-a hairs referenced child hairs.

But this made me think, couldn't CasPart1index and CasPart2index be used then to control the establishment of "creatures" or new life states with non-standard body and hair models? I think I will have to look into the CASPs of clothing now
Back to top