Jump to content


Photo

Adding Custom Audio Tutorial


  • Please log in to reply
2 replies to this topic

#1 GothmogtheOrc

GothmogtheOrc

    Ruler of the Morgul Vale

  • Hosted
  • 2,263 posts
  • Location:USA
  • Projects:Kings of the West Mod
  •  T3A Chamber Member - Retired

Posted 12 July 2005 - 09:07 PM

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.sour...ownload/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:

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:

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

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

"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...Using a program called "AssetBuilder" that can be found here: http://the3rdage.net/tools.php (scroll down till you see it...it should be the 3rd one down)...After installing the AssetBuilder, you need to open it up. Then click on your new audio file, and drag it into the AssetBuilder screen. Next click "Append to existing Asset.dat"...This will add your file to the pre-existing list (NOTE: you do not have to select the existing Asset.dat file, the game knows where that file is located: in the main BFME directory). Then click "Save" (you'll want to save as "Asset"...the game will add the ".dat" part itself) and choose the desktop or someother spot where you can keep the file temporarily. After if finishes saving, You need to go into your default BFME directory and move your old Asset.dat to a safe location (maybe a new folder called " BFME back-up") and then move your new Asset.dat file into the BFME directory. This is important: DO NOT OVERWRITE YOUR OLD ASSET.DAT FILE...If there is a problem with your new Asset.dat, then you will need the old one again.

(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)


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)

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

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

;-------------------------------------
;----------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:

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

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:

; *** 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:

; *** AUDIO Parameters ***;

VoiceAmbushed = AragornVoiceAmbush
VoiceAttack = AragornVoiceAttack
VoiceAttackStructure = AragornVoiceAttackBuilding

To maybe:

; *** 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:


FX_List.ini

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

Sound
Name = muwitchking_myhour
End

So then your FX file should look like this:

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!

-GothmogtheOrc

Nine%20rings.jpg
Click on my Sig to go to my BFME Modding site where you can download my mods.
KotW%20Morgul%20In-game.jpg
Kings of the West Mod Leader
*Retired. PM me if you need to get a hold of me as I'll get an email notification and should reply within a day or so*


#2 nickthemenace

nickthemenace

    Im a legend, lets face, I actually am.

  • Project Team
  • 426 posts
  • Location:Chatham, UK
  • Projects:HeroMod, Other Stuff :)
  •  T3A Team Chamber Member
  • Division:T3A Moderator

Posted 12 July 2005 - 09:27 PM

Good Stuff :dry:
nickthemenace
http://nickthemenace.gamemod.net/
The Guy Who Made It Possible To Have New Factions (And Stuff)(Before anyone else :p)
Posted Image

#3 ambershee

ambershee

    Nimbusfish Rawks

  • Hosted
  • 3,114 posts
  • Location:Derby, UK
  • Projects:Mutator Week & Unreal 3 Projects
  •  Mad Mod Boffin

Posted 13 July 2005 - 10:54 PM

Nicely done, I didn't even know all that myself. (actually, I've never tried). Kudos on the audacity link, that's some good freeware :p




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users