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!
Lab Assistant
Original Poster
#1 Old 28th Sep 2014 at 4:38 PM Last edited by plasticbox : 21st Oct 2014 at 1:24 AM. Reason: We have categories now!
Default Adding new GEOMs to a CAS part with s4pe & S4CASTools


That CAS part was made by adding a shorts mesh and a tank top mesh to the same package and fixing the data so that they could be displayed as one part under the full body category. This is how:
  1. First extract your separate CAS part packages with S4CASTools and save them.
  2. Open up one of the packages in s4pe and delete the CASP, most of the texture resources and RegionMap file (you may want to save the textures as dds first). Basically you want to be left with the GEOM files and a normal map if you have one. Save the newly slimmed down package.
  3. Open up the other package and import the package you just slimmed down so you now have two sets of GEOMs.
  4. It's a good idea at this point to copy the resource keys of the new GEOMs into a text file and sort them by LOD.
  5. To make the CAS part pick up the new meshes we need to edit the CASP file. First up the TGIList, open the CASP file with the Grid editor, scroll down to the TGIList and open it up with the [...] button.
  6. Add the ResourceKeys of the imported GEOMs to the TGIList as new entries.
  7. Next open up the 'LodBlockList' there should be 4 entries. If you open one up - 'Level' indicates the LOD and the 'LODKeyList' should have an entry pointing to the index of each Geom in the TGIList. So go ahead and add new entries to each LOD with the indexes of your new GEOMs making sure the LODs of the Geoms match up to the 'Level' of the LodBlockList.
  8. Next you probably want to switch how the part is displayed in the Create a Sim. In our case we will move the part to the body category. Find the 'BodyType' line and set it to 0x00000005. I also set the following 'CASPartFlags' - 0x0046 (OutfitCategory) to 0x0107 (Jump suits) and 0x0053 (Body) to 0x0176.
  9. Once you've finished all that commit the edits in the grid editor and this is a good time to save the package.
  10. Next we need to fix the RegionMap resource (the resource with type 0xAC16FBEC). These seem to control the order in which the GEOMs are rendered. I'm not sure exactly how that is controlled but it has it's own GEOMReferenceBlockList with one entry for each LOD set of GEOMs. Unfortunately we can't just add a new GEOMReferenceBlockList and add the ResourceKeys of your new GEOMs to the tgiList because s4pe can't manage that properly. Luckily we can delete and edit entries so we just need to find a RegionMap resource with more GEOMReferenceBlockList entries than we have GEOM LOD sets (if that makes sense). I found one by using S4CASTools and extracting an existing fullbody part with lots of LOD parts listed. So go ahead and do that, and follow the same process we used for adding the GEOMs to get the new RegionMap into our package including adding it to the TGIList.
  11. Once we have a RegionMap with sufficient GEOMReferenceBlockList entries, first delete the old RegionMap from the package, then delete the GEOMReferenceBlockList entries from our imported RegionMap until there is exactly the right number and edit each GEOMReferenceBlockList -> tgiList to point to our package's GEOMs. One LOD set per entry.
  12. Make sure that the 'RegionMapKey' entry in the CASP resource is pointing to our new RegionMap in the TGIList.
  13. Save everything and done! Test it out in Create-a-sim and see if it worked.

Let me know if this helps you out/doesn't work/any problems. It's possible I missed something out as I've been fiddling with this stuff for a few days.
Advertisement
Pettifogging Legalist!
retired moderator
#2 Old 28th Sep 2014 at 6:28 PM
Have you looked at how this behaves in-game? I'm not asking because I have any doubt that you know what you're doing , more because I'm not familiar enough with CAS Part creation to be able to tell whether this a WIP/experimental kind of thing (seen enough screenshots in passing of hiccups between CAS and game) or whether I should add it to the tutorials list right away.

Either way, great to see that you got it to work, and thanks for posting it!

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 28th Sep 2014 at 7:00 PM
Quote: Originally posted by plasticbox
Have you looked at how this behaves in-game? I'm not asking because I have any doubt that you know what you're doing , more because I'm not familiar enough with CAS Part creation to be able to tell whether this a WIP/experimental kind of thing (seen enough screenshots in passing of hiccups between CAS and game) or whether I should add it to the tutorials list right away.

Either way, great to see that you got it to work, and thanks for posting it!


Hah! I have no idea what I'm doing, I just felt compelled to share after messing with s4pe for many hours.

Having said that, while I've not tested it for hours in-game, it seemed to work in a quick run around:



Apart from my awful WIP texture and unedited normal & shadow maps obv.

Of course, this is 'fresh off the presses' today though so it's very possible there is some part of the process I don't understand yet that I just accidentally got right. I'm obviously curious to see if anyone else can get something like this to work.
Pettifogging Legalist!
retired moderator
#4 Old 28th Sep 2014 at 7:09 PM
OK cool! Will add it to the list then -- the more people see it and give it a try, the more likely any issues can be ironed out. Thanks! =)

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.
Test Subject
#5 Old 12th Dec 2014 at 5:09 AM
I really want to try this but it sounds too difficult
Back to top