Adding Unique Sound to Certain Melee Weapons - Troops - Horses

Users who are viewing this thread

spiritwind

Squire
How do you add a unique sound to certain Melee weapons - Troops - Horses?  I know the whole Module_sounds system and how to get sounds in for guns but not melee weapons, Troops, or horses. 
When I say Troops I mean like the sounds sea raiders make are diffrence then perhaps mountain bandits.  Likes say I wanted Sea Raiders to go Arrgh whenever they attack or their usual sound, Harrrah when they win, and UUugh when they die, when on the other hand the Mountain bandits go Hahah when they attakc or their usual sound, "Whut now" when the win... bla bla bla, you get the point.
Thanks for the help =).
 
to make certain troops have different battle cries or other sounds you would have to make a new race in module_skins.py.  Right now there is just male, female, and undead, but you could a sea_raider race and give the tf_sea_raider flag to those troops just like how the flag is done on the females.  This allows them to have separate sounds, etc.

Code:
[(voice_die,"snd_man_die"),(voice_hit,"snd_man_hit"),(voice_grunt,"snd_man_grunt"),(voice_grunt_long,"snd_man_grunt_long"),(voice_yell,"snd_man_yell"),(voice_victory,"snd_man_victory")], #voice sounds

The weapon noise on melee weapons is more difficult.  Right now the code is pretty limited, where there are some default noises (ie. metal_hit_wood, metal_hit_metal, etc) which you can replace.  There is not an easy way to do a specific noise on an attack, but Jinnai helped me out with some code a while back, see these posts for more info...

http://forums.taleworlds.com/index.php/topic,56917.msg1475545.html#msg1475545
http://forums.taleworlds.com/index.php/topic,62172.0.html
 
Thanks for the advice, I do indeed appreciate it and will prob follow the path of what you said about the custom people sounds.
---
Another quick question I have along this path is for guns.  If I have a gun and I want it to randomly choose set sounds for that weapon how do I do so or is it possible?  Like I have a handgun called the Ralph Nader  and I have two custom sounds for it and want it to randomly choose between the two, how do I do so?
Thanks again!
 
spiritwind said:
Thanks for the advice, I do indeed appreciate it and will prob follow the path of what you said about the custom people sounds.
---
Another quick question I have along this path is for guns.  If I have a gun and I want it to randomly choose set sounds for that weapon how do I do so or is it possible?  Like I have a handgun called the Ralph Nader  and I have two custom sounds for it and want it to randomly choose between the two, how do I do so?
Thanks again!

If you look at the musket item (I think, or what ever gun shipped with native) there is a script that runs when it is fired to make the smoke particle affect.  You could piggy back off that to also make a sound.  The issue is, it would still make it's original sound.  Just a quick post idea.
 
as jik said, copy the example from the flintlock pistol, and then in module_sounds.py just have multiple files listed for the sound effect and it will randomly pick one.

Code:
("lightsaber_swing",sf_priority_5|sf_vol_5,["saber_swing1.mp3","saber_swing2.mp3","saber_swing3.mp3","saber_swing4.mp3","saber_swing5.mp3","saber_swing6.mp3","saber_swing7.mp3","saber_swing8.mp3",]),
 
HokieBT said:
as jik said, copy the example from the flintlock pistol, and then in module_sounds.py just have multiple files listed for the sound effect and it will randomly pick one.

Code:
("lightsaber_swing",sf_priority_5|sf_vol_5,["saber_swing1.mp3","saber_swing2.mp3","saber_swing3.mp3","saber_swing4.mp3","saber_swing5.mp3","saber_swing6.mp3","saber_swing7.mp3","saber_swing8.mp3",]),

Ah so you finally solved the problem with the lightsaber sounds?.. WoW and here I was and never though it could happend...  :smile:
But I got a question while we're on it. How do you make your weapon to play up different .md3 frames when let's say fire or reload. Like with the bows. When you pull back the string. How does you make the AI to know when to play up the frames?
 
Back
Top Bottom