Jump to content

Changing unit sounds


false_god123
 Share

Recommended Posts

I want to change some unit sounds, i have attempted by making a audio testsound.ogg file in audio/voice/global along with testsound.xml in the same location

The testsound.xml looks like this :

SoundGroup>
    <Gain>1</Gain>
    <Priority>100</Priority>
    <ConeGain>1</ConeGain>
    <Looping>0</Looping>
    <RandOrder>1</RandOrder>
    <Distanceless>1</Distanceless>
    <RandGain>1</RandGain>
    <RandPitch>1</RandPitch>
    <PitchUpper>1</PitchUpper>
    <PitchLower>0.7</PitchLower>
    <Threshold>1</Threshold>
    <Path>audio/voice/global</Path>
    <Sound>testsound.ogg</Sound>
</SoundGroup>

 

And i used this code here in my axeman unit :    

<SoundGroups>
      <select>voice/global/testsound.xml</select>
      <attack>attack/weapon/sword.xml</attack>
      <death>actor/human/death/death.xml</death>
    </SoundGroups>

And put it in my simulation/templates/unuits/gaul/gaul_champion.xml file

Only the first line has been changed to a custom ogg file

When i test this i don't get any errors so all seems well but when i select this unit i can hear the default sound still and do not hear my custom sound. Is this the correct way of changing unit sounds?

Sorry for spamming the forums with this stuff!

 

 

Link to comment
Share on other sites

Is the <SoundGroup> tag within a <Sound> tag?

It should be something like this:

  <Sound>
    <SoundGroups>
      <select>voice/global/testsound.xml</select>
      <attack>attack/weapon/sword.xml</attack>
      <death>actor/human/death/death.xml</death>
    </SoundGroups>
  </Sound>

 

Link to comment
Share on other sites

sorry for late reply, It does have the correct code like the line above but i just keep hearing the Greek civ_male_ yes.ogg file when selecting a unit.

Maybe i have put the custom ogg and xml in the wrong location? i have tried it in audio/voice/greek/civ and also tried it in audio/voice/global

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...