Alrighteous, after playing a bit with the SoundDefines and SoundScripts in the Assets folder, I discovered a way both for modifying an existing soundtrack (without simply replacing the ogg's) and even to creating a new soundtrack (following this tutorial.)... Only problem, as with adding Leader Music, is that it's not 100% modular and you'll need to edit files on the core folder... Good news is that changing a soundtrack is most of the times a very personal decision, so it'll not hurt so much...
This tutorial assumes you got some basic modding knowledge, and now how to use ModBuddy and edit an xml. If you don't know this, I'd suggest Kael's guide. Please, also note that while this tutorial may look really long, it is only because it is very descriptive, the process itself is quite fast really...
We're understanding "Soundtracks" as the generic regional music that plays once you're playing the game, that doesn't depend on the leader. This one can be defined for all civs through a <SoundtrackTag>, so that will be our Step 0
Tools you'll need
So, whether it's for an existant civ or for a custom one, you'll want to check which Soundtrack is the Civ using... Mostly because you'll lilkely not want to change about 20 xml's for each Civ that follows the same regional music anyway...
In the case of core Civilizations, they automatically get a soundtrack defined with the name of the Civilization, so, America already has "AMERICA"'s soundtrack, and The Iroquois, have an "IROQUOIS" soundtrack, and The Inca, get an "INCA" soundtrack... Problem is, both the Iriquois and the Inca pretty much use the same music, so if we wanted to add a new Native American music, we'd have to change the Inca, the Iriquois, the Maya and the Aztecs... (you can do that BTW, I just don't reccomend it because I'm lazy)
Since we don't want to do that, we'll only change the Iroquois. So, if you ever play with the Inca, you'll have to add this bolded thing to their Civilization xml:
There, the Inca will now play the Iroquois music... Now we can actually start...
.........
So, let's see... There are 3 things you'll want to do when editing a Soundtrack: Remove an annoying music, modify or replace a music, and add music...We shall cover remove and adding music (to replace, you may simply replace the music file on the core folders with a music of the same name, so it is not necessary to write it up so much)...
Removing Music from a Soundtrack.
Step 1: Locate the Evil Music
So, because of the many music bugs ingame (specially during war time, when the diplo screen shows up the music restarts), I finally got tired of one little music that tends to play all the time for Native American Civs when at war... In order to know which one it is, we must go to the following folder (since G&K didn't add any new Soundtrack, this works all the same for Vanilla and the Expansion):
(Installation Folder)\Assets\Sounds\Streamed\Music\...
On that folder, there are also folders for each Region (America, Europe, Asia, Middle East)... So let's enter the America's Folder... And there you will find a Peace folder, an "Either" folder, and a War folder... Of course, Peace music plays when you're at peace, War when you're at war, and Either in both circumstances... So I searched both under Either and War, playing all of them, and found it under Either: ColdMenace.ogg
So, I want to get rid of this ColdMenace!
Step 2: Getting rid of the Menace!
Now, what matters... You'll want to find where this menace is defined... For any case, follow the following folder: (Civ's Installation)\Assets\Sounds\XML\... And there you may open any of these files:
In our case, we'll open AmericaRegionsAudioDefines.xml... You'll see a lot of <SoundData> tags and stuff... Search your menace file name (without the extension), so ColdMenace... And there it is:
So, our evil SoundID is SND_AMERICAREGIONS_EITHER_4, you ought to remember which SoundID you need to destroy!... There's no need to delete it, and that could generate troubles for the other soundtracks, so let's focus on the next step.
Step 3: Destroying the Menace!
Now, we decided we'd only change the Iroquois soundtrack, so we'll search for it... On the same folder you found the last .xml, search for your right file... In my case: "IroquoisAudio2DScripts.xml".
Open that xml, and search for the Evil SoundID (SND_AMERICAREGIONS_EITHER_4)... And there it is... (note that, since it is an Either theme, it will be defined both as a Peace and as a War music)
So, please, don't simply delete them directly! ... As you may have noticed, the ScriptID's got a numeration, and quite sadly our example isn't the last number... so, we'll do a fancy trick there... It doesn't mtter if WAR_25 is just before WAR_26, what matters is that it exists... First, to destroy the evil Script, let's comment it out (since we may want to revert the process sooner or later, we'll not actually delete it):
And now, search for the last War Script2DSound... And make it be WAR_25... Like this:
And there... Play, and enjoy a new world rid of the Cold Menace!
Adding Music to a Soundtrack!
Step 1: VFS'ing your new Music
So, let's say you have found a new music to add to the Native American generic music, just because you really like that music... You can use both MP3 and Ogg formats, so don't worry too much about it.
The first thing you'll need to do is making a Mod file for your music, so, open up your Mod Buddy and add your new music file... Don't forget to set it VFS=True or you'll suffer a lot...
Make sure the file name doesn't hace any empty spaces... In my case I'll just call it "NewMusic.mp3"
Step 2: Creating a new AudioDefine
So, now let's define our new music... We're adding an "EITHER" music this time around, but you may add a War or a Peace music if you wish...
For any case, follow the following folder: (Civ's Installation)\Assets\Sounds\XML\... And there you may open any of these files:
Since we're adding a Native American music, let's open AmericaRegionsAudioDefines.xml, and right before the </SoundDatas> tag ends, let's add this code
You can name your SoundID whatever you wish, I just like following Firaxis' patterns. Save it, and your sound is defined! But it will not be used just yet.
Step 3: So 2Dscripts, play this music for me, will you?
Now, let's open the 2DScript file we need on the same folder, for the Soundtrack we want to change... In our case, the Iroquois, we shall open IroquoisAudio2DScripts.xml
Since we're adding an "Either" music we'll have to add a new script for both Peace and War situations... search for both the last PEACE and WAR Scripts, which in our case are the following
So, the numbering must flow... Add the following code, using the SoundID you defined after each case:
What is important here is that you DO follow the name and numbering for the ScriptID, that's how the game recognizes it's a music for the Iroquois. You may also like to change the Volume since your new music file doesn't likely have the same volume as Civ5 music... The <iPriority>1</iPriority> will make sure the new music is more likely to sound.
And now, enjoy your new music! (if you're lucky enough for it to play)
____________________________________
Important Questions
Can we create our own soundtracks with custom music with this method?
Yes, follow this tutorial.
Would we be able to mix and match European, American, Middle East and Asian music with this method?
Yes... It's what I do for this American soundtrack merging European and American music...
Why this isn't modular?
Quite sadly, there seems to be no way to simply adding a working SoundScript or SoundData tag through ModBuddy, nothing works so far... Therefore we only can edit core files for now...
This tutorial assumes you got some basic modding knowledge, and now how to use ModBuddy and edit an xml. If you don't know this, I'd suggest Kael's guide. Please, also note that while this tutorial may look really long, it is only because it is very descriptive, the process itself is quite fast really...
We're understanding "Soundtracks" as the generic regional music that plays once you're playing the game, that doesn't depend on the leader. This one can be defined for all civs through a <SoundtrackTag>, so that will be our Step 0
Tools you'll need
- Something to play .ogg files (I suggest VLC Media Player)
- Something to edit XML files. (you can use Notepad, but there are also nice and colorful options)
- ModBuddy.
So, whether it's for an existant civ or for a custom one, you'll want to check which Soundtrack is the Civ using... Mostly because you'll lilkely not want to change about 20 xml's for each Civ that follows the same regional music anyway...
In the case of core Civilizations, they automatically get a soundtrack defined with the name of the Civilization, so, America already has "AMERICA"'s soundtrack, and The Iroquois, have an "IROQUOIS" soundtrack, and The Inca, get an "INCA" soundtrack... Problem is, both the Iriquois and the Inca pretty much use the same music, so if we wanted to add a new Native American music, we'd have to change the Inca, the Iriquois, the Maya and the Aztecs... (you can do that BTW, I just don't reccomend it because I'm lazy)
Since we don't want to do that, we'll only change the Iroquois. So, if you ever play with the Inca, you'll have to add this bolded thing to their Civilization xml:
Code:
<Civilizations>
<Row>
<Type>CIVILIZATION_INCA</Type>
<Description>TXT_KEY_CIV_INCA_DESC</Description>
<ShortDescription>TXT_KEY_CIV_INCA_SHORT_DESC</ShortDescription>
<Adjective>TXT_KEY_CIV_INCA_ADJECTIVE</Adjective>
<CivilopediaTag>TXT_KEY_CIV5_INCA</CivilopediaTag>
<DefaultPlayerColor>PLAYERCOLOR_INCA</DefaultPlayerColor>
<ArtDefineTag>ART_DEF_CIVILIZATION_INCA</ArtDefineTag>
<ArtStyleType>ARTSTYLE_SOUTH_AMERICA</ArtStyleType>
<PortraitIndex>0</PortraitIndex>
<IconAtlas>PACHACUTI_CIV_COLOR_ATLAS</IconAtlas>
<AlphaIconAtlas>PACHACUTI_CIV_ALPHA_ATLAS</AlphaIconAtlas>
<MapImage>MapInca360x410.dds</MapImage>
<ArtStyleSuffix>_AMER</ArtStyleSuffix>
<ArtStylePrefix>AMERICAN </ArtStylePrefix>
<DawnOfManQuote>TXT_KEY_CIV5_DAWN_INCA_TEXT</DawnOfManQuote>
<DawnOfManImage>DOM_Pachacuti.dds</DawnOfManImage>
<DawnOfManAudio>AS2D_DOM_SPEECH_INCA</DawnOfManAudio>
[B]<SoundtrackTag>Iroquois</SoundtrackTag>[/B]
</Row>
...
There, the Inca will now play the Iroquois music... Now we can actually start...
.........
So, let's see... There are 3 things you'll want to do when editing a Soundtrack: Remove an annoying music, modify or replace a music, and add music...We shall cover remove and adding music (to replace, you may simply replace the music file on the core folders with a music of the same name, so it is not necessary to write it up so much)...
Removing Music from a Soundtrack.
Step 1: Locate the Evil Music
So, because of the many music bugs ingame (specially during war time, when the diplo screen shows up the music restarts), I finally got tired of one little music that tends to play all the time for Native American Civs when at war... In order to know which one it is, we must go to the following folder (since G&K didn't add any new Soundtrack, this works all the same for Vanilla and the Expansion):
(Installation Folder)\Assets\Sounds\Streamed\Music\...
On that folder, there are also folders for each Region (America, Europe, Asia, Middle East)... So let's enter the America's Folder... And there you will find a Peace folder, an "Either" folder, and a War folder... Of course, Peace music plays when you're at peace, War when you're at war, and Either in both circumstances... So I searched both under Either and War, playing all of them, and found it under Either: ColdMenace.ogg
So, I want to get rid of this ColdMenace!
Step 2: Getting rid of the Menace!
Now, what matters... You'll want to find where this menace is defined... For any case, follow the following folder: (Civ's Installation)\Assets\Sounds\XML\... And there you may open any of these files:
- AmericaRegionsAudioDefines.xml (for Native American music)
- EuropeAudioDefines.xml (For European music)
- AsiaAudioDefines.xml (For Asian music)
- MiddleEastAfricaAudioDefines.xml (For Middle East and African music)
In our case, we'll open AmericaRegionsAudioDefines.xml... You'll see a lot of <SoundData> tags and stuff... Search your menace file name (without the extension), so ColdMenace... And there it is:
Code:
...
<SoundData>
<SoundID>SND_AMERICAREGIONS_EITHER_4</SoundID>
<Filename>ColdMenace</Filename>
<LoadType>STREAMED</LoadType>
</SoundData>
...
So, our evil SoundID is SND_AMERICAREGIONS_EITHER_4, you ought to remember which SoundID you need to destroy!... There's no need to delete it, and that could generate troubles for the other soundtracks, so let's focus on the next step.
Step 3: Destroying the Menace!
Now, we decided we'd only change the Iroquois soundtrack, so we'll search for it... On the same folder you found the last .xml, search for your right file... In my case: "IroquoisAudio2DScripts.xml".
Open that xml, and search for the Evil SoundID (SND_AMERICAREGIONS_EITHER_4)... And there it is... (note that, since it is an Either theme, it will be defined both as a Peace and as a War music)
Code:
...
<Script2DSound>
<ScriptID>SONG_IROQUOIS_PEACE_19</ScriptID>
<SoundID>SND_AMERICAREGIONS_EITHER_4</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMinVolume>40</iMinVolume>
<iMaxVolume>40</iMaxVolume>
<bIsMusic>True</bIsMusic>
</Script2DSound>
...
and also...
...
<Script2DSound>
<ScriptID>SONG_IROQUOIS_WAR_25</ScriptID>
<SoundID>SND_AMERICAREGIONS_EITHER_4</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMinVolume>40</iMinVolume>
<iMaxVolume>40</iMaxVolume>
<bIsMusic>True</bIsMusic>
</Script2DSound>
So, please, don't simply delete them directly! ... As you may have noticed, the ScriptID's got a numeration, and quite sadly our example isn't the last number... so, we'll do a fancy trick there... It doesn't mtter if WAR_25 is just before WAR_26, what matters is that it exists... First, to destroy the evil Script, let's comment it out (since we may want to revert the process sooner or later, we'll not actually delete it):
Code:
<!-- <Script2DSound>
<ScriptID>SONG_IROQUOIS_WAR_25</ScriptID>
<SoundID>SND_AMERICAREGIONS_EITHER_4</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMinVolume>40</iMinVolume>
<iMaxVolume>40</iMaxVolume>
<bIsMusic>True</bIsMusic>
</Script2DSound> -->
And now, search for the last War Script2DSound... And make it be WAR_25... Like this:
Code:
<Script2DSound>
<ScriptID>SONG_IROQUOIS_WAR_[B]25[/B]</ScriptID>
<SoundID>SND_AMERICAREGIONS_WAR_24</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMinVolume>40</iMinVolume>
<iMaxVolume>40</iMaxVolume>
<bIsMusic>True</bIsMusic>
</Script2DSound>
And there... Play, and enjoy a new world rid of the Cold Menace!
Adding Music to a Soundtrack!
Step 1: VFS'ing your new Music
So, let's say you have found a new music to add to the Native American generic music, just because you really like that music... You can use both MP3 and Ogg formats, so don't worry too much about it.
The first thing you'll need to do is making a Mod file for your music, so, open up your Mod Buddy and add your new music file... Don't forget to set it VFS=True or you'll suffer a lot...
Make sure the file name doesn't hace any empty spaces... In my case I'll just call it "NewMusic.mp3"
Step 2: Creating a new AudioDefine
So, now let's define our new music... We're adding an "EITHER" music this time around, but you may add a War or a Peace music if you wish...
For any case, follow the following folder: (Civ's Installation)\Assets\Sounds\XML\... And there you may open any of these files:
- AmericaRegionsAudioDefines.xml (for Native American music)
- EuropeAudioDefines.xml (For European music)
- AsiaAudioDefines.xml (For Asian music)
- MiddleEastAfricaAudioDefines.xml (For Middle East and African music)
Since we're adding a Native American music, let's open AmericaRegionsAudioDefines.xml, and right before the </SoundDatas> tag ends, let's add this code
Code:
<SoundData>
<SoundID>SND_AMERICAREGIONS_EITHER_24</SoundID>
<Filename>NewMusic</Filename>
<LoadType>STREAMED</LoadType>
</SoundData
You can name your SoundID whatever you wish, I just like following Firaxis' patterns. Save it, and your sound is defined! But it will not be used just yet.
Step 3: So 2Dscripts, play this music for me, will you?
Now, let's open the 2DScript file we need on the same folder, for the Soundtrack we want to change... In our case, the Iroquois, we shall open IroquoisAudio2DScripts.xml
Since we're adding an "Either" music we'll have to add a new script for both Peace and War situations... search for both the last PEACE and WAR Scripts, which in our case are the following
Code:
<Script2DSound>
<ScriptID>SONG_IROQUOIS_PEACE_47</ScriptID>
<SoundID>SND_AMERICAREGIONS_PEACE_24</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMinVolume>40</iMinVolume>
<iMaxVolume>40</iMaxVolume>
<bIsMusic>True</bIsMusic>
</Script2DSound>
.................
<Script2DSound>
<ScriptID>SONG_IROQUOIS_WAR_47</ScriptID>
<SoundID>SND_AMERICAREGIONS_WAR_24</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMinVolume>40</iMinVolume>
<iMaxVolume>40</iMaxVolume>
<bIsMusic>True</bIsMusic>
</Script2DSound>
So, the numbering must flow... Add the following code, using the SoundID you defined after each case:
Code:
<Script2DSound>
<ScriptID>SONG_IROQUOIS_PEACE_47</ScriptID>
<SoundID>SND_AMERICAREGIONS_PEACE_24</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMinVolume>40</iMinVolume>
<iMaxVolume>40</iMaxVolume>
<bIsMusic>True</bIsMusic>
</Script2DSound>
[B] <Script2DSound>
<ScriptID>SONG_IROQUOIS_PEACE_47</ScriptID>
<SoundID>SND_AMERICAREGIONS_EITHER_24</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMinVolume>40</iMinVolume>
<iMaxVolume>40</iMaxVolume>
<bIsMusic>True</bIsMusic>
<iPriority>1</iPriority>
</Script2DSound>[/B]
.................
<Script2DSound>
<ScriptID>SONG_IROQUOIS_WAR_47</ScriptID>
<SoundID>SND_AMERICAREGIONS_WAR_24</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMinVolume>40</iMinVolume>
<iMaxVolume>40</iMaxVolume>
<bIsMusic>True</bIsMusic>
</Script2DSound>
[B] <Script2DSound>
<ScriptID>SONG_IROQUOIS_PEACE_47</ScriptID>
<SoundID>SND_AMERICAREGIONS_EITHER_24</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMinVolume>40</iMinVolume>
<iMaxVolume>40</iMaxVolume>
<bIsMusic>True</bIsMusic>
<iPriority>1</iPriority>
</Script2DSound>[/B]
What is important here is that you DO follow the name and numbering for the ScriptID, that's how the game recognizes it's a music for the Iroquois. You may also like to change the Volume since your new music file doesn't likely have the same volume as Civ5 music... The <iPriority>1</iPriority> will make sure the new music is more likely to sound.
And now, enjoy your new music! (if you're lucky enough for it to play)
____________________________________
Important Questions
Can we create our own soundtracks with custom music with this method?
Yes, follow this tutorial.
Would we be able to mix and match European, American, Middle East and Asian music with this method?
Yes... It's what I do for this American soundtrack merging European and American music...
Why this isn't modular?
Quite sadly, there seems to be no way to simply adding a working SoundScript or SoundData tag through ModBuddy, nothing works so far... Therefore we only can edit core files for now...