Adding Native Events to Animations [6]


This tutorial will explain to you how to add native events (lips movement and sounds) to animations. To add sex events check out the Creating WickedWhims Animation XML File tutorial.


1. Download S4PE

> S4PE - Download (at least version 0.5.5)

Note that archives for 7-Zip (.7z) should be unpacked using 7-Zip, otherwise, it may result in errors when using the unpacked files.


2. Edit in S4PE

To add events you need to have an animation, so check other tutorials if you have not already made one. You add events to your animations after you’re done with creating and exporting them. This is especially important if you animated Sim mouth, as unlocking the mouth bones is required for the animation to display correctly in-game.

Open your package with animations using S4PE.


3. Open Events Grid View


Select your CLIP and click the Grid button at the bottom of the S4PE editor.


Select the ‘ClipEvents’ line from the list and click the ’…’ button on the far right.
You can remove existing, added by Sims4Studio, two events from the list by using the 'Delete’ button on the bottom.
Note that editing CLIP file in S4PE will edit CLHD file for you automatically, so you don’t have to worry about it. 


4. Understanding Timecodes

Events require to set the Timecode they will be triggered at when the animation plays.

Every frame of your animation has a specific length. That length is set in the 'TickLength’ field of your animation and by default, it’s ’0.03333334’. This means that the 'TickLength’ value multiplied by a number of frames of your animation will result in the duration of your animation.
Example: If your animation has 81 frames and you multiply it by the 'TickLength’ (81 * 0.03333334) you will get the animation duration which is '2.7’.

To get the Timecode for a specific frame of your animation, take that frame number and multiply it by the 'TickLength’.

Example: If you want to play a sound at the 20th frame of your animation, multiply that by the 'TickLength’ (20 * 003333334 = 0.06666668). Your Timecode for the 20th frame is '0.06666668’.

You're allowed to modify the 'TickLength' variable to adjust your animation and fix animation hitches when looping, but keep in mind that the Timecodes will have to be adjusted as well.


5. Adding Sounds Events


To add sounds, click the 'Add’ button at the bottom and select 'ClipEventSound’. Setup the values just like in the screenshot above for the first sound. Replace the 'SoundName’ field with a name of a sound you want to play. Replace the 'Timecode’ field with the time you want to play the sound at. The 'Unknown1’ field defines the ID of your event. The first event will have the value 0x00000001.

Every next event ID grows by 1 in hexadecimal format: 0x00000001 -> 0x00000002 -> 0x00000003 -> 0x00000004 -> 0x00000005 -> 0x00000006 -> 0x00000007 -> 0x00000008 -> 0x00000009 -> 0x0000000A -> 0x0000000B -> 0x0000000C -> 0x0000000D -> 0x0000000E -> 0x0000000F…

Reference the Sound Effects List for names of sound effects. You can listen do individual sounds with the Sound Event Tool made by Denton47.

Once you’re done adding events, click the 'OK’ button and then 'Commit’ button. Remember to save your package!


6. Adding Lips Movement Suppression Event (unlock mouth bones)


By default, the game uses mouth bones to make Sims speak, which means that you can’t animate them.
This is not true if you suppress lips. Doing that will block Sims from talking and allow you to animate mouth bones.

To add lips movement suppression, click the 'Add’ button at the bottom and select 'ClipEventCensor’. Setup the values just like in the screenshot above. Keep the 'Timecode’ as '0’ since it should start from the beginning of the animation. The 'Unknown1’ field defines the ID of your event. The first event will have the value 0x00000001.

Every next event ID grows by 1 in hexadecimal format: 0x00000001 -> 0x00000002 -> 0x00000003 -> 0x00000004 -> 0x00000005 -> 0x00000006 -> 0x00000007 -> 0x00000008 -> 0x00000009 -> 0x0000000A -> 0x0000000B -> 0x0000000C -> 0x0000000D -> 0x0000000E -> 0x0000000F… Once you’re done adding events, click the 'OK’ button and then 'Commit’ button. Remember to save your package!


Last update: 21st of April 2020

Files

WickedWhims v153c - 20 April 2020.zip 55 MB
Apr 20, 2020

Get WickedWhims