Yes, I have discovered a fancy (and quite funny) way of achieving this.
So, let's say you have a custom mod with a new leader, or are making a mod with a new leader. The first sad thing you'll notice, is that once you change the leader of a civilization, they lose their Leader Music. And thus when you meet them for the first time, its quite anticlimatic... And thus when you start playing with them, it feels odd...
A way for solving this is replacing your leader with, say, Napoleon. That way you get Napoleon's music for free... Well, not for free, Napoleon no loger exists in your game. So this method has a huge price to pay.
I have found a new way of achieving this, which sadly isn't completelly modular (this is our price, but honestly, its a small price in comparison to losing a whole civ), but works out nicely.
Use any custom civ you wish. For this example I'll use my Qullana Civ Mod, which adds Tupac Katari as a Leader (why?, because it will be a nice example of using Leader music and Game music for your Leader), don't worry, I'm not forcing you to download anything
, you can use these same stuff with any modded civ.
Tools you need
Step One: What is the name of our Leader?
So of course, we need to know the Leader Type from our leader. Its usually defined on a xml. Pretty much the bolded blue part is what we need:
So, our leader's type is LEADER_KATARI... We'll need this for the last magic step.
Step 2: Understanding the Audio Defines
Well, we got our leader type. Now we must check something interesting. Go to your Civilization folder, and search the Assets folder.
You'll be faced with this:
If you search there, you will find the following code lines:
So, there's where Leader Music is defined, with an ScriptID... If you open the AlexanderAudioDefines.xml you'll finde the SoundID which is being referenced, with the proper file being referenced.
We'll copy the code we have found. I will not tell you where to paste it yet
Step 3: Search for your favorite music inside the game folders
Well, in the Sounds folder, you will also find a "Streamed" folder. Open it and then open the "Music" Folder.
There you will find all (Non-expansion and non-dlc) music. From Ingame to Leader Music. If you also want to check Expansion or DLC music, go back to the Assets folder, and search the DLC folder... Take your pick on which DLC folder to chekc (or better the Expansion folder) and search for Sounds and all that again.
Search for a suitable Peace Music and for a nice War Music.
In this case, we'll use Jach's_Marka.ogg from the "Assets\Sounds\Streamed\Music\America\Peace" folder for Peace
And for War we'll use Pacal_War.ogg from "assets\DLC\Expansion\Sounds\Streamed\Music\Leader Music" folder for War
Step 4:Search for the right Audio Defines
So, we know which music we want, and we know where to find *.*AudioDefines.xml ... You must search inside your assets folder where the right music is being defined.
A good way of doing that is using the Search function, searching inside the files. You must put the file name without the extension (".ogg") since the Audio Defines don't use it. In my case these are the files I need:
Open them and search where the music is being defined. Like this:
Copy both SoundID's, as we'll need them for the next step
Step 5: Funky Magic!
So, this is the fun part, the part which makes no sense at first, but then helps you understand well.
Before proceeding, you must realize which music you're using. I'm using a music from the core game, and an expansion music. This is important, because if we modify a file from before the expansion, we won't make it in.
You must open any *2DAudioScripts.xml file you find, it is better if you open generic ones, so you'll know where to change them later one. Since we are using a music from the expansion, we'll open Audio2DScriptsExpansion1.xml from "assets\DLC\Expansion\Sounds\XML"
You must search where the <Script2DSounds> bracket is opened (in some cases there are few things before it):
After that <Script2DSounds>, we'll paste our defining from Alexander:
We'll change the Comment "--Alexander Music--" to whatever we want, so we remember where we are adding this, in my case "--Tupac Katari Music--"... And then...
Check the ScriptID, right now it says "AS2D_LEADER_MUSIC_ALEXANDER_PEACE"... well, our leader type is "LEADER_KATARI", so we'll change that to "AS2D_LEADER_MUSIC_KATARI_PEACE"...
Why? Because that's our magical step... It doesn't even make much sense, since its not even the same define, but it seems that whatever script Firaxis made for defining Leader^Music it transforms the define automatically. We'll do the same with the War thing.
Note we didn't change the SoundID just yet... That's where we'll put our new lovely music! So, now we change it with the SoundIDs we found...
And there you have it...
Step 6: Test!
Well, test your fancy modification, and... Rejoice! It works! (note: if it didn't work, check back your steps and rejoice afterwards once it works)
Also, for the next times you do this, you're free to skip certain steps, since what matters is the xml part of the end.
Important Questions
Why isn't this modular? Couldn't you just put an .xml with the same structure as the 2DAudioScripts?
Well, I tried... Theoretically it should work, however it doesn't. I suppose one needs a different action than "OnModActivated - UpdateDatabase" on ModBuddy... But I don't know which one would work. Until anyone discovers that, this is not really that modular... Not that it affects however, since the modification won't break anything when the mod isn't loaded.
Would this allow us to have our custom leader music for a custom leader?
Yes! Follow this tutorial to manage that!
Anyway, any other questions will be answered, thank you.
So, let's say you have a custom mod with a new leader, or are making a mod with a new leader. The first sad thing you'll notice, is that once you change the leader of a civilization, they lose their Leader Music. And thus when you meet them for the first time, its quite anticlimatic... And thus when you start playing with them, it feels odd...
A way for solving this is replacing your leader with, say, Napoleon. That way you get Napoleon's music for free... Well, not for free, Napoleon no loger exists in your game. So this method has a huge price to pay.
I have found a new way of achieving this, which sadly isn't completelly modular (this is our price, but honestly, its a small price in comparison to losing a whole civ), but works out nicely.
Use any custom civ you wish. For this example I'll use my Qullana Civ Mod, which adds Tupac Katari as a Leader (why?, because it will be a nice example of using Leader music and Game music for your Leader), don't worry, I'm not forcing you to download anything

Tools you need
- Something to open .ogg music files, I heavily reccomend VLC media player
- Something to work in .xml files, though you can use notepad for that, its up to you
Step One: What is the name of our Leader?
So of course, we need to know the Leader Type from our leader. Its usually defined on a xml. Pretty much the bolded blue part is what we need:
Code:
<GameData>
<Leaders>
<Row>
[B][COLOR="Navy"]<Type>LEADER_KATARI</Type>[/COLOR][/B]
<Description>TXT_KEY_LEADER_KATARI</Description>
<Civilopedia>TXT_KEY_LEADER_KATARI_PEDIA</Civilopedia>
<CivilopediaTag>TXT_KEY_CIVILOPEDIA_LEADER_KATARI</CivilopediaTag>
<ArtDefineTag>Katari_Scene.xml</ArtDefineTag>
<VictoryCompetitiveness>5</VictoryCompetitiveness>
<WonderCompetitiveness>3</WonderCompetitiveness>
<MinorCivCompetitiveness>9</MinorCivCompetitiveness>
<Boldness>10</Boldness>
<DiploBalance>3</DiploBalance>
<WarmongerHate>10</WarmongerHate>
<DenounceWillingness>10</DenounceWillingness>
<DoFWillingness>6</DoFWillingness>
<Loyalty>8</Loyalty>
<Neediness>10</Neediness>
<Forgiveness>1</Forgiveness>
<Chattiness>10</Chattiness>
<Meanness>3</Meanness>
<PortraitIndex>1</PortraitIndex>
<IconAtlas>CIV_COLOR_ATLAS_QULLANA</IconAtlas>
</Row>
............
..............
..............
So, our leader's type is LEADER_KATARI... We'll need this for the last magic step.
Step 2: Understanding the Audio Defines
Well, we got our leader type. Now we must check something interesting. Go to your Civilization folder, and search the Assets folder.
-Inside the Assets Folder, search for the Sounds Folder
Inside the Sounds Folder, search for the XML folder
And inside the XML Folder, open any xml file which ends with "2DScripts.xml". In this case I'll open up Alexander
You'll be faced with this:
Code:
<Script2DFile>
<Script2DSounds>
<!--Alexander Leader Speech-->
<Script2DSound>
<ScriptID>AS2D_LEADER_SPEECH_ALEXANDER_ATTACKED</ScriptID>
<SoundID>SND_LEADER_SPEECH_ALEXANDER_ATTACKED</SoundID>
<iMaxVolume>95</iMaxVolume>
<iMinVolume>95</iMinVolume>
<fTaperSoundtrackVolume>0.85</fTaperSoundtrackVolume>
<SoundType>GAME_SPEECH</SoundType>
</Script2DSound>
<Script2DSound>
<ScriptID>AS2D_LEADER_SPEECH_ALEXANDER_DECLARE_WAR</ScriptID>
<SoundID>SND_LEADER_SPEECH_ALEXANDER_DECLARE_WAR</SoundID>
<iMaxVolume>95</iMaxVolume>
<iMinVolume>95</iMinVolume>
<fTaperSoundtrackVolume>0.85</fTaperSoundtrackVolume>
<SoundType>GAME_SPEECH</SoundType>
</Script2DSound>
...............
..........
..........
If you search there, you will find the following code lines:
Code:
<!--Alexander Music-->
<Script2DSound>
<ScriptID>AS2D_LEADER_MUSIC_ALEXANDER_PEACE</ScriptID>
<SoundID>SND_LEADER_MUSIC_ALEXANDER_PEACE</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMaxVolume>40</iMaxVolume>
<iMinVolume>40</iMinVolume>
<bIsMusic>True</bIsMusic>
</Script2DSound>
<Script2DSound>
<ScriptID>AS2D_LEADER_MUSIC_ALEXANDER_WAR</ScriptID>
<SoundID>SND_LEADER_MUSIC_ALEXANDER_WAR</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMaxVolume>40</iMaxVolume>
<iMinVolume>40</iMinVolume>
<bIsMusic>True</bIsMusic>
</Script2DSound>
So, there's where Leader Music is defined, with an ScriptID... If you open the AlexanderAudioDefines.xml you'll finde the SoundID which is being referenced, with the proper file being referenced.
We'll copy the code we have found. I will not tell you where to paste it yet

Step 3: Search for your favorite music inside the game folders
Well, in the Sounds folder, you will also find a "Streamed" folder. Open it and then open the "Music" Folder.
There you will find all (Non-expansion and non-dlc) music. From Ingame to Leader Music. If you also want to check Expansion or DLC music, go back to the Assets folder, and search the DLC folder... Take your pick on which DLC folder to chekc (or better the Expansion folder) and search for Sounds and all that again.
Search for a suitable Peace Music and for a nice War Music.
In this case, we'll use Jach's_Marka.ogg from the "Assets\Sounds\Streamed\Music\America\Peace" folder for Peace
And for War we'll use Pacal_War.ogg from "assets\DLC\Expansion\Sounds\Streamed\Music\Leader Music" folder for War
Step 4:Search for the right Audio Defines
So, we know which music we want, and we know where to find *.*AudioDefines.xml ... You must search inside your assets folder where the right music is being defined.
A good way of doing that is using the Search function, searching inside the files. You must put the file name without the extension (".ogg") since the Audio Defines don't use it. In my case these are the files I need:
- For Jach'sMarka, its AmericaRegionAudioDefines.xml in "assets\Sounds\XML"
- For Pacal_War, its PacalAudioDefines.xml in "assets\DLC\Expansion\Sounds\XML"
Open them and search where the music is being defined. Like this:
Code:
...
<SoundData>
[B][COLOR="Navy"]<SoundID>SND_AMERICAREGIONS_PEACE_24</SoundID>[/B][/COLOR]
<Filename>Jach's_Marka</Filename>
<LoadType>STREAMED</LoadType>
</SoundData>
...
Code:
...
<SoundData>
[B][COLOR="Navy"]<SoundID>SND_LEADER_MUSIC_PACAL_WAR</SoundID>[/B][/COLOR]
<Filename>Pacal_War</Filename>
<bDontCache/>
<LoadType>STREAMED</LoadType>
</SoundData>
...
Copy both SoundID's, as we'll need them for the next step
Step 5: Funky Magic!
So, this is the fun part, the part which makes no sense at first, but then helps you understand well.
Before proceeding, you must realize which music you're using. I'm using a music from the core game, and an expansion music. This is important, because if we modify a file from before the expansion, we won't make it in.
You must open any *2DAudioScripts.xml file you find, it is better if you open generic ones, so you'll know where to change them later one. Since we are using a music from the expansion, we'll open Audio2DScriptsExpansion1.xml from "assets\DLC\Expansion\Sounds\XML"
You must search where the <Script2DSounds> bracket is opened (in some cases there are few things before it):
Code:
<Script2DFile>
<Script2DSounds>
...
....
After that <Script2DSounds>, we'll paste our defining from Alexander:
Code:
<Script2DFile>
<Script2DSounds>
[B][COLOR="Navy"]<!--Alexander Music-->
<Script2DSound>
<ScriptID>AS2D_LEADER_MUSIC_ALEXANDER_PEACE</ScriptID>
<SoundID>SND_LEADER_MUSIC_ALEXANDER_PEACE</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMaxVolume>40</iMaxVolume>
<iMinVolume>40</iMinVolume>
<bIsMusic>True</bIsMusic>
</Script2DSound>
<Script2DSound>
<ScriptID>AS2D_LEADER_MUSIC_ALEXANDER_WAR</ScriptID>
<SoundID>SND_LEADER_MUSIC_ALEXANDER_WAR</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMaxVolume>40</iMaxVolume>
<iMinVolume>40</iMinVolume>
<bIsMusic>True</bIsMusic>
</Script2DSound>[/B][/COLOR]
We'll change the Comment "--Alexander Music--" to whatever we want, so we remember where we are adding this, in my case "--Tupac Katari Music--"... And then...
Check the ScriptID, right now it says "AS2D_LEADER_MUSIC_ALEXANDER_PEACE"... well, our leader type is "LEADER_KATARI", so we'll change that to "AS2D_LEADER_MUSIC_KATARI_PEACE"...
Why? Because that's our magical step... It doesn't even make much sense, since its not even the same define, but it seems that whatever script Firaxis made for defining Leader^Music it transforms the define automatically. We'll do the same with the War thing.
Code:
<!--Tupac Katari Music-->
<Script2DSound>
[B][COLOR="Navy"]<ScriptID>AS2D_LEADER_MUSIC_KATARI_PEACE</ScriptID>[/B][/COLOR]
<SoundID>SND_LEADER_MUSIC_ALEXANDER_PEACE</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMaxVolume>40</iMaxVolume>
<iMinVolume>40</iMinVolume>
<bIsMusic>True</bIsMusic>
</Script2DSound>
<Script2DSound>
[B][COLOR="Navy"]<ScriptID>AS2D_LEADER_MUSIC_KATARI_WAR</ScriptID>[/B][/COLOR]
<SoundID>SND_LEADER_MUSIC_ALEXANDER_WAR</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMaxVolume>40</iMaxVolume>
<iMinVolume>40</iMinVolume>
<bIsMusic>True</bIsMusic>
</Script2DSound>
Note we didn't change the SoundID just yet... That's where we'll put our new lovely music! So, now we change it with the SoundIDs we found...
Code:
<!--Tupac Katari Music-->
<Script2DSound>
<ScriptID>AS2D_LEADER_MUSIC_KATARI_PEACE</ScriptID>
[B][COLOR="Navy"]<SoundID>SND_AMERICAREGIONS_PEACE_24</SoundID>[/B][/COLOR]
<SoundType>GAME_MUSIC</SoundType>
<iMaxVolume>40</iMaxVolume>
<iMinVolume>40</iMinVolume>
<bIsMusic>True</bIsMusic>
</Script2DSound>
<Script2DSound>
<ScriptID>AS2D_LEADER_MUSIC_KATARI_WAR</ScriptID>
[B][COLOR="Navy"]<SoundID>SND_LEADER_MUSIC_PACAL_WAR</SoundID>[/B][/COLOR]
<SoundType>GAME_MUSIC</SoundType>
<iMaxVolume>40</iMaxVolume>
<iMinVolume>40</iMinVolume>
<bIsMusic>True</bIsMusic>
</Script2DSound>
And there you have it...
Step 6: Test!
Well, test your fancy modification, and... Rejoice! It works! (note: if it didn't work, check back your steps and rejoice afterwards once it works)
Also, for the next times you do this, you're free to skip certain steps, since what matters is the xml part of the end.
Important Questions
Why isn't this modular? Couldn't you just put an .xml with the same structure as the 2DAudioScripts?
Well, I tried... Theoretically it should work, however it doesn't. I suppose one needs a different action than "OnModActivated - UpdateDatabase" on ModBuddy... But I don't know which one would work. Until anyone discovers that, this is not really that modular... Not that it affects however, since the modification won't break anything when the mod isn't loaded.
Would this allow us to have our custom leader music for a custom leader?
Yes! Follow this tutorial to manage that!
Anyway, any other questions will be answered, thank you.