Custom music in different eras

Gajes

Chieftain
Joined
Nov 8, 2005
Messages
3
Location
Netherlands
I couldn't find a topic explaining how to play different custom music in different eras, so here's how I did it. The following requires a little bit of work but in the end is very simple. It requires the editing of some xml files, so to keep things organised I suggest copying the files in question to the CustomAssets folder in MyDocuments. My didactic skills are not that good so I hope I can make myself clear enough.

I will now add a new music track to the Industrial era, called "Chopin.mp3". Place this file in (Custom)Assets\sounds\soundtrack\industrial. Then edit AudioDefines.xml found in (Custom)Assets\xml\audio. This file contains names for all soundfiles found in the game, ranging from music to combat effects to Nimoy's spoken quotes. The ingame music is at the start of the file and can be identified by names like SONG_OPENING_MENU. Copy the entire <SoundData> block of this SONG_OPENING_MENU or any other SONG, and paste another instance of it in front of this block. Then change <SoundID>SONG_OPENING_MENU</SoundID> to <SoundID>SONG_CHOPIN</SoundID> and <Filename>Sounds/Soundtrack/OpeningMenu</Filename> to <Filename>Sounds/Soundtrack/industrial/Chopin</Filename>. Leave the other things unchanged and save the file.
Open Audio2DScripts.xml, also found in (Custom)Assets\xml\audio. More information regarding sound is found here, but the only thing to be done here is creating a new <Script2DSound> block for the Chopin file. So again copy an entire block and paste in a new instance. Make sure <ScriptID> has the tag AS2D_CHOPIN and <SoundID> has the tag SONG_CHOPIN. <iMinVolume> and <iMaxVolume> can be set to 70 like the other ingame music, but I guess it depends on how loud the custom music is. I haven't experimented with the other variables, my soundcard is not too advanced anyway. Save the file.
The final step is to open (Custom)Assets\xml\gameinfo\CIV4EraInfos.xml. Scroll down to <Type>ERA_INDUSTRIAL</Type> and find <EraInfoSoundtracks>. Add <EraInfoSoundtrack>AS2D_CHOPIN</EraInfoSoundtrack> to the list found here, save and voila, Chopin now also plays during the Industrial Era.
Of course the same can be done with music in other Era's.
 
Thank you!! :worship: I've been trying to do this for days, and was stuck trying to find the file that defines when different music tracks play. That eras file was exactly what I was looking for. :goodjob:
 
Great step by step. Been trying to do this. Question. Did you copy all Industrial music over to Custom Assets, or did you just put Chopin in there? Is Chopin the only thing that plays now, or does it play with all the other music that came with the game. My ideal would be to add my own stuff to the existing (and maybe delete some of the modern stuff). I wish there was a utility that did these edits for you, cause I feel doing this for the 25 songs I want to add, is going to be tedious.

Thanks...
 
It feels strange to see this pop up on my "subscribed threads" list again after almost a decade. That might be the first post I made here! I joined in November 2005, and that post was on November 10th 2005. :wow:
 
Hi,
I bring good news.
I made an opensource python program that scans all the songs that are in the different eras inside the Asstes\Sounds\Soundtrack\<eras> folder. When finished the scanner rewrites the necessary files automatically.
I also bring you information about the composers of each musical period in an excel. So you can decide if Beethoven belongs to the Renaissance xD.
Enjoy!!

Proyect: https://github.com/SalvatoreScalia/Civ-IV-selected-songs-tool

direct link download: MEGA

Screenshot_1.png
 
Back
Top Bottom