Jump to content

Changing Animation Sound Effects?


trachypithecus

Recommended Posts

GUIDE POSTED BELOW! My question has been answered and to give back, I wrote a guide based on what I've learned. I'm keeping the original dialogue for solidarity, but if you want to just learn how to implement SFX look below.

 

 

 

I'm in fairly desperate need of assistance, as I've tried nearly everything I can think of and am still hitting a brick wall. Here's my situation:

 

I'm working on a mod that's adding a custom creature (Clannfear) to the game. The creature uses the Werewolf skeleton and animation set and, as such, plays werewolf sounds in-game. I need to change these with custom Clannfear sounds I've made. Here's what I've tried:

 

1. I first tried accessing the Clannfear Actor, clicking on the Sounds tab, and adding in my custom sounds one by one and specifying Attack, Conscious Loop, Idle, etc. The only one that worked, however, was Conscious Loop.

2. So, I thought I'd see how it was set up in Vanilla Skyrim by reverse engineering the original werewolf. When looking in the CK, the Werewolf Attack sounds show no users / nothing under Use Info, i.e. they don't seem to be referenced by anything. After a bunch of searching via google and this forum, the general consensus seems to be that the information is somewhere in the animation data.

3. I got myself set up with Max, Nifskope, Havok Content Tools, etc. I exported and converted the havok files to KFs and finally managed to successfully get them into Max, only to find that there are no Note Key tracks or Note Keys. Just to be sure, I opened the same anims up in Nifskope, and the only keys are Start / End.

4. Per someone's suggestion on the forums, I used hkxcmd to convert the hkx files from standard hkx to xml-readable hkx and opened them up in Notepad++. However, searching (either via search function, or scrolling through every line manually), I see no strings reading "play," "sound," "sfx," or anything like that. I've tried a whole bunch of different anims just in case it was absent from one of them with no luck.

 

I've reached out to a few people individually, but I thought it best to start a thread A. to possibly get a response quicker, but more importantly, B. to share the answer with others who are interested in sound effects mods. Audio is one of those sort of niche areas that's often a bit clandestine, so I'd love for this knowledge to help anyone else looking to tinker with sounds.

 

Thank you!

 

P.S. I've looked within everything in the CK that I could find as well, from racial data to sound markers to scripts and have come up blank. I might just be a n00b, but I think the SFX calls ARE in the anim data SOMEWHERE, I'm just failing to find them. Someone over at the NifTools forums suggested that converting from standard hkx to nif/XML-readable hkx might cause some of the SFX data to be lost, so perhaps that's it. Maybe someone just needs to educate me on how to properly convert hkx... regardless, I've spent the past 3 days trying to solve this and am very frustrated. Any and all help is EXREMELY appreciated :D

Edited by trachypithecus
Link to comment
Share on other sites

Ok. Since this really might interest someone else, I copy what I already wrote in my response to your pm.

 

There are always 2 ways to introduce sound

  • In the animation files' annotation tracks
  • As triggers in the behavior files

I have not been able to see a systematic where they put it. In the case of werewolves it appears that all sounds are triggered in the behavior file (werewolfbehavior.hkx).

 

If you want to change some/all of the sound effects you have to do the following. You will need "hkxcmd" for all conversions of behavior hkx files to xml and back, so you can modify behavior files. I assume you already made a copy of the actors/werewolf folder, and re-linked the "behavior graph" in the CK to reflect your new folder

  • In the CK find "Sound Descriptors" -> NPCWerewolfxxxx which sounds you want to replace. Define your new sound descriptors.
  • You need to change werewolfbehavior.hkx. So convert this to xml with hkxcmd
  • Replace those lines which contain "Soundplay.NPCwerewolfxxxx" which you want to replace with the names of your new objects
  • Convert back to hkx
Link to comment
Share on other sites

This has been the source of much frustration and disappointment for me, as I've worked on new creature sounds for both Immersive Creatures and Beyond Skyrim but both can't seem to find a good way of actually implementing the sounds due to how this stuff works. Sounds for non-humanoid creatures seem to be based completely on behavior files. So they've tried creating duplicate behavior files of the original creatures they're derived from and changing the sounds from there, but apparently this doesn't work and crashes the game.

 

For Beyond Skyrim they tried a sort of workaround by having the new sounds play via quest scripting instead. It kinda works, but it's far from optimal as the quest sounds and original behavior sounds will end up conflicting and fight over priority, so the intended sound won't always play.

 

The only solution I've heard of was discovered by someone working for Skywind. Unfortunately they don't seem willing to share information like that with outsiders.

Link to comment
Share on other sites

This has been the source of much frustration and disappointment for me, as I've worked on new creature sounds for both Immersive Creatures and Beyond Skyrim but both can't seem to find a good way of actually implementing the sounds due to how this stuff works. Sounds for non-humanoid creatures seem to be based completely on behavior files. So they've tried creating duplicate behavior files of the original creatures they're derived from and changing the sounds from there, but apparently this doesn't work and crashes the game.

 

For Beyond Skyrim they tried a sort of workaround by having the new sounds play via quest scripting instead. It kinda works, but it's far from optimal as the quest sounds and original behavior sounds will end up conflicting and fight over priority, so the intended sound won't always play.

 

The only solution I've heard of was discovered by someone working for Skywind. Unfortunately they don't seem willing to share information like that with outsiders.

 

It's not correct that all creature sounds are controlled by behaviors. For example the dog bark is part of the animation annotation. So you really have to specifically check in each case if it's behavior or animation.

 

I would be interested in learning what could have caused CTD. I admit that my knowledge on how to create a custom creature by copying an existing one is only theoretical, and I can't exclude that this has caused CTD. But I doubt that changing "SoundPlay" in the behavior files will crash the system. If a completely copy of the creature should not work, then there would still be an option of making 2 creatures in one folder structure, similar to the differentiation between male and female. I would appreciate a link where this was discussed, if you have one.

 

Also this double sound is unexplainable to me. Don't the conditions which are possible to define sound descriptors work?

Link to comment
Share on other sites

I'm only relaying information second hand since I'm not the one handling the implementation. I just do the sounds and then they tell me what issues they're facing. I think the problem is that you simply cannot have custom beavior files period. And this is what Skywind supposedly got around somehow.

Link to comment
Share on other sites

I understand. I was just hoping that you knew a link where this was discussed.

 

And btw it's not correct that "you cannot have custom behavior files". FNIS is nothing else but creating and modifying custom behavior files. Some standard, and some made from scratch. Problem is that there are so many pitfalls. And I'm always glad when I can participate from other modders' experience.

Link to comment
Share on other sites

Well yes, naturally there is FNIS which is brilliant. Problem is though that they don't want to add FNIS as a dependancy for the mods. It's not worth the hassle it adds on the end user just to get new creature sounds and I can sympathize with that sentiment. If you'd like to talk to them about it, contact lifestorock for Immersive Creatures and Wellpapp for Beyond Skyrim.

Link to comment
Share on other sites

Thanks for sharing this! I hope that this will be a resource for others with the same problem.

I'm actually working on Skywind now, and I wrote up a guide based on my experiences. Though it's far from perfect, I will share it below, in hopes that it may help others. Please feel free to critique me if anything is inaccurate, and keep in mind that it's a direct copy-paste from my post on the Skywind forums, so some of the minor details (like file folder structure) might be inaccurate. I'm happy to comment further if I can be of any assistance.

 

I don't really like the formatting on here so feel free to just go to the link if you can access it: http://tesrenewal.com/forums/music-and-sound/creature-sfx-implementation-guide

 

Hi all,

Here is a guide on how to implement sound effects for creatures in Skywind. Please keep in mind the following:
I'm no expert (not yet! :tongue:)
I've only implemented one creature this way so far, so others may require slightly different procedures!
This is a work in progress and its progress depends, in part, on your feedback! Please let me know if anything is not clear, and I will update it accordingly, as well as updating it based on any new knowledge.

The Process

1. Render out your files in 44100, 16-bit .WAV format, and place them in the appropriate subfolder under \Steam\SteamApps\common\Skyrim\Data\Sound\fx\morro\Cr

2. In the Creation Kit, load up SkyWind. If it's not automatically visible, go to View --> Object Window. Expand Audio and select Sound Descriptors.

3. In the list of Sound Descriptors in the main panel of the Object Window, right-click and select New, and fill out each parameter accordingly (see screenshot for a quick example):

  • Name: 1[CreatureName][Action]. Example: 1ClannfearAttack. (The 1 isn't entirely necessary, afaik it's used to differentiate from vanilla Skyrim packages)
  • Descriptor Type: Standard (only option)
  • Sound: Under sound, right-click and press New. Navigate to the sound you wish to use. You can add as many sounds as you like, and they will be selected from randomly when this sound descriptor is used.
  • Category: For now, I'm using AudioCategoryPausedDuringMenu, but feel free to experiment with different ones. This will simply ensure that the sound stops playing if you pause the game or bring up the UI.
  • Output Model: This will determine how far the sound propagates, and whether or not it takes Reverb. I've been using SOMMono03000_verb, which means the sound will play in mono, propagate for 3k game units, and take reverb. Feel free to experiment with different settings to get the proper feel for your creature, but this is a fine default setting.
  • You can ignore the Conditions checkbox unless you want to try out some fancy scripting.
  • Static Attenuation: This is used to reduce the volume by a flat amount. If your sound is too loud, just slide this over and knock it down a little. Use to personal taste.
  • dB variance: This will introduce a random amount of volume difference, between 0 and the number you write in this field, every time the sounds play. It can make your sounds feel a bit more varied. I leave this blank by default.
  • Looping: generally, for one-offs (attacks, idles, deaths), it should be set to None. For Conscious Loop (a persistent sound that plays as long as the creature is alive and awake, e.g. the smouldering fire on a Flame Atronach), you can set it to Loop
  • Frequency Shift: Shifts your sound by a fixed pitch, either up or down. Similar to static attenuation, can be used to tweak your sound.
  • Frequency Variance: Introduces a random pitch change to the sound every time it plays. Useful for adding variation. You can put probably between 5-8% here without it sounding too artificial.
  • All the rest of the fields, I leave blank.

http://tesrenewal.com/files/jaegrover/images/sound%20descriptor.jpg

4. Repeat step 3 for as many actions as you need. For the Clannfear, I used Breathe In, Breathe Out, Death, Aware, Attack, Hit, Idle, Flee. You may need more or less depending on your creature. To make this easy, once you have your first sound set up, you can right click on it and select Duplicate. Right click the duplicate, and click Edit. It will have all the parameters from your previous descriptor set already, so just change the title and the sounds in the playlist, and click OK. It will ask you if you want to create a new form - click NO.

5. Now, things get interesting. First of all, you will need two programs: ConvertUI, and Notepad++. Download these and have them ready.There are guides on how to use each of these programs, so I'll keep my details brief, but if you need more info, let me know.

6. You will now need to edit the behavior graph file of the creature you want to change the sounds for. Unfortunately, the graph files are in .hkx, havok format, which we can't directly access. That's where ConvertUI comes in. First off, navigate to the Skywind creatures folder, e.g. Steam\SteamApps\common\Skyrim\Data\meshes\actors\Morrowind\Clannfear. The Clannfear was based off of the Werewolf skeleton and behavior graph, so we will be working with a few files called 'werewolf.hkx' etc. Don't worry, this won't change the actual behavior of the werewolf, since these files are copies.

7. Navigate to the Behaviors subfolder. Currently, there should be one file in there - werewolf.hkx (or whatever the behavior graph your creature is based off of). Copy the ConvertUI.exe to this folder and double-click to run it. You will notice that two folders, infolder, and outfolder, have been created. Copy and Paste werewolfbehavior.hkx into infolder (you might want to back up werewolfbehavior.hkx, and any other .hkx files you edit, in a folder on your desktop just in case anything goes wrong, to avoid reinstalling skywind :tongue:).

8. In ConvertUI, make sure you're on the tab that says "hkx to XML," and hit convert. A dialogue box will pop-up quickly saying 'Completed.' If you check the outfolder, you will see a file with the same name - werewolfbehavior.hkx. Though it looks the same, if you check the filesize, you'll notice it's a bit bigger than the one in the infolder. ConvertUI has uncompressed the file, and now you can open it in Notepad++. Do so by opening Notepad++ and clicking and dragging your converted file into the window.

http://tesrenewal.com/files/jaegrover/images/converterUI.jpg

9. Now in Notepad++, you're going to want to look for anything that says SoundPlay. If you press Ctrl+F, you can choose to search for all instances of the phrase SoundPlay. They will appear in a subwindow at the bottom of the screen, along with the line in the code in which you can find them. Simply double-click on any of these lines at the bottom, and you'll skip to that line of code in the main window. The sounds should read something like "WerewolfAttackA" or "WerewolfRoar" etc etc. If you happen to look in the CK, you will find sound descriptors from Vanilla Skyrim with the same names. I bet you can tell what's coming next... replace any sounds you want to change with the names of your sound descriptors that you created for your new creature! For example, "PlaySound.WerewolfDeath" becomes "PlaySound.ClannfearDeath." NOTE: There are some sounds you probably don't want to change (e.g. generic sounds like jumping and landing). My general rule is, if it looks suspicious, leave it alone. Just change what you absolutely need and move on.

http://tesrenewal.com/files/jaegrover/images/notepadreplacement.jpg

10. OPTIONAL: CREATING NEW EVENTS. SKIP IF YOU DON'T NEED TO ADD ADDITIONAL SOUNDS, JUST REPLACE
For the Clannfear example, when I was done implementing the Breathe In and Out sound effects, I tested it in game and found that it only worked in combat. This is because, even though I replaced the werewolf sounds, those sounds were actually only triggered for the in-combat animations! So, what do you do if one of your animations isn't supported with a pre-existing sound? This is where things get a little.... interesting.

So the way these behavior files is set up is: At the top, you have a list of events - see the screenshot above. These can be sound, particle effect, anim events, etc. At the very top (line9,) you will see a row that says:

<hkparam name="eventNames" numelements="242">

That means that there are 242 elements in the list of possible events. So, now that you understand the concept of Events, you need to find the Clip Generator, as Bethesda calls it, or Animation Player, as I call it, that plays the animation you want to add sounds to. To do this, preview and find the name of your animation in the CK (open the actor, click the PREVIEW checkbox on the bottom, scroll to the Animations tab at the top and click the animations to see a preview to find one you want), and once you know the name, CTRL-F in Notepad++ to FIND, and search for the name. For ease, select "Find All In This Document." It will give you a list at the bottom, and if you double-click any of the results, it will jump to that position in the file. You want to find something that looks like the screenshot below. In this example, I am adding sounds to the Clip Generator that plays the animation StandingIdle00.

http://tesrenewal.com/files/jaegrover/images/standingidle.jpg

So unless you know code, that's probably going to look like a bunch of nonsense to you. The only thing you need to pay attention to is the hk param triggers field. Notice on line 27869, it says triggers = #0880? Well, this animation is going to use Trigger Array #0880. What's a trigger array? Simple: it's a list of events, from the first list we looked at, that can be triggered from within the animation, and the times at which they can be triggered. Let's take a look at one. (CTRL-F the number you want to work with)

http://tesrenewal.com/files/jaegrover/images/trigger%20array.jpg

Notice the name at the top: Trigger Array. So, if you read through this array, you'll notice two main things: LocalTime, which just means the time in the animation, and an Event header with, underneat and indented, an ID#. So, remember that long list of events at the top of the page, including our play sound events? Those are all the possible events that can be referenced here, and they each have an ID#, which is simply the order in the list. You can do some simple math to find out what each event's number is. Alternatively, download a program called CondenseBehavior (first result on Google, can upload if you want) from the Nexus, which will take a behavior file and re-arrange everything in a way that makes more sense, and show you the event numbers more clearly (non-destructively). If you need help with that program let me know, but it's very intuitive.

The other parameter to pay attention to here is the 4th line from the top, where it says "numElements." If you add or remove elements from this list, you MUST change the number to reflect exactly how many elements are in the list. Otherwise, you will not be able to convert the file back into HKX and the engine will not recognize it. So, by now, I bet you've figured out what you need to do, but I can bullet-point it for you:

  • Copy and Paste (or write it yourself if you're a programmer and masochistic) one of the Trigger Arrays somewhere else in the document and give it a unique number, in the format #0000 (include 0s always, e.g. #0051) (might have to try a few, if you can't convert back to HKC later it's probably cause there is a duplicate number)
  • Modify the elements in the array list: add or remove as many triggers as you want, making sure to update the numelements parameter at the top to reflect how many elements you have in the list.
  • For each element, specify an event you want to call (your PlaySound, the event number of which is just its position in the list at the very top that we saw before), and the LocalTime, i.e. the time in the animation you want it to play. NB: Make sure the LocalTime you set it to doesn't exceed the time of the animation! Trying to play a sound 5 seconds into a 3 second animation will not end well!
  • Now, find the Clip Generator that corresponds to your animation, and in the Events parameter, change whatever number is there to the new, unique number you created for your trigger array. This should work, but probably won't, so be prepared to make backups of your work and try this over and over again until the engine is like "OK, I'll play nice." Ping me if you have any trouble, this whole process is a PITA.

11. Save and exit. Back in your Behaviors folder, delete the file in the infolder. Move the now-edited werewolfbehavior.hkx from outfolder to infolder. Run ConvertUI again, but this time click the second tab -XML to HKX. You don't need to fill in the filename field, it will detect this automatically. Just press Convert. Next, move it out of the outfolder and back into the main Behaviors folder. It will ask you to replace the current werewolfbehavior.HKX. Back it up first if you wish, then say Yes. IF IT DOESN'T CONVERT, I.E. THERE IS NOTHING IN YOUR OUTFOLDER, you messed up one of the arrays, i.e. the NumElements isn't equal to the actual number of elements in the list. Verify anything you've changed and count to make sure you have the right number of elements specified.

12. Ok, now that you're through that wall of text, open up the CK if it's not already, open the Interiors / Spaces browser, and choose a simple space to test your critter out (I like using ArrowCabin for a tiny space or AldSothaLowerLevel for a bigger space). Click and drag your creature into the level and SAVE. It may ask you to save as a new .esp. Give it an obvious title like CreatureTest.

13. Open Skyrim (you don't need to close the CK). At the launcher screen, click data files, and make sure Skywind, Skywind - Patch (if you have it) and, most importantly, CreatureTest (or whatever you called it) are selected, in that load order.

14. At the title screen, press ~ to bring up the console, then type 'tgm' to activate god mode for ease of testing, 'tcai' if you want the creature to stand around doing nothing, and then 'coc [Name of the Level you're using,' e.g. coc AbandonedShackInterior (it's case sensitive, so make sure you spell it right!).

15. Your creature will now be walking around with the sounds - assuming everything went well. Which it probably won't. It will probably break over and over again until you get it right. So now let's do something else that is likely to cause you to pull your hair out, and put in some Hit and Death sounds. These are implemented using Skyrim's Quest manager. This makes sense, because you want to give priorities to certain lines so that they don't overlap etc, especially for human NPCs.

16. The first thing you will need is a Voice Type. This is super easy - just find the Voice Type category in the left of the Objects Window in the CK, right-click in the list and hit New. There are hardly any options, so just name it CrClannfearVoice or something simple like that.

17. Now open up the actor's properties that you're working with. Look for the Trais tab on the top, and for the Voice Type parameter... you guessed it... set it to CrClannfearVoice (replace the name with your creature of course).

18. Go back to the objects window and click on Quest. Right-click, and do New. Fill out the following forms: ID: CreatureDialogue[YourCreatureName], e.g. CreatureDialogueClannfear. Quest name: same, CreatureDialogueClannfear. Priority: 0. Start Game enabled: CHECK. Run once, warn on alias, blah blah, everything else UNCHECKED/BLANK.

19. We need to assign this dialogue to all Clannfears, and Clannfears only. Right click in the box in the middle that says Quest Dialogue Conditions and hit New. The drop down menu on the left should say GetIsID. Click it and select GetIsVoiceType. Then, notice the box right next to it that says INVALID. Click that until a list appears showing you all voice types. Select the CrClannfearVoice that you created before.

20. Click OK to close this submenu, and then OK to close the quest, then immediately open it again.

21. Notice that there are now a bunch of extra tabs at the top. Click Combat.

22. You will see 3 columns: One greyed out to the left, one which says Subtype with a dropdown menu near the top (sort of in the middle) and a large one with Topic Text at the top, to the right. Right-click in the middle one (Subtype) and choose New Topic. We're working with Death first, so choose death, and in future steps, choose hit, or whatever else you want.

21. A dialogue box will appear with a name in it. Just delete whatever text is in here and hit OK, it doesn't matter for creatures.

22. Now left click once to select your next topic (Death) and then right-click in the big box on the right and say New.

23. This brings up the Response screen. In the very top, under Response Text, just press the spacebar once. You should see the character count move to 1/150 (it's like a in-skyrim twitter! *crickets*) If you don't put one character minimum in here it won't create it at all, but since it's a creature you won't need to respond to it. The only other thing you need to do here is, towards the bottom, where it says Sound File, there is a big button that says Select Sound... yeah. Click it and choose the Sound Descriptor for your creature's Death sound. Click OK when you're done.

23. This brings up the Topic Info screen. Now all you have to do is, under Conditions, do the same thing you did before on the main quest conditions page: Right Click, New, set to GetIsVoiceType, set the voice type to your creature, then hit OK.

24. Congratulations! You've created a Death Sound for your creature! Repeat this process for any other sounds you want to add, like Hit. You can add Stealth Detect responses in another tab. I won't go into it here but if you have any questions let me know.

25. Now... if you try to put this in game, it won't work. This is because you need to create a special file called a .SEQ file for the edited quest. Don't ask why, it's some tech optimization Bethesda apparently sprung on the community with patch 1.6 and had everyone in a tizzy. But it's easy to work around. Download the program TES5Edit from the Nexus. Open it up, and like the CK, it will ask you to choose your ESP. Select Skywind and your modified ESP, then click OK. Even if it looks like it's loaded, it takes a while, so wait until it stops saying "Building reference info" along the bottom of the screen. Now, just right-click your ESP, choose Other, and click Create SEQ file.

26. To double-check that this worked correctly, look in your Data folder. You should now have a folder called SEQ, with a .SEQ file that has the same name as your .ESP in it. Whee! Remember to submit this when you upload for integration.

27. Test your creature in game. Play with it a lot. Most likely, things won't work, unexpected crap will break. You will rage, you will cry, you will begin to doubt the very foundation of your existence. But, in the end, you will get your creature working, and it will fill you with the pride of a thousand suns. And it will mean that I have one less thing to put in the game.

Optional, but highly recommended final step: Drink heavily throughout the entire process.

<3

-JAEG

Edited by trachypithecus
Link to comment
Share on other sites

Good luck! as Fore mentioned, this might not work 100% for all creatures, as some of the creatures seem to have their SFX in the animation data instead of the behavior graphs. If you run into any trouble, please feel free to PM me or to post here, and I will look into it and see if I can help :D I'd like to learn too!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...