View Full Version : TS4 CASTools: Flag edits (gender, randomness, categories, etc)

18th Jul 2015, 8:05 PM

Here’s how to edit CAS flags with TS4 CASTools (http://modthesims.info/t/532867) ‒ technically this is the same as this (http://modthesims.info/showthread.php?t=539130) (using s4pe) but a bit more convenient since this way, one can change the flags for all variants in one go. Note that the screenshots below are taken in an older version of CASTools; the current one ( at the moment) has a preview and other features added (the flag stuff has not changed though).

1. In the “Cloning Tool” tab, select the item you want to change (you can use the filters at the top) and select at least one colour variant. For this example I’m going to edit the female Maxis space suit, so I’m making an override for the existing one and selected all colour variants it has. If you’d want to edit a custom thing, you’d use the “Select Custom Package” option instead and edit that directly (technically one can also override custom packages but there’s not much of a point to that). Hit “Clone” and save your package where you can find it again.


2. In the “Clone Package Editor” tab, open the package you just cloned ‒ the flags that are relevant for the entire item are all in the first tab, “General CAS Part Properties”. The screenshot below shows the unedited package: in the top right you can see that the “Allow for Random” option is ticked. This is what I want to change in this case (I have no space station in my neighbourhood, so I don’t want random folks to walk around in space suits).


One can also change any of the other options here; some things are more complex than just flag edits though:

Gender conversions: For teen-and-up clothing and for most hair (long hair in particular), the mesh will need to be edited for the item to fit the other gender (female and male body shape, and often also the scalp shape, are not identical). When you do edit the mesh, the gender flag does need to be changed though, or your other-gender sims will not have the item available in CAS.

Top/Bottom/Full body conversions: The “Part Type” dropdown in this tab changes the alpha channel of the vertex colour so that the item in question can be selected properly in CAS when you click on a sim wearing it. There is also an option to change vertex colour overall in the Mesh Manager tab. See Cmar’s comment on that here (http://modthesims.info/showthread.php?p=4812802#post4812802): “The coding for the body part selected when clicking is the alpha channel of the vertex color in the meshes. [..] In the General CAS Part Properties tab, [..] the part selection automatically modifies all the meshes to the right vertex color, changing only the alpha. In the Mesh Manager tab, on the right where it says Set Vertex Color, use the Standards dropdown to select the standard color [..] this will set the entire vertex color. It's possible but unlikely that this might change the morphing of the mesh, but it's more likely to resolve problems than create them.”
Meshing-wise (and also texture-wise), this type of conversion is more involved – but the flags need to be set properly too. If you convert between different types of items, you will also want to change the type flag/s in the left-hand list accordingly (where on my screenshot it says “Full Body > Jumpsuit”) – this is the category and subcategory in CAS when you select things with the clicky icons.

For info on how the “Occult” alien/human flags work exactly (they are a little bit complex), see this thread (http://www.modthesims.info/showthread.php?p=4841160#post4841160):

There are three, count 'em three, factors involved:

Whether the item is displayed at all in CAS for the 'Occult' type is determined by the 'Disabled for:' flags.
Whether the item can be random is determined by the 'Allow for Random' flag.
Whether the item can be random for a specific Occult type is determined by the 'Occult' (or 'OccultEnabledForRandom'/'OccultDeprecated' as I've variously named it while flailing in confusion) item in the Property Flags list.

So if you want something to be visible in CAS for both humans and aliens and random only for humans, clear both the 'Disabled for:' boxes, check the 'Allow for Random' box, and have an Occult property flag with the value set to Human.

I've tested with eyes, but it should work the same for clothing.

And the Occult flag works differently for skin tones - confusing much? I think I'm going to write a brief tutorial on that [..]

3. In the “Recolour Manager” tab you can also edit flags for individual colour variants; like when a blue fabric looks very green-ish to you and you’d like to be able to find it when filtering for green stuff, you could give that colour variant an additional Green flag. Use the “Add Flag” button atop the flag list to add stuff, the “Delete” buttons next to each flag to remove them. (On my screenshot you would need to scroll over to see them).


4. Save your package when done; if you haven’t made any other changes but CASP edits (such as flags) it will only contain the CASPs, like it should.


The CASP is all that is necessary for simple edits like this – you do NOT need to make a full clone with all meshes and textures and everything. This is particularly important when you want to edit EP/GP/SP items and upload them here: full clones of such items will not be accepted since we consider it piracy to redistribute EP content unchanged.


10th Aug 2015, 3:00 PM
Nice! I'd only add that there's a fully functioning preview in the newer versions of CAS Tools, plus the ability to remove meshparts by removing regions.

I've left a comment in the thread you linked, about the flags determining randomization.

10th Aug 2015, 3:18 PM
Yeah I know -- I wanted to re-take the screenshots anyway, but then you were still working on the previews so I thought I should better wait with that. But I'll put a note in the post! And thanks for the flag info, as well =)

E: Note and flag info added.

17th Oct 2017, 6:43 AM
Is there a way to use CASTool to easily replace a default TankTop with a CC bikini top basically I want to change another persons CC Bikini from a add on item into a replacer.
I can't see a way to turn on the Default Replacement button thingy.
Or do I have to got through the painful process of exporting all the meshes etc from the CC Bikini then Importing them all into the Tanktop replacement?

29th Jul 2019, 8:12 AM
I just downloaded this to try as you can do all the colors at once but I guess my package file is too big? I have 121 colors. I keep getting a System.OutOfMemoryException error and it won't let me do anything

30th Jul 2019, 5:34 PM
I just downloaded this to try as you can do all the colors at once but I guess my package file is too big? I have 121 colors. I keep getting a System.OutOfMemoryException error and it won't let me do anything

While I don't think a large number of recolors would cause this, it's possible. Could also be a corrupted resource. If you upload the package I'll take a look.