Okay, I can give you a quick explanation of how it's done, but you have to familiarize with compiling the DLL for which there are useful guides in the tutorial section or the modiki.
But the idea is as follows: unfortunately, music playlists in Civ4 are inseparable from eras (unless you want to completely change how music is stored which I didn't want to attempt). But you don't want civs to change eras just to change their music because this also affects many other things. So I've created dummy eras that you never enter because no tech is associated with them, only to hold the playlists. For example, I wanted to add new medieval music for East Asia, South Asia and the Middle East, so I added ERA_EAST_ASIA, ERA_SOUTH_ASIA and ERA_MIDDLE_EAST to XML\GameInfo\CIV4EraInfos.xml.
The DLL change now only consists of making the game use these playlists for the appropriate civs, even if they are not in these eras.
The method to modify for this purpose is
CvGameInterface::getNextSoundtrack(). You don't have to understand how it works, only that it uses
getCurrentEra() to determine the next soundtrack (in two places in the method). As I said, you don't want that, because you potentially want to use the soundtrack from an era you're not in, so you replace it with a new method which I called
getSoundtrackEra(). This method could look something like this:
Code:
EraTypes CvPlayer::getSoundtrackEra()
{
ReligionTypes eStateReligion = getStateReligion();
EraTypes eCurrentEra = getCurrentEra();
if (eStateReligion == CONFUCIANISM || eStateReligion == TAOISM)
{
if (eCurrentEra == ERA_CLASSICAL || eCurrentEra == ERA_MEDIEVAL || eCurrentEra == ERA_RENAISSANCE)
{
return (EraTypes)ERA_EAST_ASIA;
}
}
else if (eStateReligion == BUDDHISM || eStateReligion == HINDUISM)
{
if (eCurrentEra == ERA_CLASSICAL || eCurrentEra == ERA_MEDIEVAL || eCurrentEra == ERA_RENAISSANCE)
{
if (getID() == CHINA || getID() == MONGOLIA || getID() == JAPAN || getID() == KOREA)
{
return (EraTypes)ERA_EAST_ASIA;
}
else
{
return (EraTypes)ERA_SOUTH_ASIA;
}
}
}
else if (eStateReligion == ISLAM)
{
if (eCurrentEra == ERA_MEDIEVAL || eCurrentEra == ERA_RENAISSANCE)
{
return (EraTypes)ERA_MIDDLE_EAST;
}
}
return eCurrentEra;
}
As you can see, my approach is mostly based on religion, i.e. Confucianism and Taoism give you East Asian music, Islam gives you Middle Eastern music, and Hinduism and Buddhism give you South Asian music (or East Asian music for China, Korea, Japan and Mongolia) in the medieval and Renaissance eras (my main goal was to avoid Christian chants for these civs in the Middle Ages). But it can be any combination of criteria you want. Just make sure to always return the current era at the end so those civs where the special rules don't apply still play the music of the era they're in.
If you're unfamiliar with C++ you might have some problems with getting the coding right at first, I can help you with that if necessary. Just send me a PM in that case, but please make sure you can compile the DLL before.
(Edit: you should probably note that you cannot directly follow my code because the way I use constants only work with the specific scenarios my mod is using, but I can help you with that too.)