Support for Custom CAS Parts


This tutorial will explain to you the basics of adding support for different kinds of custom CAS parts that work with WickedWhims. Currently supported CAS Parts are: Male/Female Top, Male/Female Bottom, Male/Female Soft and Hard Penis, Male/Female Feet, Male/Female Pubic Hair, Strapon, Condom, Male Underwear, and Female Underwear. Each of these types is added in a different way so please read the appropriate tutorial below.


1. Download Resources

Pick one of the manager tools (S4PE or S4S):

TOOL> S4PE - Download (you are required to use 7-zip to extract it)

TOOL> Sims4Studio - Download (requires to register)

S4PE (Sims 4 Package Editor) is a simplistic tool to edit Sims 4 resources. It might not be the most intuitive to use for beginners, but it’s the easiest to use for this tutorial.

S4S (Sims 4 Studio) is a complex tool to edit and create Sims 4 resources. With plenty of tutorials it is a relatively easy tool to learn, but for this tutorial it is harder to use.


Necessary tools:

TOOL> Modding Toolbox - Download (or use Hash Generator in Sims4Studio)

Modding Toolbox is used to generate hash values for the XML templates. If you’re going to use Sims4Studio, the alternative for it is under ‘Tools -> Hash Generator’.

Pick the template for the CAS parts you want to add:

TEMPLATE> Condom CAS Parts Template -  Download
(Open -> Right Click -> Save as…)

TEMPLATE > Strapon CAS Parts Template -  Download
(Open -> Right Click -> Save as…)

TEMPLATE > Underwear CAS Parts Template -  Download
(Open -> Right Click -> Save as…)

TEMPLATE > Body CAS Parts Template -  Download
(Open -> Right Click -> Save as…)

TEMPLATE > Pubic Hair CAS Parts Template -  Download
(Open -> Right Click -> Save as…)

Condom CAS Parts Template is used to add support for custom condoms in WickedWhims. They are used during sex. You are required to make a condom wrapper object and a visible condom CAS part for the full support of condoms.

Strapon CAS Parts Template is used to add support for custom strapons in WickedWhims. They are used during sex. You are required to make a visible strapon CAS part that is selectable at the CAS screen.

Underwear CAS Parts Template is used to add support for custom underwear in WickedWhims. It’s used when randomizing it on Sims.

Body CAS Parts Template is used to add support for custom naked body parts in WickedWhims. They can be selected by the user using the Body Selector in-game. It’s recommended to make a square icon that will be displayed in the Body Selector menu.


These applications are optional. If you don’t own any coloring text editor, try one out:

> Sublime Text 3 - Download

> Notepad++ - Download

The editor used in this tutorial is Sublime Text 3. It will help with readability of the variables that need to be edited. The same can be done with Notepad++.

> XML Validation - Open

XML Validation is helpful after you’re done with your XML file. Copy and paste your XML file to the XML Validation page and see if the file structure is correct and without error.


2. Create Hash Values

Every XML template requires a decimal and a hexadecimal ID that will be created using the Modding Toolbox (or S4S Hash Generator).

> 2.1. Type in the name of your file and make sure it contains your name.

Recommended naming: “YOUR_NAME:Something_CAS_Parts”, example: 'TURBODRIVER:Condom_CAS_Parts’.


> 2.2. Copy the FNV 64 field without the '0x’ prefix.


> 2.3. Replace the '0000000000000000’ at the end of the XML Template file name with copied FNV 64 value.

The XML file should be originally named 'S4_7DF2169C_00000000_0000000000000000.xml’.


> 2.4. Switch the display result to 'Decimal’.


> 2.5. Copy the FNV 64 field.


> 2.6. Replace the '0000000000000000’ inside of the XML Template file with copied FNV 64 value.

The XML file should originally contain a variable looking like s="000000000000000000".

> 2.7. Replace the 'YOURNAME:...’ inside of the XML Template file with the file name that has your name and was used to generate the FNV 64 values.



3. Retrieve CAS Part ID

Fields ‘cas_part_id’ or ‘cas_part_ids’ will require entering a decimal Instance ID of your CAS part(s).

For S4PE, the Instance ID is located under “Instance” at the list of resources. CAS Parts can be recognized by the “CASP” tag. It’s a hexadecimal value.

For S4S, the Instance ID is located under “Instance” at the list of resources or at the “Key” section on the right panel when the CAS Part is selected. It’s a hexadecimal value.

To convert a hexadecimal value to decimal, use the ‘Convert’ tab inside Modding Toolbox or inside Sims4Studio.




4. Create Condom CAS Parts

Skip, if you’re not adding condoms.

Condoms work by using a Condom Wrapper Object than then gets unpacked and applied on the Sim body in form of a CAS Part. This means that each condom CAS Part requires to have its own Condom Wrapper Object. And each individual Condom Wrapper Object has to have its unique XML Tuning file with a unique Instance ID that is used as the reference to the condom CAS Part.


All of the variables highlighted in red should be modified for the file to work correctly and support your CAS part.

> 4.1.1 Variable 'cas_part_raw_display_name’ is the name of your CAS Part that might be disabled for the user in-game. Make sure to name it appropriately.

> 4.1.2 Variable 'cas_part_author’ is your name that might be disabled for the user in-game.

> 4.1.3 Variable 'cas_part_id’ is the decimal Instance ID of your CAS Part.

To get the decimal Instance ID of your CAS Part, copy the hexadecimal Instance ID (Key) of your CAS Part (example: 0x143A310339A3E4A6) and convert it to decimal by using the ‘Convert’ tab inside Modding Toolbox or inside Sims4Studio.

> 4.1.4 Variable 'cas_part_reference_id’ is the decimal Instance ID the tuning file used for the condom wrapper object.

This requires each condom wrapper object to have a separate tuning file with a unique Instance ID.

> 4.1.5 Variable 'required_cas_part_id’ is an optional field that makes sure a CAS Part is not applied unless a different one is already present on the Sim.

This should be used with the hard penis CAS Part ID that fits the condom texture and model. Not every penis model will look correct with a condom applied.

> 4.2 Condom Wrapper Tuning

Your Condom Wrapper Object has to have a unique tuning file. To make that tuning file interactable with WickedWhims, you need to assign it “_super_affordances“. These are the interactions required for the condom to be functional:

  • <T>12214374159487695556<!--Use_This_Condom--></T>
  • <T>15594836868367128156<!--Use_All_Condoms--></T>
  • <T>10974543514180352698<!--Disallow_Condoms_Auto_Use--></T>
  • <T>15247761224639232100<!--Allow_Condoms_Auto_Use--></T>

It’s important that the tuning file contains the “inventory_item“ component with “inventory_only“ enabled so it can only be used from inside of the Sim inventory.


5. Create Strapon CAS Parts

Skip, if you’re not adding strapons.

Strapons are automatically applied on Sims when they are required by the animation. This means that every Sim has a pre-defined strapon part that can be changed. For WickedWhims to detect the existence of strapons, the XML file has to contain its CAS Part ID.


All of the variables highlighted in red should be modified for the file to work correctly and support your CAS part.

> 5.1 Variable 'cas_part_raw_display_name’ is the name of your CAS Part that might be disabled for the user in-game. Make sure to name it appropriately.

> 5.2 Variable 'cas_part_author’ is your name that might be disabled for the user in-game.

> 5.3 Variable 'cas_part_id’ is the decimal Instance ID of your CAS Part.

To get the decimal Instance ID of your CAS Part, copy the hexadecimal Instance ID (Key) of your CAS Part (example: 0x143A310339A3E4A6) and convert it to decimal by using the ‘Convert’ tab inside Modding Toolbox or inside Sims4Studio.


6. Create Underwear CAS Parts

Skip, if you’re not adding underwear.

Underwear is used when Sims undress, but these files are not required for the underwear to be available to use on Sims. These files are used to randomize underwear on all Sims in-game so they don’t have to use the default white underwear.


All of the variables highlighted in red should be modified for the file to work correctly and support your CAS part.

> 6.1 Variable 'cas_part_raw_display_name’ is the name of your CAS Part that might be disabled for the user in-game. Make sure to name it appropriately.

> 6.2 Variable 'cas_part_author’ is your name that might be disabled for the user in-game.

> 6.3.1 Variable ‘cas_part_id’ is used when ‘cas_part_type’ is set to UNDERWEAR_MALE, and it is the decimal Instance ID of underwear CAS part.

Male underwear only requires one part, the bottom part.

To get the decimal Instance ID of your CAS Part, copy the hexadecimal Instance ID (Key) of your CAS Part (example: 0x143A310339A3E4A6) and convert it to decimal by using the ‘Convert’ tab inside Modding Toolbox or inside Sims4Studio.

> 6.3.2 Variable ‘cas_part_ids’ is used when ‘cas_part_type’ is set to UNDERWEAR_FEMALE, and it is the list of decimal Instance IDs of underwear CAS parts.

Female underwear requires two parts, the top part and the bottom part. These are divided by the comma character.

To get the decimal Instance ID of a CAS Part, copy the hexadecimal Instance ID (Key) of your CAS Part (example: 0x143A310339A3E4A6) and convert it to decimal by using the ‘Convert’ tab inside Modding Toolbox or inside Sims4Studio.


7. Create Body CAS Parts

Skip, if you’re not adding body parts.

Naked body parts are used when Sims undress, and for the user to use the naked body parts, it is required to add them to the Body Selector menu.


All of the variables highlighted in red should be modified for the file to work correctly and support your CAS part.

> 7.1 Variable 'cas_part_raw_display_name’ is the name of your CAS Part that might be disabled for the user in-game. Make sure to name it appropriately.

> 7.2 Variable 'cas_part_author’ is your name that might be disabled for the user in-game.

> 7.3 Variable ‘cas_part_display_icon’ is used to display an icon in the Body Selector menu.

Not changing the default icon will result in the default WickedWhims icon being shown instead.

> 7.3.1 When using S4PE, you can convert a PNG file into a DDS file using the Aorta DDS application (don’t include MipMaps when converting).

S4PE resource type for the icons is _IMG 0x00B2D882.

> 7.3.2 When using S4S, you can simply import a PNG file as a DST Image.

S4S resource type for the icons is DSTImageResource.

> 7.4 Variable ‘cas_part_type’ is the type of the body part that is being added.

  • TONGUE is for unisex tongues.
  • BODY_TOP_MALE is for masculine or feminine males top.
  • BODY_TOP_FEMALE is for female breasts.
  • BODY_BOTTOM_MALE is for males without a penis.
  • BODY_BOTTOM_FEMALE is for females bottom (vulva).
  • BODY_FEET_MALE is for males feet.
  • BODY_FEET_FEMALE is for females feet.
  • PENIS_SOFT_MALE is for males soft penis.
  • PENIS_SOFT_FEMALE is for females soft penis (female with a penis).
  • PENIS_HARD_MALE is for males hard penis.
  • PENIS_HARD_FEMALE is for females hard penis (female with a penis).
  • ROBOT_PENIS_HARD is for servo hard penis (only visible during sex).

> 7.5 Variable 'cas_part_id’ is the decimal Instance ID of your CAS Part.

To get the decimal Instance ID of your CAS Part, copy the hexadecimal Instance ID (Key) of your CAS Part (example: 0x143A310339A3E4A6) and convert it to decimal by using the ‘Convert’ tab inside Modding Toolbox or inside Sims4Studio.

The CAS part is not required to match the intended body type. You are allowed to make your body parts a native tattoo and use the advantages of texturing a body part as if it was a tattoo. In that case, you are still required to include it with a mesh.

> 7.6 Variable 'penis_sliders' is a set of variables responsible for any penis length and girth sliders.

This set of variables should be completely removed from the file (or left with 0 [zero] values) if the penis does not use custom sliders for length and girth. You are not required to provide both length and girth sliders at the same time if the default sliders work correctly. Providing length and girth sliders is OPTIONAL, as the built-in penis sliders support all penis models.

> 7.6.1 Variables 'length_slider_low' and 'length_slider_high' are the decimal Instance ID of your penis length sliders.

> 7.6.2 Variables 'girth_slider_low' and 'girth_slider_high' are the decimal Instance ID of your penis girth sliders.

Resource type for a penis slider is Sim Modifier (0xC5F6763E).

Technically the sliders functionality is not limited to only hard penis body type variants, as a fully rigged soft penis mesh will still dynamically adjust to slider manipulation.


8. Create Pubic Hair CAS Parts

Skip, if you’re not adding pubic hair parts.

Pubic Hair parts are used on any Sim outfit, dressed or undressed, and they can be selected from a specialized Pubic Hair style menu.

All of the variables highlighted in red should be modified for the file to work correctly and support your CAS part.

> 8.1 Variable 'cas_part_raw_display_name’ is the name of your CAS Part that might be disabled for the user in-game. Make sure to name it appropriately.

> 8.2 Variable 'cas_part_author’ is your name that might be disabled for the user in-game.

> 8.3 Variable ‘cas_part_display_icon’ is used to display an icon in the Body Selector menu.

Not changing the default icon will result in the default WickedWhims icon being shown instead.

> 8.3.1 When using S4PE, you can convert a PNG file into a DDS file using the Aorta DDS application (don’t include MipMaps when converting).

S4PE resource type for the icons is _IMG 0x00B2D882.

> 8.3.2 When using S4S, you can simply import a PNG file as a DST Image.

S4S resource type for the icons is DSTImageResource.

> 8.4 Variable ‘cas_part_type’ is the type of the pubic hair part that is being added.

  • PUBIC_HAIR_MALE is for male pubic hair.
  • PUBIC_HAIR_FEMALE is for female pubic hair.

> 8.5 Variable ‘cas_part_subtype’ is the color type of the pubic part that is being added.

  • GRAY
  • BLACK
  • LIGHT_BROWN
  • BROWN
  • BLONDE
  • DIRTY_BLONDE
  • AUBURN
  • ORANGE
  • CUSTOM

These are the base game natural hair colors. For any other color or a combination of colors, use the ‘CUSTOM’ type.

> 8.6 Variable ‘cas_part_group’ is the name and identifier or your pubic hair parts group.

Groups are Pubic Hair Parts that have the exact same style but different hair color. This variable is both used as a display name in-game and an identifier for the pubic hair implementation.

The Pubic Hair implementation comes with a randomization feature which allows users to select groups of pubic hair parts instead of individual parts.

Example: When creating a “Landing Strip” style that features all 8 nautral hair colors, give each and every “Landing Strip” part the same group name. When selecting pubic hair parts in-game, they will all show up as one entry with the group name (style name) instead of 8 individual entries for each color.

> 8.7 Variable 'cas_part_ids’ is the list of decimal Instance IDs of your CAS Parts.

The Pubic Hair implementation comes with a dynamic hair growth feature. The list holds all growth stages represented by individual CAS parts. The first CAS Part ID on the list is the actual intended pubic hair CAS Part. Every subsequent CAS Part ID added to the list is recognized as a growth stage.

Example: The first CAS Part ID on the list is a landing strip pubic hair, the second one is short hair on the entire pubic hair area, and the third one is fully grown hair on the entire pubic hair area. With these three CAS Parts on the list, the growth will progress from a landing strip, to short hair, to long hair. You can add as many growth stages as you want to. Each growth stage can be reused in any other pubic hair part or as its own pubic hair parts.

To get the decimal Instance ID of your CAS Part, copy the hexadecimal Instance ID (Key) of your CAS Part (example: 0x143A310339A3E4A6) and convert it to decimal by using the ‘Convert’ tab inside Modding Toolbox or inside Sims4Studio.

> 8.8 Variable 'has_strict_visibility’ is a flag that sets the strict visibility rule for the pubic hair CAS Part.

Setting this variable to ‘True’ will make pubic hair be only applied when Sim lower-half is fully naked.

Pubic Hair CAS Parts are applied on Sims at all times, not just when they undress. When adding 3D pubic hair that will clip through Sims clothing, set this flag to ‘True’ to only apply pubic hair when Sims are undressed.


9. Package Tuning (XML)

For the XML tuning file to be used and detected, it has to be placed inside a PACKAGE file, preferably the one that contains the actual CAS parts. If you don’t have a package file, you should consider making the CAS parts first.

> 9.1 Using S4PE

Open S4PE, and then in the top bar, select “File”, and “ Open... ”. Open the PACKAGE file with your CAS Parts.

If you’re creating something that doesn’t involve your own CAS parts, click “New”, then “Save”, select where to save your new package, and follow further instructions.


While S4PE is running, open the folder with your XML file, click on it and hold, and then drag it over the S4PE window, and drop (aka drag and drop the file inside S4PE). Once you did that, save it (click “File” and “Save”).

> 9.2 Using S4S

Open S4S, and then click “My Projects”. Open the PACKAGE file with your CAS Parts.

If you’re creating something that doesn’t involve your own CAS parts, click “Tools” at the top bar, and then “Create Empty Package”. Select where to save your new package, and follow further instructions.


To add the XML tuning file, click the “Add” button at the bottom-left, select “SnippetTuningResource” from the list as the Type, and paste the hexadecimal FNV 64 hash, that you have created at the beginning, without the ‘0x’ into the Instance field. Then press OK.

Select your file from the list on the left panel. On the right panel, make sure the “XML” tab is selected. Open your XML tuning file, select it all (CTRL+A), and then paste it into S4S right panel. Once you did that, save it with the “Save” button on the bottom-right.


Last update: 3rd of January 2021

Get WickedWhims