Jump to content


Photo

Adding custom audio to an ability/spell


  • Please log in to reply
6 replies to this topic

#1 Rainwizard6

Rainwizard6
  • Members
  • 14 posts

Posted 26 July 2009 - 09:04 PM

_!_ I Fixed My Own Mistake _!_
Might still be a good reference for others though

The file I have created is a .WAV file of saruman uttering a phrase I'd like him to say before he casts a spell. I tried very hard to try and figure this out on my own, but can't seem to. The main problem is, I can't find the script that references the sound file. If I could find where those references are located I would be able to probabally just swap it. From what I understand the sound effects are located within the EnglishAudio.big file. I couldn't find any *.ini's within that where those references would be listed. Here's basically what I've discovered. Just to make it clearer, I want to edit the sound of saruman's telekinetic push before he starts it. He says things like "Embrace my power", "None can contend with the will of saruman" etc. Thats the sound I want to swap with the one I've created. Inside saruman's .ini file within the evilfactionunits.ini file, I found this code relating to it.


;;; WIZARD BLAST SPECIAL POWER;;;
	Behavior = SpecialPowerModule ModuleTag_WizardBlastStarter							
		SpecialPowerTemplate		= SpecialPowerTelekeneticPush
		UpdateModuleStartsAttack		= Yes
		InitiateSound			= SarumanVoiceAttackWizardBlast;;;What I believe is a reference to the .wav file
	End	

	Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_WizardBlastUpdate
		SpecialPowerTemplate					= SpecialPowerTelekeneticPush
		WhichSpecialWeapon			= 2;
		SkipContinue						= Yes
		UnpackTime			= 700
		PreparationTime			= 1   
		PersistentPrepTime			= 1000
		PackTime				= 100
		
		AwardXPForTriggering			= 0
		StartAbilityRange			= 80.0
		MustFinishAbility			= Yes
		SpecialWeapon			= SarumanWizardBlast
	End
------------------------------------
So, I've noticed the part that says "InitiateSound = SarumanVoiceAttackWizardBlast". I thought SarumanVoiceAttackWizardBlast must be some sort of variable that held the value of the .wav file. (not exactly sure what the name of it is). I then looked in other locations and came to "Voice.ini" where I found this.
------------------------------------
AudioEvent SarumanVoiceAttackWizardBlast 
	Sounds = EUSarum_voiattc;;;Not sure what this means
	Sounds = EUSarum_voiatcc;;;Not sure what this means
	Sounds = EUSarum_voisebh EUSarum_voisebi EUSarum_voisebm EUSarum_voisebn;;;More references yet again, still no link to the .wav
	Volume = SARUMAN_VOLUME
	MinVolume = SARUMAN_MINVOLUME
	Type = world player voice
	SubmixSlider = voice
End
-------------------------------------
Now I found this, which, seemed promising but still had not given a link to the .wav file that I could swap out for my custom one. From what I see here it looks as if those are all the possible sounds that can occur when you cast that spell. As he doesn't say the same thing every time. Even if I could just add the one I made to that list as a possibility, that would be sufficient. EUSarum_voisebi I guess for example would be the "You can not contend with the will of Saruman" sound. EUSarum_voisebm could be "Embrace my power" or something. I've looked in the other .ini's within INI.big and can't find anything more regarding the references to those files. I had worked with the "lotr.csf or .str file", I think they can be both, before. So I checked in there to see if there was a reference for it. No luck. There's not much information that I could find regarding adding custom sounds. Another thing I heard was you have to edit "Asset.dat". Which would make sense as I would imagine the sound would be considered an asset of the game. Although I have no idea as to how I would easily edit a .DAT file, I couldn't seem to find a straight forward explanation on how to. So if anyone could give any insight or a location as to where I would find that, I would really appreciate it. Also, please correct me if im going about this totally the wrong way. I hope this wasn't too confusing, if you need more information I will provide it. Thank you very much.

Edited by Rainwizard6, 26 July 2009 - 09:22 PM.


#2 Rainwizard6

Rainwizard6
  • Members
  • 14 posts

Posted 26 July 2009 - 09:21 PM

Oh my gosh....I feel like such an idiot.

AudioEvent SarumanVoiceAttackWizardBlast
	Sounds = EUSarum_voiattc 
	Sounds = EUSarum_voiatcc
	Sounds = EUSarum_voisebh EUSarum_voisebi EUSarum_voisebm EUSarum_voisebn
	Volume = SARUMAN_VOLUME
	MinVolume = SARUMAN_MINVOLUME
	Type = world player voice
	SubmixSlider = voice
End

The listings such as EUSarum_voisebh EUSarum_voisebi were the names of the wav files. I guess they have it set up so they don't need to add the extension or somthing. Wow....looked hard but I guess I just overlooked something obvious.

#3 Nertea

Nertea

    ...lo sa raptor!

  • Hosted
  • 3,349 posts
  • Location:Vancouver, Canada
  • Projects:Star Villains and Space heroes, The Dwarf Holds
  •  T3A Chamber Member
  • Division:BFME/Unity

Posted 26 July 2009 - 09:23 PM

Basically, in the ini files for objects, the special power defines a sound event (in this case, the event name is SarumanVoiceAttackWizardBlast) . All of those events are, as you surmise, contained in voice.ini. For each event, the lines that look like:
Sounds = EUSarum_voiattc
are the sounds that can be played during this particular sound effect. Each of them refers to a file - if you look through EnglishAudio.big you'll find a file named eusarum_voiattc.wav, which is the file played by that command. Simple enough. To play your own, you would either add a new line or replace an existing line with say
Sounds = EUSarum_mynewwizardblast
and have a corresponding wav file called eusarum_mynewwizardblast.wav.

Adding the wav file to the asset.dat should be simple too, never done this before so someone should probably confirm, but just follow the procedure outlined in... it appears we don't have a simple tutorial for this. I'm really not qualified to try to explain how to create an asset, considering how bad I am at it. Someone want to step in?


-edit: haha, beat me to it :blink:

Edited by Nertea, 26 July 2009 - 09:24 PM.

sig.png
I really don't do requests and my Arnor Soldier is not fit for BFME. Don't ask me for either.


#4 Rainwizard6

Rainwizard6
  • Members
  • 14 posts

Posted 27 July 2009 - 03:37 AM

Thank you, that clears it up a bit.

#5 The Shadow

The Shadow
  • Members
  • 6 posts

Posted 28 July 2009 - 01:06 AM

Audio doesn't have to be added to asset.dat. Just place your .wav files into data/audio/sounds, and reference them in the ini.

#6 Bereneth Túrien

Bereneth Túrien

    Ni degilbor

  • Members
  • 414 posts
  • Location:Michigan, USA
  • Projects:Working on my own mod.
  •  Former advisor.

Posted 28 July 2009 - 02:27 PM

You beat me to it. Was just about to say that.

I used to be {AE}Manveru, if that rings a bell.


#7 Nertea

Nertea

    ...lo sa raptor!

  • Hosted
  • 3,349 posts
  • Location:Vancouver, Canada
  • Projects:Star Villains and Space heroes, The Dwarf Holds
  •  T3A Chamber Member
  • Division:BFME/Unity

Posted 28 July 2009 - 03:32 PM

*makes a note of this* I have been informed falsely!

sig.png
I really don't do requests and my Arnor Soldier is not fit for BFME. Don't ask me for either.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users