Custom Music Track Question

bhinso

Warlord
Joined
Aug 13, 2005
Messages
132
Location
Lincolnshire, England
I've tried putting my own tracks in the music folder (eg where it says medieval/industrial etc etc), but it won't play my new tracks, only chooses the existing ones.
I appreciate I can select the 'use custom music folder' in the options menu to play my own tracks, but I think it would be cool to have my own tracks in the area where the music changes automatically as you change ages.

Does anyone know how to do this?
 
You'll need to edit the following xml files:
AudioDefines.xml - in Assets/XML/Audio
Audio2DScripts.xml -in Assets/XML/Audio
CIV4EraInfos.xml - in Assets/XML/GameInfo
and I think that's it.
Good luck!
 
Step 1: move your music to Civ
Copy your music files to the CustomAssets\sounds\soundtrack directory. They have to be in MP3 format (I think, at any rate WMA is no good).


Step 2: prepare your mod
If you haven’t already done so, copy the needed XMLs from Assets to CustomAssets:
(a) Audio2DScripts is copied from Assets\XML\Audio to CustomAssets\xml\audio
(b) AudioDefines is copied from Assets\XML\Audio to CustomAssets\xml\audio
(c) CIV4EraInfos is copied from Assets\XML\GameInfo to CustomAssets\xml\gameinfo


Step 3: introduce your music files to Civ
Open your CustomAssets AudioDefines file using Notebook. It should look like this:

Spoiler :
<?xml version="1.0"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Dean Ray Johnson (Firaxis Games) -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- AudioDefines -->
<AudioDefines xmlns="x-schema:AudioDefinesSchema.xml">
<SoundDatas>
<SoundData>
<SoundID>SND_ERROR</SoundID>
<Filename>Sounds/Error</Filename>
<LoadType>RESIDENT</LoadType>
<bIsCompressed>1</bIsCompressed>
<bInGeneric>1</bInGeneric>
</SoundData>


Now, copy and paste in this, replacing &#8220;Birdhouseinyoursoul&#8221; with the filename of the file you want to add:

Spoiler :
<SoundData>
<SoundID>SONG_BIRDHOUSEINYOURSOUL</SoundID>
<Filename>Sounds/Soundtrack/Birdhouseinyoursoul</Filename>
<LoadType>STREAMED</LoadType>
<bIsCompressed>1</bIsCompressed>
<bInGeneric>1</bInGeneric>
</SoundData>


So that the file now reads like this:

Spoiler :
<?xml version="1.0"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Dean Ray Johnson (Firaxis Games) -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- AudioDefines -->
<AudioDefines xmlns="x-schema:AudioDefinesSchema.xml">
<SoundDatas>
<SoundData>
<SoundID>SONG_BIRDHOUSEINYOURSOUL</SoundID>
<Filename>Sounds/Soundtrack/Birdhouseinyoursoul</Filename>
<LoadType>STREAMED</LoadType>
<bIsCompressed>1</bIsCompressed>
<bInGeneric>1</bInGeneric>
</SoundData>
<SoundData>
<SoundID>SND_ERROR</SoundID>
<Filename>Sounds/Error</Filename>
<LoadType>RESIDENT</LoadType>
<bIsCompressed>1</bIsCompressed>
<bInGeneric>1</bInGeneric>
</SoundData>



Repeat for each music file that you want to play.


Step 4: give your music files special Civ nicknames
Open your CustomAssets Audio2DScripts using Notebook. It should look like this:

Spoiler :
<?xml version="1.0"?>
<!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by Soren Johnson (Firaxis Games) -->
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Michael Curran (Firaxis Games) -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- 2D Sound Scripts -->
<Script2DSounds xmlns="x-schema:AudioScriptSchema.xml">
<Script2DSound>
<ScriptID>AS2D_ERROR</ScriptID>
<SoundID>SND_ERROR</SoundID>
<SoundType>GAME_SFX</SoundType>
<iMinVolume>80</iMinVolume>
<iMaxVolume>80</iMaxVolume>
<iPitchChangeDown>0</iPitchChangeDown>
<iPitchChangeUp>0</iPitchChangeUp>
<iMinLeftPan>-1</iMinLeftPan>
<iMaxLeftPan>-1</iMaxLeftPan>
<iMinRightPan>-1</iMinRightPan>
<iMaxRightPan>-1</iMaxRightPan>
<bLooping>0</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>
<iNotPlayPercent>0</iNotPlayPercent>
</Script2DSound>


Now copy and paste in this, again replacing &#8220;BIRDHOUSEINYOURSOUL&#8221; with the filename of the file you want to add:

Spoiler :
<Script2DSound>
<ScriptID>AS2D_BIRDHOUSEINYOURSOUL</ScriptID>
<SoundID>SONG_BIRDHOUSEINYOURSOUL</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMinVolume>80</iMinVolume>
<iMaxVolume>80</iMaxVolume>
<iPitchChangeDown>0</iPitchChangeDown>
<iPitchChangeUp>0</iPitchChangeUp>
<iMinLeftPan>-1</iMinLeftPan>
<iMaxLeftPan>-1</iMaxLeftPan>
<iMinRightPan>-1</iMinRightPan>
<iMaxRightPan>-1</iMaxRightPan>
<bLooping>0</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>
<iNotPlayPercent>0</iNotPlayPercent>
</Script2DSound>


So that the file now looks like this:

Spoiler :
<?xml version="1.0"?>
<!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by Soren Johnson (Firaxis Games) -->
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Michael Curran (Firaxis Games) -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- 2D Sound Scripts -->
<Script2DSounds xmlns="x-schema:AudioScriptSchema.xml">
<Script2DSound>
<ScriptID>AS2D_BIRDHOUSEINYOURSOUL</ScriptID>
<SoundID>SONG_BIRDHOUSEINYOURSOUL</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMinVolume>80</iMinVolume>
<iMaxVolume>80</iMaxVolume>
<iPitchChangeDown>0</iPitchChangeDown>
<iPitchChangeUp>0</iPitchChangeUp>
<iMinLeftPan>-1</iMinLeftPan>
<iMaxLeftPan>-1</iMaxLeftPan>
<iMinRightPan>-1</iMinRightPan>
<iMaxRightPan>-1</iMaxRightPan>
<bLooping>0</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>
<iNotPlayPercent>0</iNotPlayPercent>
</Script2DSound>
<Script2DSound>
<ScriptID>AS2D_ERROR</ScriptID>
<SoundID>SND_ERROR</SoundID>
<SoundType>GAME_SFX</SoundType>
<iMinVolume>80</iMinVolume>
<iMaxVolume>80</iMaxVolume>
<iPitchChangeDown>0</iPitchChangeDown>
<iPitchChangeUp>0</iPitchChangeUp>
<iMinLeftPan>-1</iMinLeftPan>
<iMaxLeftPan>-1</iMaxLeftPan>
<iMinRightPan>-1</iMinRightPan>
<iMaxRightPan>-1</iMaxRightPan>
<bLooping>0</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>
<iNotPlayPercent>0</iNotPlayPercent>
</Script2DSound>


Repeat for each music file that you want to play.


Step 5: tell Civ which music files get played during which eras
Open your CustomAssets CIV4EraInfos using Notebook. Focus in on the era to which you want to add a music file. For example, the relevant section of the Ancient era looks like this:

Spoiler :
<EraInfoSoundtracks>
<EraInfoSoundtrack>AS2D_ANCIENT_SOUNDTRACK_1</EraInfoSoundtrack>
<EraInfoSoundtrack>AS2D_ANCIENT_SOUNDTRACK_2</EraInfoSoundtrack>
<EraInfoSoundtrack>AS2D_ANCIENT_SOUNDTRACK_3</EraInfoSoundtrack>
<EraInfoSoundtrack>AS2D_ANCIENT_SOUNDTRACK_4</EraInfoSoundtrack>
</EraInfoSoundtracks>


If you want to ADD your music file to what NORMALLY PLAYS DURING THAT ERA, simply add it as follows:

Spoiler :
<EraInfoSoundtracks>
<EraInfoSoundtrack>AS2D_ANCIENT_SOUNDTRACK_1</EraInfoSoundtrack>
<EraInfoSoundtrack>AS2D_ANCIENT_SOUNDTRACK_2</EraInfoSoundtrack>
<EraInfoSoundtrack>AS2D_ANCIENT_SOUNDTRACK_3</EraInfoSoundtrack>
<EraInfoSoundtrack>AS2D_ANCIENT_SOUNDTRACK_4</EraInfoSoundtrack>
<EraInfoSoundtrack>AS2D_BIRDHOUSEINYOURSOUL</EraInfoSoundtrack>
</EraInfoSoundtracks>


If you want to REPLACE what normally plays during that era, simply delete the original files, so that all you have is this:

Spoiler :
<EraInfoSoundtracks>
<EraInfoSoundtrack>AS2D_BIRDHOUSEINYOURSOUL</EraInfoSoundtrack>
</EraInfoSoundtracks>


Repeat for each music file that you want to play.


You are done! Enjoy!
 
Thanks for the help, just one more question, I've done all the above but it's still just playing the standard music, do I still need to select the "Use custom music folder" for music and browse to the custom civ area where i dropped the MP3's, and if this is the case will it still change music with era?
 
Does anybody know how many songs can be added to each Era and also how is each song played during gameplay; from first to last?, once each, and then back to the first song again?...or is it random?
 
Does anybody know how many songs can be added to each Era and also how is each song played during gameplay; from first to last?, once each, and then back to the first song again?...or is it random?

There's no limit, and it plays randomly.
 
Back
Top Bottom