[HELP] 2D Audio XML help?

agentsmith952

Warlord
Joined
Sep 15, 2006
Messages
139
Location
Da 'Burgh
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:

Code:
			<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:

Code:
	<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:

Code:
		<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!
 
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>
 
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...
 
If you are trying to do this in a module, then it won't work.....all audio is NOT modular.
 
Top Bottom