• 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..?

Presumably you do have the file "RESOURCE\Sounds\MUSIC\InterceptorBattle.ogg"?
Yes, it is.
When you press F12, do you get an on-screen message "Executed Console"?
Yes, the word 'Executed Console' appeared.
Did you put the modified version of "sound.c", whether from the newest update zip or from post 44 of this thread, into "PROGRAM\sound"?
Yes, I've added the modified version
but it occurs to me that you reported:
After I've 'trasformed' in Barbossa, I press the 'Sea' button and find myself on the Black Pearl Bridge. From here starts the music 'Sailing1', which to tell the truth, a while ago it had appeared a different one, but I do not think this is important. So since I go on the Pearl Bridge, I leave this music that lasts until the end of the battle.
 
I have only 'Compile.log and system.log'. Of 'Error.log' no trace
 

Attachments

  • Compile-system.log.rar
    3 KB · Views: 201
The first storyline quest case shown in that "compile.log" is "InterceptorDestroyed", which is the end of the battle. It also shows "SETTING MUSIC: music_day_sailing", which is where the game picks one of its peaceful daytime sailing music pieces. There are several and it cycles between them, which is why you'll have heard "Sailing01" on one occasion and a different piece of music another time. But that "SETTING MUSIC" line confirms that the sound code is failing to detect that you're in a battle.

Add these lines to "console.c":
Code:
PChar.seabattlemusic = "music_interceptor_battle";
PChar.seamusic = "music_interceptor_battle";
That's in addition to the lines you have already put in there. Load the savegame, press F12, and "console.c" should then set up 'tmpref.music_interceptor_battle.f1.name' as well as set both custom music attributes.

When the battle is over, save game and quit, then edit "console.c". Remove or comment out the 'PChar.seabattlemusic' and 'PChar.seamusic' lines. Add:
Code:
DeleteAttribute(PChar, "seabattlemusic");
DeleteAttribute(PChar, "seamusic");
Load the savegame and press F12, and that ought to clear both attributes so you don't keep getting your custom music in all future sea scenes.

You can also edit "quests_reaction.c" and, where you have the 'PChar.seabattlemusic' line, add the 'PChar.seamusic' line as well. Also, in case "InterceptorDestroyed", add:
Code:
DeleteAttribute(PChar, "seamusic");
Next time you start a new game and play "Hoist the Colours", you should not need to use "console.c".
 
If you still have it, could you post your savegame from when you're about to go to the Interceptor battle? I'm trying to fix the problem where the system plays peaceful music when it should be playing battle music, but the problem is inconsistent and I'm having trouble re-creating it. Going into battle from that savegame seems to always get the peaceful music (before you got the custom music working), so it could be useful for testing my fix.
 
Yes, but it is not exactly at the precise moment in which you are battling the Interceptor.
The rescue is in front of Mr Gibbs. Then, to get to the battle:
Talk to Mr Gibbs - transported to tavern - continue talking to Mr Gibbs
'Transported to Port - Mr Gibbs talks to you - shows you crew - Annamaria talks to you - crew board Interceptor - QB-Update
Sail to Isla de Muerte
Land at Deserted Shore - Talk to Will Turner on Beach & Give Mr Gibbs orders - go to Treasure Cave - Movie Sequence - talk to Will Turner - talk to Barbossa - HURRAH sound - Now play as Barbossa
Transported to beach - Board Black Pearl sailed after Interceptor and sink her '
 

Attachments

  • -=Player=- Hispaniola. Tortuga port.rar
    652.3 KB · Views: 186
Perfect! A savegame while you're already in battle would be too late - what I need is one from shortly before you put to sea, so I can check what the music system is doing when you start the battle. This ought to do nicely. :onya
 
Because I did not go any further after the battle against the Interceptor and it was also the last rescue I made:dance
 
Oh well, worth a try. The problem with "music_day_sailing" playing instead of "music_sea_battle" when you fight the Interceptor is not, as I'd hoped, due to the attribute "PChar.ship.pos.mode" being set too late, which in some other situations has also led to peaceful music playing when you're in a battle. The problem here is that "PChar.ship.pos.mode" isn't being changed at all, and continues to keep its peacetime value even when you close to combat range and start exchanging shots with the Interceptor. The system has evidently detected that there's a battle, partly because auto-aim targets the Interceptor and partly because she shoots back. But the music system completely fails to recognise that a battle is happening.

However, playing from that savegame did allow me to spot a couple of other bugs. This, for one:
double_barbossa.jpg

You're now Barbossa. Someone forgot to tell Barbossa that. xD
 
Could a quest battle like this one be treated differently than a random one?
 
This particular one seems to be. There has been no similar problem with battle music in quest battles in "Hornblower" or "Ardent".
 
Maybe this particular battle has not been programmed quite correctly?
 
It is a straight copy of the Temeraire battle scene from "Hornblower", or possibly vice versa. One difference is that the Interceptor is programmed to run away:
Code:
           Group_SetTaskRunAway("Mr. Gibbs");
           Group_LockTask("Mr. Gibbs");
Whereas the Temeraire is programmed to attack:
Code:
           Group_SetPursuitGroup("French Squadron", PLAYER_GROUP);
           Group_SetTaskAttack("French_Squadron",  PLAYER_GROUP, true);
           Group_LockTask("French_Squadron");
But that difference is not the problem because, as a test, I tried setting "Mr. Gibbs" to attack as well, and the music problem persisted.
 
For example, to set up music for battle, is it only for the Hoist the Color Storyline, can the same procedure be assigned to the 'PChar.seabattlemusic' code? While in the game with other storylines, the default music is played.:wp
 
You can put those lines wherever you see fit.
Think of exactly what it is you want it to do, then tell us here and we can probably tell you how to make it happen.
 
You can put those lines wherever you see fit.
Think of exactly what it is you want it to do, then tell us here and we can probably tell you how to make it happen.
In detail, I would like the storyline (for example, that of Hoist the color) to have its predefined musical battles, but also when it is not in battle. While in other storylines, other appropriate music
 
Simplest thing to do: Install the PotC movie music pack and switch that on in Hoist the Colours and off in the other storylines.
 
Update on the music during the battle between Black Pearl and Interceptor:
There are a couple more minor differences between this and other quest battles. One is that the Interceptor battle has an UpdateRelations(); before group "Mr. Gibbs" is created, whereas others such as Hornblower's battle against Temeraire have it after the enemy group has been set up. Also, group "Mr. Gibbs" is defined and placed before you go to sea, whereas group "French_Squadron" (the Temeraire) is defined and placed when you arrive at Martinique, i.e. while you're at sea in the right area. So I tried splitting the quest case and triggering the setup of "Mr. Gibbs" when you put to sea at Isla Muerte, and moved the 'UpdateRelations()'. And indeed, that...

... did nothing. The game still fails to do whatever is necessary to trigger 'Sound_OnSeaAlarm', so it still continues to play peaceful music while you're pounding the Interceptor.

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.

And now I'm playing the whole storyline, doing a bit of debugging and dialog fixing...
 
Back
Top