The 3rd Age

Kings of the West Mod

Kings of the West Mod

Adds Minas Morgul as well as new heroes, units, buildings, and spells

Button for The 3rd AgeButton for The Dwarf HoldsButton for The Elven AllianceButton for Helm's Deep Last HopeButton for GothmogtheOrcButton for BFME+Button for The Four AgesButton for HDR HeadquartersButton for Middle Earth CenterButton for Project Perfect Mod

Become an affiliate!

   

Quick Lists

Top Rated Popular New Updated Last Comments Users

Register and log in to move these advertisements down

Adding Custom Audio Tutorial

Avatar of GothmogtheOrc

GothmogtheOrc

Category: Code
Level: Intermediate
Created: Friday March 30, 2007 - 13:05
Updated: Saturday June 27, 2009 - 18:40
Views: 6151
Summary: Step by step tutorial on adding new audio clips

Rating

Staff says

3.6

Members say

3.4

Average

3.5/5.0

10 votes

Since there are no really helpfull tutorials on adding custom audio files in-game yet, and since I have succesfully done it...I have decided to write a tutorial about it.

(1)- In order to add a custom audio file in-game, it must be in .WAV format.

(2)- Also, the custom audio must be Mono not Stereo.

(If you are not sure whether your file is Stereo or Mono you can download a nice freeware (free) audio editor called "Audacity". It is available from the company website here: http://audacity.sourceforge.net/download/windows

-In audacity you can remove sections of your audio clip, as-well as many other things which I don't have time to list here. Also, I will not describe how to use audacity here...I leave that to you. (don't worry though...It's pretty easy to figure out.)

NOTE: If you encounter a problem in Audacity where you can't seem to change anything...make sure that the audio clip you have loaded isn't currently paused...Because when paused, audacity won't let you delete sections or do very much else...(took me awhile to figure that out)

To make your sound file Mono if it is in Stereo:

Ok, in Audacity:

To the left of your sound file (the part with the blue spikes)
There is a control panel that should have the name of your sound file as a drop down menu. Drop the menu down and half-way down the menu there should be "Split Stereo Track"...press this, then next to the drop-down menu (to the left) is a (X) button that deletes the selected Track (either top or bottom)...press the "close" button for the track that sounds worse (either the top or the bottom). That should do it, just select "export as WAV" to your location of choice, then you're done in Audacity.

(3)- Once you have your audio clip in Mono and saved as a .WAV, you will need to extract the .BIG files: Audio.BIG and EnglishAudio.BIG ...They should go into their default directories:

              
Code
Audio -------The Battle For Middle-earth\data\audio

EnglishAudio-The Battle For Middle-earth\lang\english\data\audio


(4)- Next you need to copy your custom audio file and paste one copy in each of the sub-folders:

              
Code
"The Battle For Middle-earth\data\audio\Sounds"
as well as

              
Code
"The Battle For Middle-earth\data\audio\Speech"
and

              
Code
"The Battle For Middle-earth\lang\english\data\audio\Sounds"


(5)- Next we need to add our custom audio clip to the Asset.dat file in the Main BFME directory... I trust you know how to do this.

(6)- Ok, now we should be done with moving the files...next we need to tell the game who, what, and where our new audio clip is. For that we will need to edit the INI files located here: (you will need to extract the INI.BIG file first, if you haven't already)


              
Code
The INI files -----The Battle For Middle-earth\data\ini



Alright, first we need to edit two INI files called: Voice.ini and SpecialEffects.ini

You will need to add the following: (just replace my sound file names with yours)

              
Code
;----------------------------------------------------------
;------------------Voice.ini-------------------------------
;----------------------------------------------------------

AudioEvent muwitchking_myhour
Sounds = muwitchking_myhour
Volume = 150
MinVolume = 125
Type = world player voice
SubmixSlider = voice
End


              
Code
;-------------------------------------
;----------SoundEffects.ini-----------
;-------------------------------------

AudioEvent muwitchking_myhour
Sounds = muwitchking_myhour
Priority = high
Limit = 1
Volume = 150
MinRange = 500
MaxRange = 1000
Type = world shrouded everyone
SubmixSlider = SoundFX
End


Next we will need to tell the game WHEN it should play our audio clip...There are several ways of doing this, so I will post the one I used (which worked) and several other possible methods (probably will work, but haven't been tried by me)


You can edit the "CommandButton.ini" and add this: (this is what I did for my mod)
-The sound should play as soon as you hit the special power activator button...

You need to add this to your Power:

              
Code
"UnitSpecificSound = muwitchking_myhour"


(just replace my audio file name with your)

This is what the CommandButton code should look like (give or take) after you add that UnitSpecificSound:

              
Code
CommandButton Command_WitchKingWordOfPower
Command = SPECIAL_POWER
SpecialPower = SpecialAbilityWitchKingWordOfPower SpecialAbilityWitchKingHeroMode
; Options =
TextLabel = CONTROLBAR:WKWordOfPower
ButtonImage = HPWitchKingHour
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:ToolTipWKWordOfPower
AutoAbility = Yes
PresetRange = 120.0
UnitSpecificSound = muwitchking_myhour
InPalantir = Yes
End




Several other places you can add your custom Audio files are:



(Specific Unit/Hero voices)

In your Heroes file (aragorn.ini for example) there is a section called:

              
Code
; *** AUDIO Parameters ***;


This section contains all the regular speech that the charactors say: "Can I have some Bacon?"-Pippin

So, to add or replace the audio clips that the charactors say you would change this:

              
Code
; *** AUDIO Parameters ***;

VoiceAmbushed = AragornVoiceAmbush
VoiceAttack = AragornVoiceAttack
VoiceAttackStructure = AragornVoiceAttackBuilding


To maybe:

              
Code
; *** AUDIO Parameters ***;

VoiceAmbushed = MyBetterAragornVoiceAmbush
VoiceAttack = GimliVoiceAttack
VoiceAttackStructure = MyAudioClipVoiceAttackBuilding


(just add your voice clip name in front of the "Voice_____")

NOTE: you might need to add your Audio clip name into "Voice.ini or Speech.ini", I haven't tried this so I don't know for sure.



If you wanted your Audio Clip to play durring an FX (say durring Word Of Power) You might change this file:


              
Code
FX_List.ini


-You can add this to your special effect to make the sound play when the effect plays:

              
Code
Sound
Name = muwitchking_myhour
End


So then your FX file should look like this:

              
Code
FXList FX_WKAnduril
ParticleSystem
Name = WKAnduril
AttachToObject = Yes
AttachToBone = B_SWORDBONE
End
Sound
Name = muwitchking_myhour
End

End


If these don't make the voice do what you want it to do...play around with the different audio files, there are several others that use voices: EVA.ini / MiscAudio.ini / Speech.ini / Voice.ini / SpecialEffects.ini

If you are looking to add music files to the game, it should be very similar...but I haven't done anything with music files so I can't help you much there. The only big difference I can think of are: Music.ini probably has to refrence your Audio clip, and there is probably another file that tells the game when to play the Song...

That should do it for adding your custom audio clip in-game...Any questions can be directed to me or to the 3rd Age forums...


Enjoy!

Comments

Display order: Newest first | Page: 1, 2

witchking - Wednesday August 29, 2007 - 5:06

thats what im asking how do you reference it?

my file is just called you cannot hide so thats why i asked is it muwitchking_youcannothide?
or how would you refernce it?

Bart (Administrator) - Wednesday August 29, 2007 - 3:08

              
Quote
just replace my sound file names with yours

so name it whatever you want and reference it correctly

witchking - Tuesday August 28, 2007 - 18:48

gothmog the orc i have a question about this you'r muwitchking_myhour i want to add my file name the speech is called you cannot hide so do i name it muwitchking_youcannothide
or just you cannot hide?

witchking - Friday July 20, 2007 - 15:39

ok witch music files?

Bart (Administrator) - Friday July 20, 2007 - 12:40

no, you need to edit other files for that

witchking - Friday July 20, 2007 - 11:00

thanks i have been looking for something like this but will this work with a music file too?

Bart (Administrator) - Friday March 30, 2007 - 16:59

nice, but you should think about splitting your tutorials in multiple pages ;-)

Go to top

 

"One site to rule them all, one site to find them,
one site to host them all, and on the network bind them."

 
18:19:27