I am having trouble adding custom sounds into the game. Long story short I have a custom mod for testing these things and I have:
- Copied the Audio3DScripts.xml, AudioDefines.xml, AudioDefinesSchema.xml and AudioScriptSchema.xml to my mod.
- Added the appropriate code into the first two files, basically copy pasting some default sounds and than changing the paths.
- Added the appropriate values into my .kf files.
For the purposes of this I'll call the stuff in "Audio3DScripts.xml" as the "sound tag" and the stuff in "AudioDefines.xml" as the "sound source".
And so far the situation is such:
- Using my custom tag from Audio3DScripts does not work. No sound is played.
- Changing the sound source in the custom tag to a vanilla sound does not work. No sound is played.
- Changing the sound source of a vanilla sound to my custom source works perfectly.
So something is clearly the matter with my code in Audio3DScripts.xml. Can you tell me what the trick is?
Code:
I literally just copy pasted AS3D_UN_SAM_MISSLE and added it to the top of the file.
<Script3DSound>
<ScriptID>AS3D_UN_PPQ</ScriptID>
<SoundID>SND_PPQ</SoundID><!-- If I this ID to any of the existing tags I can hear it in the game. -->
<SoundType>GAME_SFX</SoundType>
<iMinVolume>90</iMinVolume>
<iMaxVolume>100</iMaxVolume>
<iPitchChangeDown>-4000</iPitchChangeDown>
<iPitchChangeUp>4000</iPitchChangeUp>
<bLooping>0</bLooping>
<iMinTimeDelay>0</iMinTimeDelay>
<iMaxTimeDelay>0</iMaxTimeDelay>
<StartPosition>NONE</StartPosition>
<EndPosition>NONE</EndPosition>
<iMinVelocity>0</iMinVelocity>
<iMaxVelocity>0</iMaxVelocity>
<iMinDistanceFromListener>0</iMinDistanceFromListener>
<iMaxDistanceFromListener>0</iMaxDistanceFromListener>
<iMinDistanceForMaxVolume>500</iMinDistanceForMaxVolume>
<iMaxDistanceForMaxVolume>1000</iMaxDistanceForMaxVolume>
<iMinCutoffDistance>7000</iMinCutoffDistance>
<iMaxCutoffDistance>7000</iMaxCutoffDistance>
<bTaperForSoundtracks>0</bTaperForSoundtracks>
<iLengthOfSound>0</iLengthOfSound>
<fMinDryLevel>1.0</fMinDryLevel>
<fMaxDryLevel>1.0</fMaxDryLevel>
<fMinWetLevel>0.5</fMinWetLevel>
<fMaxWetLevel>0.5</fMaxWetLevel>
<iNotPlayPercent>0</iNotPlayPercent>
</Script3DSound>