Making a custom Leader use Custom Music!

Thanks to your tutorial, I was able to set custom leader music and a custom soundtrack for my Pirate Civilization mod on my first try! (Though I did have to go back in and adjust the Leader music volume from 120 and 80 down to 50). The leader peace and war music sound great at 50 and the soundtrack stuff sounds great at 40.

Unfortunately I wont be able to upload the updated mod, because I really wanted to use the Assassin's Creed 4: Black Flag OST as the soundtrack for my mod! Sounds great, such a great pirate themed OST! (don't want to file share copyrighted music!)

with 34 tracks (having to first convert them from m4a to mp3) and organize them into Peace, War, etc. it took me about 2 hours from start to finish! (most of the time spent was converting the tracks to mp3 and listening to them to see which track fit where the best) after that it went quick with your tutorial!

Great job on this!
 
Hey Leugi,

Have you tried to add custom Dawn Of Man speech with this method? I had successfully added a soundtrack and the Leader Peace and War tracks through this method, but Im not having any luck with my Dawn of Man speech track.

Civilization = CIVILIZATION_PIRATE

My Audio_Sounds
<Row>
<SoundID>SND_DOM_SPEECH_PIRATE</SoundID>
<Filename>PirateDOM</Filename>
<LoadType>DynamicResident</LoadType>​
</Row>

My Audio_2DSounds
<Row>
<ScriptID>AS2D_DOM_SPEECH_PIRATE</ScriptID>
<SoundID>SND_DOM_SPEECH_PIRATE</SoundID>
<SoundType>GAME_SPEECH</SoundType>
<MinVolume>90</MinVolume>
<MaxVolume>90</MaxVolume>​
</Row>

I tried it this way with no luck, and then I tried it based on the Firaxis XMLs, which don't use GameData. Instead it uses Script2DFile and AudioDefinesFile, which I set VFS to true on these XMLs (since they weren't GameData xmls), that didn't work, so I set them to false, didn't work...........then I removed those two and put everything back to the first way, and came here for help :D

ps: I added this into the same XML I have for the working soundtrack, and the soundtrack continued to play.....so it did accept the whole xml. Nothing was on the logs either to give me a clue.
 
For DOM audio, I think you have to use the following tag in the Civilizations table:

<DawnOfManAudio>AS2D_DOM_SPEECH_PIRATE</DawnOfManAudio>
 
For DOM audio, I think you have to use the following tag in the Civilizations table:

<DawnOfManAudio>AS2D_DOM_SPEECH_PIRATE</DawnOfManAudio>

Awesome! Just tried it, and that's the ticket!:goodjob:

EDIT: OMG its plastered all over the Civilizations' xml table data.......jeez, guess I just got stuck in one set of mind trying to get it in there....hahaha.........thanks Leugi
 
Following this guide, I managed to get the Peace and War music for my custom civ into the game. However, the Peace music doesn't play when starting a new game with that civ. It only appears when I encounter it as an opponent. How can I change this to work properly?

Edit: found it, had to reload the audio system.
 
How do you get Custom Music to work if it says:

<Type>LEADER_KINGDOM_OF_JERUSALEM_BALDWIN_IV</Type>

Because that is the only way my mod's civ will show up but the Custom Music won't work.
 
Hmn.... I suppose it has to be:

AS2D_LEADER_MUSIC_KINGDOM_OF_JERUSALEM_BALDWIN_IV_PEACE

If it doesn't work, I'd suggest changing the leader's type to LEADER_KINGDOMOFJERUSALEMBALDWINIV or LEADER_BALDWIN :p
 
Okay so, I have gotten the Custom Leader music working, but whenever I add <SoundtrackTag>Europe</SoundtrackTag>, the Custom Leader music stops working and there isn't any generic regional music. All that plays is the Title Screen music. Please help.
 
SoundtrackTags are linked to specific civs and not to continents (believe it or not), so there's not an Europe soundtrack, but rather a France, England, Spain, etc... soundtracks... So simply change it with any of them and done.
 
It still didn't work. This is what I have:
Spoiler :
Code:
<GameData>
	<Audio_Sounds>
		<Row>
			<SoundtrackTag>England</SoundtrackTag>
		</Row>
		<Row>
			<!--Baldwin IV Music-->
			<SoundID>SND_LEADER_MUSIC_BALDWIN_IV_PEACE</SoundID>
			<FileName>BaldwinIVPeace</FileName>
			<LoadType>DynamicResident</LoadType>
		</Row>
		<Row>
			<SoundID>SND_LEADER_MUSIC_BALDWIN_IV_WAR</SoundID>
			<FileName>BaldwinIVWar</FileName>
			<LoadType>DynamicResident</LoadType>
		</Row>
		<!--Baldwin IV Music-->
	</Audio_Sounds>
	<Audio_2DSounds>
		<!--Baldwin IV Music For Audio Script-->
		<Row>
			<ScriptID>AS2D_LEADER_MUSIC_BALDWIN_IV_PEACE</ScriptID>
			<SoundID>SND_LEADER_MUSIC_BALDWIN_IV_PEACE</SoundID>
			<SoundType>GAME_MUSIC</SoundType>
			<MinVolume>80</MinVolume>
			<MaxVolume>80</MaxVolume>
			<IsMusic>true</IsMusic>
		</Row>
		<Row>
			<ScriptID>AS2D_LEADER_MUSIC_BALDWIN_IV_WAR</ScriptID>
			<SoundID>SND_LEADER_MUSIC_BALDWIN_IV_WAR</SoundID>
			<SoundType>GAME_MUSIC</SoundType>
			<MinVolume>80</MinVolume>
			<MaxVolume>80</MaxVolume>
			<IsMusic>true</IsMusic>
		</Row>
	</Audio_2DSounds>
</GameData>
 
I'm having a problem adding new tracks, they just don't play during game

My leader has a long name (so lots of _) but I think it could be because I want to use prexisting tracks:

Code:
<GameData>
	<Audio_2DSounds>
		<Row>
			<ScriptID>AS2D_LEADER_MUSIC_PRITHVI_NARAYAN_SHAH_PEACE</ScriptID>
			<SoundID>SND_ASIA_PEACE_2</SoundID>
			<SoundType>GAME_MUSIC</SoundType>
			<MinVolume>120</MinVolume>
			<MaxVolume>120</MaxVolume>
			<IsMusic>true</IsMusic>
		</Row>
		<Row>
			<ScriptID>AS2D_LEADER_MUSIC_PRITHVI_NARAYAN_SHAH_WAR</ScriptID>
			<SoundID>SND_ASIA_EITHER_18</SoundID>
			<SoundType>GAME_MUSIC</SoundType>
			<MinVolume>120</MinVolume>
			<MaxVolume>120</MaxVolume>
			<IsMusic>true</IsMusic>
		</Row>
	</Audio_2DSounds>  
</GameData>

or that the xml is loaded in the wrong order, I have my audio file loading after the leaderhead file, though I presume that is how it should be done.

Do you know what the problem is here?
 
@Aidence: Yeah, the SoundtrackTag has to go in the Civilizations table, where you defined CIVILIZATION_etc.

@j_mie6: Everything seems to be in order... have you reloaded the Audio System?
 
ah.. nope :p

edit: right so it works fine now, but when you enter the diplomacy screen the music plays but when ou leave the music carries on and doesn't stop, unlike other diplomacy tracks... any ideas?
 
I don't know what did I do wrong, I already set VFS = true on music files and even the xml file for music and update the database but it didn't work. the DOM, peace and war music. Help please. here is the link of the complete mod
 
Ok... I think the problem might be because you're adding the same thing twice...

in DawnofMan_Speech_AD.xml:

Code:
<Row>
				<SoundID>SND_DOM_SPEECH_PHILIPPINES</SoundID>
				<Filename>philippines.mp3</Filename>
				<LoadType>DYNAMIC_RES</LoadType>
			</Row>

And on PhilCivMusic.xml

Code:
<Row>
			<SoundID>SND_DOM_SPEECH_PHILIPPINES</SoundID>
			<Filename>philippines.mp3</Filename>
			<LoadType>DynamicResident</LoadType>
		</Row>

So... its possible that because of that the Database is getting awry and not loading both files. Try removing all the DOM instances in your PhilMusic xml thing.
 
Hey leugi, quick question: followed this tutorial and your other one about creating a custom soundtrack but my music isn't showing up... :sad:
Trying to make custom music for a new zapotec civ with LEADER_ZAACHILA, and based on your code this is what I have:
Code:
<GameData>
	<Audio_Sounds>
		<Row>
			<SoundID>SND_LEADER_MUSIC_ZAACHILA_PEACE</SoundID>
			<Filename>ZapotecPeace.mp3</Filename>
			<LoadType>DynamicResident</LoadType>
		</Row>-<Row>
			<SoundID>SND_LEADER_MUSIC_ZAACHILA_WAR</SoundID>
			<Filename>ZapotecWar.mp3</Filename>
			<LoadType>DynamicResident</LoadType>
		</Row>
	</Audio_Sounds>-<Audio_2DSounds>
		<Row>
			<ScriptID>AS2D_LEADER_MUSIC_ZAACHILA_PEACE</ScriptID>
			<SoundID>SND_LEADER_MUSIC_ZAACHILA_PEACE</SoundID>
			<SoundType>GAME_MUSIC</SoundType>
			<MinVolume>60</MinVolume>
			<MaxVolume>60</MaxVolume>
			<IsMusic>true</IsMusic>
		</Row>-<Row>
			<ScriptID>AS2D_LEADER_MUSIC_ZAACHILA_WAR</ScriptID>
			<SoundID>SND_LEADER_MUSIC_LAUTARO_WAR</SoundID>
			<SoundType>GAME_MUSIC</SoundType>
			<MinVolume>60</MinVolume>
			<MaxVolume>60</MaxVolume>
			<IsMusic>true</IsMusic>
		</Row>-<Row>
			<ScriptID>AS2D_AMBIENCE_LEADER_ZAACHILA_AMBIENCE</ScriptID>
			<SoundID>SND_AMBIENCE_FOG_OF_WAR_BED</SoundID>
			<SoundType>GAME_SFX</SoundType>
			<Looping>true</Looping>
			<MinVolume>60</MinVolume>
			<MaxVolume>60</MaxVolume>
		</Row>
	</Audio_2DSounds>
</GameData>
But the music doesn't show up; the game just keeps playing the loading music.
So a couple of questions:
1) You can use .mp3 files, correct? And they need to be VFS=true and the audio defines file should be VFS=false with an UpdateDatabase entry, right? Because that's what I have.

2) I noticed in your own Israel mod that you don't actually include the <Audio_Sounds> and <Audio_2DSounds> (or whatever it is) tags, and instead use <SoundData> and <Script2DSound>
tags. Is that my problem?
(and you may have updated your Israel mod several times by now; I downloaded it a while ago (v3)

3) Maybe a stupid question, but is this tutorial compatible with both G&K and BNW?
 
Top Bottom