<!--quoteo(post=178831:date=Jan 12 2007, 01:36 PM:name=Petros)--><div class='quotetop'>QUOTE(Petros @ Jan 12 2007, 01:36 PM) [snapback]178831[/snapback]</div><div class='quotemain'><!--quotec-->
Neat, now we can have different music for each nation! <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid="
" border="0" alt="me.gif" />
<!--QuoteEnd--></div><!--QuoteEEnd-->
Nice to see that you like the idea! So far it works correctly on my game. I've find this piece of code when looking into the PROGRAM/CCCFunctions.c I think. In this file the locations were given a nationality depending on the fortcommander or something like this. Which means this method should not be used on stock PotC - but you can use a different way : in the location file you define a the location type as 'town_iberic' for exemple, in the sound.c you clon the case 'town' and rename it 'town_iberic', and change the 'SetMusicAlarm("music_gorod");' and the music_alias.ini as told before. In stock PotC I believe the location type was only used by sound.c, whereas in build 13 it's necessary for randoms patrol, enconters, etc.
I've made so other nation checks to add a special music for the french townhall, and in the tavern to have the pirates songs only if you are yourself a pirate and if you are in a pirate town.
I had done some similar changes before, to the street merchants. I wanted that they address you differently depending on the town nation - not when you launch the dialog, just when you walk near them. In the PROGRAM\Loc_ai\types\LAi_merchant.c, I had changed this line<i>LAi_CharacterPlaySound(chr, "merchant");</i>
by this :
<i>switch(chr.sex)
{
case "man":
switch(makeint(chr.nation))
{
case 0 : LAi_CharacterPlaySound(chr, "merchant_eng");break;
case 1 : LAi_CharacterPlaySound(chr, "merchant_fra");break;
case 2 : LAi_CharacterPlaySound(chr, "merchant_spa");break;
case 3 : LAi_CharacterPlaySound(chr, "merchant");break;
case 4 : LAi_CharacterPlaySound(chr, "merchant_holl");break;
case 5 : LAi_CharacterPlaySound(chr, "merchant_por");break;
};
break;
case "woman":
break; </i>
and I had changed the RESOURCE\INI\ALIASES\sound_alias.ini to add the different options : don't know as they sound in English though...
<i>[merchant_fra]
minDistance = 5.0
ma
istance = 40.0
name = VOICE\ENGLISH\Fre_m_c_020.wav
name = VOICE\ENGLISH\Fre_m_a_021.wav
name = VOICE\ENGLISH\Fre_m_a_020.wav
[merchant_spa]
minDistance = 5.0
ma
istance = 40.0
name = VOICE\ENGLISH\Spa_m_a_066.wav
name = VOICE\ENGLISH\Spa_m_b_066.wav
name = VOICE\ENGLISH\Spa_m_b_063.wav
[merchant_holl]
minDistance = 5.0
ma
istance = 40.0
name = VOICE\ENGLISH\Dut_m_a_068.wav
name = VOICE\ENGLISH\Dut_m_a_026.wav
name = VOICE\ENGLISH\Dut_m_a_021.wav
name = VOICE\ENGLISH\Dut_m_a_004.wav
name = VOICE\ENGLISH\Dut_m_a_013.wav
[merchant_por]
minDistance = 5.0
ma
istance = 40.0
name = VOICE\ENGLISH\Por_m_a_018.wav
name = VOICE\ENGLISH\Por_m_a_020.wav
name = VOICE\ENGLISH\Por_m_a_062.wav
name = VOICE\ENGLISH\Por_m_b_018.wav
name = VOICE\ENGLISH\Por_m_b_020.wav
name = VOICE\ENGLISH\Por_m_b_062.wav
[merchant_eng]
minDistance = 5.0
ma
istance = 40.0
name = VOICE\ENGLISH\Eng_m_a_080.wav
name = VOICE\ENGLISH\Eng_m_a_027.wav
name = VOICE\ENGLISH\Eng_m_a_019.wav
name = VOICE\ENGLISH\Eng_m_a_018.wav
name = VOICE\ENGLISH\Eng_m_b_080.wav
name = VOICE\ENGLISH\Eng_m_b_027.wav
name = VOICE\ENGLISH\Eng_m_b_026.wav
name = VOICE\ENGLISH\Eng_m_b_020.wav
name = VOICE\ENGLISH\Eng_m_b_019.wav
name = VOICE\ENGLISH\Eng_m_b_018.wav
name = VOICE\ENGLISH\Eng_m_c_080.wav
name = VOICE\ENGLISH\Eng_m_c_027.wav
name = VOICE\ENGLISH\Eng_m_c_026.wav
name = VOICE\ENGLISH\Eng_m_c_023.wav
name = VOICE\ENGLISH\Eng_m_c_019.wav
name = VOICE\ENGLISH\Eng_m_c_018.wav</i>
<!--quoteo(post=178834:date=Jan 12 2007, 01:53 PM:name=morgan terror)--><div class='quotetop'>QUOTE(morgan terror @ Jan 12 2007, 01:53 PM) [snapback]178834[/snapback]</div><div class='quotemain'><!--quotec-->
eh, no. it simply doesn't play in the location it should play. at sea. in fact, it doesn't play anywhere at all. i do know that the string of code and the name of the file are exactly right.
<!--QuoteEnd--></div><!--QuoteEEnd-->
So, you've added a new .ogg music file in RESOURCE\Sounds\MUSIC, then opened the \RESOURCE\INI\ALIASES\music_alias.ini, went in [music_spokplavanie], and added this line 'name = MUSIC\(whatever your music is called).ogg' ? Then it should work, I can't tell you more... Just make shure their aren't other music_alias.ini files in the same folder, even called differently, it seems like the game keep launching them. And talking of the [music_enplavanie], I'm quite shure it's never used by the game.