• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Discussion Music question..?

One is that the Interceptor battle has an UpdateRelations(); before group "Mr. Gibbs" is created
I think 'UpdateRelations' in quest code pretty much serves zero purpose these days.
That function is now automatically called whenever needed by the Sea Relations code.
There is actually a lot of "common" code in quest sea battles now that serves no purpose.
But it doesn't do any harm being there either, so whatever. :shrug

And indeed, that...

... did nothing.
:( :( :(

Still... Points for trying! :onya


There is, of course, an easy solution, and it's the one I previously suggested - set the "seamusic" attribute for the battle and remove it afterwards. And I happen to have some suitable music, not from the music pack, but from AoP. Though I haven't tried to install AoP since getting my Windows 7 PC, I still have the Supermod, which includes some PoTC film music, which includes a piece which VLC shows to have alternative title "Barbossa is Hungry". (And another titled "The Black Pearl"). So, while not going as far as to customise all music for the storyline, at least I've now got something sensible playing during this battle.
"Barbossa is Hungry" is definitely the correct music for the battle between the Interceptor and Black Pearl! :onya

("The Black Pearl" is confusingly titled, because in the film it has absolutely nothing to do with the Pearl, nor with a sea battle.
If I recall, it is the music for Jack's escape from the British early in the film. :confused: )

And now I'm playing the whole storyline, doing a bit of debugging and dialog fixing...
AWESOME! Good timing too; possibl some players will want to play it again, now that a new PotC film is in cinemas. :woot
 
Another small question ... I would like to include music as I enter the treasure cave and then fight with Barbossa. A unique music, because the present ones are not 'suitable'.
The code starts from here:
Code:
case "equipage":
            sld = LAi_CreateFantomCharacter(false, 0, false, true, 0.25, "Soldier_Eng4_18", "goto", "goto1"); // TALISMAN model corrected
            LAi_SetCitizenType(sld);
            sld = LAi_CreateFantomCharacter(false, 0, false, true, 0.25, "Soldier_Eng2_18", "rld", "loc3"); // TALISMAN model corrected
            LAi_SetCitizenType(sld);
            sld = LAi_CreateFantomCharacter(false, 0, false, true, 0.25, "Soldier_Eng3_18", "rld", "loc11"); // TALISMAN model corrected
            LAi_SetCitizenType(sld);
        break;
And ends here (I think):
Code:
case "justapresfight3":
            Characters[GetCharacterIndex("Will Turner")].dialog.currentnode = "begin_25";
            LAi_ActorDialog(characterFromID("Will Turner"), pchar, "", 20.0, 10.0);
            SetNextWeather("Blue Sky");
The codes 'Pchar seamusic' and 'Pchar seabattlemusic' will not work because they only work at sea.
So, is there a way to do this?
 
Yes:
Code:
PauseAllSounds();//stops music
            locations[FindLocation("wr_church_outside")].type = "silent_jungle";// new temp sound type
            PostEvent("LoadSceneSound", 0.1);//starts music
 
Talking about music etc. I have changed (made a new soundtype) for Turks old Fort.
It's now jungle music + sounds from the sea. The sea wasn't heard.
 
Hello sorry to bother you I saw your discussion me too I would like help. I would like to put music when I sail, sailor songs. How I have to do with 'Pchar seamusic'
 
Hello sorry to bother you I saw your discussion me too I would like help. I would like to put music when I sail, sailor songs. How I have to do with 'Pchar seamusic'
If you just want to add regular music, you don't need that feature.
That is purely intended for quest-specific music.
 
Ah I understand then to just put some music when I navigate what are the steps. First convert to ogg then put in the music folder then the step where you have to edit the file "music_standard.c" I have not very well grasped. Must replace the line tmpref.music_day_sailing.f2.name = "MUSIC \ Sailing01.ogg";
 
Must replace the line tmpref.music_day_sailing.f2.name = "MUSIC \ Sailing01.ogg";
Replace if you don't like the existing music.
If you want to keep the existing, add an extra "f3" line instead.
As far as I know, there is no limit to the number of tracks you can add.
 
There are several such lines:
Code:
   tmpref.music_day_sailing.f1.name = "MUSIC\Spokplavanie.ogg";
   tmpref.music_day_sailing.f2.name = "MUSIC\Sailing01.ogg";
   tmpref.music_day_sailing.f3.name = "MUSIC\Sailing02.ogg";
   tmpref.music_day_sailing.f4.name = "MUSIC\Sailing03.ogg";
The system cycles through them. The first time you go sailing in daytime, you'll hear whatever is defined by "tmpref.music_day_sailing.f1.name". The second time, you'll hear whatever is defined in "tmpref.music_day_sailing.f2.name". And so on. If you don't have four different pieces of music, you won't need all four lines, so delete the ones you're not using, otherwise sometimes you'll hear your music files and other times you'll hear some of the standard music.

Conversely, if you have five pieces of music, you can also define 'tmpref.music_day_sailing.f5.name = "MUSIC\<fifth music name>.ogg";'. (Replace "<fifth music name>" with the name of whatever additional music file you want to use.)

You may also want to edit the 'tmpref.music_night_sailing' lines, which control the music you hear while sailing at night, otherwise when darkness falls at 22:00, you'll start hearing standard music again. Likewise the 'tmpref.music_fog_sailing' and 'tmpref.music_storm' lines control the music you hear in fog and in storms. The same principle applies - the game cycles through the "f1", "f2", "f3" lines, or as many lines as are defined, so either delete lines if you don't have enough music files, or add lines if you have more than the standard set.
 
Can you give me an example of the line of code if I want to put several track. Thank you Roger
 
Example if I have to put 10 music "tmpref.music_day_sailing.f5.name =" MUSIC \ <music name> .ogg
"Tmpref.music_day_sailing.f6.name =" MUSIC \ <music name> .ogg
Until the last


Here is my file I try with two. I replaced the first two by default but without success.
 

Attachments

  • music_standard.c
    12.4 KB · Views: 266
Last edited:
Example if I have to put 10 music "tmpref.music_day_sailing.f5.name =" MUSIC \ <music name> .ogg
"Tmpref.music_day_sailing.f6.name =" MUSIC \ <music name> .ogg
Until the last
Exactly. :yes
 
I replaced the default sailing by ogg file to me and I changed the line of code but its not working

Here is my music-standart file
 

Attachments

  • music_standard.c
    12.4 KB · Views: 265
Have you started a new game? The new music files won't be registered until you do.
 
No, I continued my game. I should launch a new. This is probably the cause. Thank you for your patient
 
You can also delete the comment at the end of "tmpref.music_day_sailing.f4.name". It isn't the theme from "Cutthroat Island" any more. ;)

Anything after "//" on a line is a comment. You can add your own to say something about the music, or whatever else you like - if it's after "//" then the system will ignore it.
 
You can also delete the comment at the end of "tmpref.music_day_sailing.f4.name". It isn't the theme from "Cutthroat Island" any more. ;)
You mean in kiri's files or in the main mod files? Hopefully not the second; I added that on purpose. :wp
 
I start a new game but it is always the same any music when I sail. There is no music that triggers :'(
 
Which is it - you always get the same music while sailing, or you get no music while sailing?

Could you start a new game, put to sea, quit the game, and then post "compile.log", "system.log", and "error.log" if there is one?
 
Back
Top