The 3rd Age

Fin's LOTR Expansion

Fin's LOTR Expansion

A mod that adds Rohan to the game, and strives to bring back some BFME I fun!

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: 6142
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 September 5, 2007 - 9:24

ok i have posted a topic in bfm2androwk section and my topic is called audeo help, need help

Bart (Administrator) - Wednesday September 5, 2007 - 5:33

yes, better make a forum topic, this is getting out of hand

witchking - Wednesday September 5, 2007 - 5:27

heres the code.

i added the voice file

              
Code
The Battle For Middle-earth\data\audio\Sounds\toshowthee.wav


and               
Code
The Battle For Middle-earth\data\audio\Speech\toshowthee.wav


and               
Code
The Battle For Middle-earth\lang\english\data\audio\Sounds\toshowthee.wav


and heres the voice.ini
              
Code
AudioEvent toshowthee
Sounds = toshowthee
Volume = 150
MinVolume = 125
Type = world player voice
SubmixSlider = voice
End


heres the soundeffects.ini

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


and the MouthOfSauron.ini
              
Code
; *** AUDIO Parameters ***;

VoiceAttack = toshowthee
VoiceAttackCharge = MouthOfSauronVoiceAttackCharge
VoiceAttackMachine = MouthOfSauronVoiceAttack
VoiceAttackStructure = toshowthee
VoiceFear = MouthOfSauronVoiceHelpMe
VoiceGuard = MouthOfSauronVoiceMove
VoiceMove


and i added it to the asset.dat
so what did i do wrong?

and by the way this is not you cannot hide
the audeo is called toshowthee
because i liked this audeo better.

and if this is not enough info i'll post on the fourms
and pload the bigfile so you can see it for you'r self

Bart (Administrator) - Wednesday September 5, 2007 - 3:09

well then you probably haven't done it right
what's your code?

witchking - Tuesday September 4, 2007 - 17:59

ok but now theres a new problem.

when i attack an enemy he says nothing.

Bart (Administrator) - Tuesday September 4, 2007 - 12:45

no, that's not it. the text between the < > marks is not meant to be copied literally

witchking - Monday September 3, 2007 - 17:49

              
Code

; *** AUDIO Parameters ***;

VoiceAttack = <youcannothide>
VoiceAttackStructure = youcannothide
?
              
Code
AudioEvent <youcannothide>
Sounds = <youcannothide>
?
End
is that it? and sorry i have been away and have not got the chance to be near a computer

Bart (Administrator) - Saturday September 1, 2007 - 3:41

              
Code
AudioEvent <soundname>
Sounds = <filename>
<bla>
End

              
Code
; *** AUDIO Parameters ***;

VoiceAttack = <soundname>
VoiceAttackStructure = ...
<etc>

witchking - Friday August 31, 2007 - 8:46

lol i did

and when i wanted lartz to say it when he captured a bulding i added it as

              
Code
youcannothidevoicemoveMS



even               
Code
youcannnothide
and lartz still does not say it

Bart (Administrator) - Wednesday August 29, 2007 - 8:06

if your file is named youcannothide.wav (without spaces!) reference it as youcannothide, if it's named blablublo.wav, reference it as blablublo, etc.

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."

 
14:00:31