View Full Version : [HELP] 2D Audio XML help?


agentsmith952
Oct 18, 2007, 07:05 PM
I wanted to add custom diplomacy music for my new civ. I thought I got the XML right, but the music never plays. Here is the code:

LeaderheadInfos:

<DiplomacyIntroMusicPeace>
<DiploMusicPeaceEra>
<EraType>ERA_ANCIENT</EraType>
<DiploScriptId>AS2D_DIPLO_UKRAINE_INTRO</DiploScriptId>
</DiploMusicPeaceEra>
<DiploMusicPeaceEra>
<EraType>ERA_CLASSICAL</EraType>
<DiploScriptId>AS2D_DIPLO_UKRAINE_INTRO</DiploScriptId>
</DiploMusicPeaceEra>
<DiploMusicPeaceEra>
<EraType>ERA_MEDIEVAL</EraType>
<DiploScriptId>AS2D_DIPLO_UKRAINE_INTRO</DiploScriptId>
</DiploMusicPeaceEra>
<DiploMusicPeaceEra>
<EraType>ERA_RENAISSANCE</EraType>
<DiploScriptId>AS2D_DIPLO_UKRAINE_INTRO</DiploScriptId>
</DiploMusicPeaceEra>
<DiploMusicPeaceEra>
<EraType>ERA_INDUSTRIAL</EraType>
<DiploScriptId>AS2D_DIPLO_UKRAINE_INTRO</DiploScriptId>
</DiploMusicPeaceEra>
<DiploMusicPeaceEra>
<EraType>ERA_MODERN</EraType>
<DiploScriptId>AS2D_DIPLO_UKRAINE_INTRO</DiploScriptId>
</DiploMusicPeaceEra>
<DiploMusicPeaceEra>
<EraType>ERA_FUTURE</EraType>
<DiploScriptId>AS2D_DIPLO_UKRAINE_INTRO</DiploScriptId>
</DiploMusicPeaceEra>
</DiplomacyIntroMusicPeace>
<DiplomacyMusicPeace>
<DiploMusicPeaceEra>
<EraType>ERA_ANCIENT</EraType>
<DiploScriptId>AS2D_DIPLO_UKRAINE_INTRO</DiploScriptId>
</DiploMusicPeaceEra>
<DiploMusicPeaceEra>
<EraType>ERA_CLASSICAL</EraType>
<DiploScriptId>AS2D_DIPLO_UKRAINE_INTRO</DiploScriptId>
</DiploMusicPeaceEra>
<DiploMusicPeaceEra>
<EraType>ERA_MEDIEVAL</EraType>
<DiploScriptId>AS2D_DIPLO_UKRAINE_INTRO</DiploScriptId>
</DiploMusicPeaceEra>
<DiploMusicPeaceEra>
<EraType>ERA_RENAISSANCE</EraType>
<DiploScriptId>AS2D_DIPLO_UKRAINE_INTRO</DiploScriptId>
</DiploMusicPeaceEra>
<DiploMusicPeaceEra>
<EraType>ERA_INDUSTRIAL</EraType>
<DiploScriptId>AS2D_DIPLO_UKRAINE_INTRO</DiploScriptId>
</DiploMusicPeaceEra>
<DiploMusicPeaceEra>
<EraType>ERA_MODERN</EraType>
<DiploScriptId>AS2D_DIPLO_UKRAINE_INTRO</DiploScriptId>
</DiploMusicPeaceEra>
<DiploMusicPeaceEra>
<EraType>ERA_FUTURE</EraType>
<DiploScriptId>AS2D_DIPLO_UKRAINE_INTRO</DiploScriptId>
</DiploMusicPeaceEra>
</DiplomacyMusicPeace>

Audio2DScripts:

<Script2DSound>
<ScriptID>AS2D_DIPLO_UKRAINE_INTRO</ScriptID>
<SoundID>DIPLO_UKRAINE_INTRO</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMinVolume>100</iMinVolume>
<iMaxVolume>100</iMaxVolume>
<iPitchChangeDown>0</iPitchChangeDown>
<iPitchChangeUp>0</iPitchChangeUp>
<iMinLeftPan>-1</iMinLeftPan>
<iMaxLeftPan>-1</iMaxLeftPan>
<iMinRightPan>-1</iMinRightPan>
<iMaxRightPan>-1</iMaxRightPan>
<bLooping>1</bLooping>
<iMinTimeDelay>0</iMinTimeDelay>
<iMaxTimeDelay>0</iMaxTimeDelay>
<bTaperForSoundtracks>0</bTaperForSoundtracks>
<iLengthOfSound>0</iLengthOfSound>
<fMinDryLevel>1.0</fMinDryLevel>
<fMaxDryLevel>1.0</fMaxDryLevel>
<fMinWetLevel>0.0</fMinWetLevel>
<fMaxWetLevel>0.0</fMaxWetLevel>
</Script2DSound>

AudioDefines:

<SoundData>
<SoundID>DIPLO_UKRAINE_INTRO</SoundID>
<Filename>Modules/Sounds/Diplomacy/Ukraine_Intro</Filename>
<LoadType>STREAMED</LoadType>
<bIsCompressed>1</bIsCompressed>
<bInGeneric>1</bInGeneric>
</SoundData>

Do any of you see any XML issues? Am I missing something?

Thanks a million in advance for any help you can give me!

ripple01
Oct 19, 2007, 08:36 AM
What version are you using?

agentsmith952
Oct 19, 2007, 08:51 AM
I'm using BtS 3.13.

ripple01
Oct 19, 2007, 10:48 AM
Double check the exisiting entries in 2dScripts.xml... I think a new line was added in BtS at the bottom that you are missing. I'm not at my home PC so I can't check at the moment.

<Script2DSound>
<ScriptID>AS2D_DIPLO_UKRAINE_INTRO</ScriptID>
<SoundID>DIPLO_UKRAINE_INTRO</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMinVolume>100</iMinVolume>
<iMaxVolume>100</iMaxVolume>
<iPitchChangeDown>0</iPitchChangeDown>
<iPitchChangeUp>0</iPitchChangeUp>
<iMinLeftPan>-1</iMinLeftPan>
<iMaxLeftPan>-1</iMaxLeftPan>
<iMinRightPan>-1</iMinRightPan>
<iMaxRightPan>-1</iMaxRightPan>
<bLooping>1</bLooping>
<iMinTimeDelay>0</iMinTimeDelay>
<iMaxTimeDelay>0</iMaxTimeDelay>
<bTaperForSoundtracks>0</bTaperForSoundtracks>
<iLengthOfSound>0</iLengthOfSound>
<fMinDryLevel>1.0</fMinDryLevel>
<fMaxDryLevel>1.0</fMaxDryLevel>
<fMinWetLevel>0.0</fMinWetLevel>
<fMaxWetLevel>0.0</fMaxWetLevel>
<NEW TAG ADDED HERE IN BTS>
</Script2DSound>

agentsmith952
Oct 20, 2007, 09:32 AM
Double check the exisiting entries in 2dScripts.xml... I think a new line was added in BtS at the bottom that you are missing. I'm not at my home PC so I can't check at the moment.

<Script2DSound>
<ScriptID>AS2D_DIPLO_UKRAINE_INTRO</ScriptID>
<SoundID>DIPLO_UKRAINE_INTRO</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMinVolume>100</iMinVolume>
<iMaxVolume>100</iMaxVolume>
<iPitchChangeDown>0</iPitchChangeDown>
<iPitchChangeUp>0</iPitchChangeUp>
<iMinLeftPan>-1</iMinLeftPan>
<iMaxLeftPan>-1</iMaxLeftPan>
<iMinRightPan>-1</iMinRightPan>
<iMaxRightPan>-1</iMaxRightPan>
<bLooping>1</bLooping>
<iMinTimeDelay>0</iMinTimeDelay>
<iMaxTimeDelay>0</iMaxTimeDelay>
<bTaperForSoundtracks>0</bTaperForSoundtracks>
<iLengthOfSound>0</iLengthOfSound>
<fMinDryLevel>1.0</fMinDryLevel>
<fMaxDryLevel>1.0</fMaxDryLevel>
<fMinWetLevel>0.0</fMinWetLevel>
<fMaxWetLevel>0.0</fMaxWetLevel>
<NEW TAG ADDED HERE IN BTS>
</Script2DSound>

There was indeed a missing tag, but I still can't get my sound to play in game. There's still just nothing...

TAfirehawk
Oct 20, 2007, 03:13 PM
If you are trying to do this in a module, then it won't work.....all audio is NOT modular.

agentsmith952
Oct 20, 2007, 03:21 PM
If you are trying to do this in a module, then it won't work.....all audio is NOT modular.

Well then that very well might be the problem. Let me give it a look see...