• 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!

Fixed Surrendering Captains have wrong or no dialog

Grey Roger

Sea Dog
Staff member
Administrator
Storm Modder
Playing "Ardent" under 28th July install plus 23rd September and "Levis_Fixes_2-10.zip" updates, I've got to the battle against the convoy. One of the ship captains surrendered but instead of using the proper "Cabinfight" dialog, he used his own default dialog file:
no_surrender.jpg

The quest is supposed to end when all enemy officers are dead or surrendered. This one wasn't surrendering and, as he seemed to be acting as a friend, couldn't be damaged much by hitting him. I managed to kill him by hitting him with a borgiablade and waiting for him to succumb to poison. And then, because he hadn't used the proper dialog and hadn't been killed properly, the game did not switch to the ransack screen and I was stuck there:
no_capture.jpg

Attached are log files ("error.log" is zipped because it contains a lot of messages and is too big to upload without zipping) and a savegame from just before the battle starts. Refuse combat with the French group that is about to challenge you, then go to 3D sailing.

See also Unconfirmed Bug - 4.1 Beta + Zip Hornblower Bug Justinian ignoring Téméraire | PiratesAhoy!, in which a storyline ship in a different storyline misbehaves, and also how the convoy ships refuse to fire despite showing up as hostile on the compass.
 

Attachments

  • -=Player=- Open Sea March 6th, 1692.zip
    954.8 KB · Views: 159
  • compile.log
    115.8 KB · Views: 145
  • error.zip
    18 KB · Views: 137
  • system.log
    10.8 KB · Views: 184
@Levis: Do you know what's going on here? Sounds like the "dialog swapping upon boarding" no longer occurs.
Could this be because the "officer copying" is skipped now? So that his original dialog is maintained when that is not supposed to happen?
 
Note that this seems only to be this quest officer (and probably the other pinnace captain if he'd surrendered as well). Routine random encounters behave themselves - well, apart from not having the option to take them prisoner, but that's in another bug report.

Incidentally, I play with "Realistic abilities" and "Locked perks" disabled, and at this point in the game I have the "Instant board" perk - or at least, an officer who can contribute that perk has it. This means you can use that savegame to check any fixes to the problem of officers failing to appear in boardings. If you're lucky, one of the convoy captains will surrender and you get to check that bug too. (Don't try to persuade the Heavy East Indiaman to surrender, he has the "nosurrender" attribute set. The pinnace and merchant pinnace are fair game.)
 
Note that this seems only to be this quest officer (and probably the other pinnace captain if he'd surrendered as well). Routine random encounters behave themselves - well, apart from not having the option to take them prisoner, but that's in another bug report.
My suspicion is that random officers are OK because they're already generated with the correct dialog.
But changing the dialog for non-random characters is now being skipped and therefore this happens.

@Levis would know better if this is indeed the case.
 
I've figured out a workaround for "Ardent" - set the officer to use the "cabinfight" dialog file when the battle starts, so that if he does surrender then he'll surrender properly. But is there any chance of fixing this properly?
 
@Grey Roger
Code:
//Set up dialog data
    if(!CheckAttribute(rCaptain,"Dialog"))
    {
        rCaptain.Dialog.Filename = "Cabinfight_dialog.c";
        rCaptain.Dialog.Currentnode = "First time";
        if(rCaptain.sex=="woman") rCaptain.greeting = "Gr_Pirate_f";
        else rCaptain.greeting = "Gr_Dark Teacher";
    }
From CreateCaptain.c
It will only set the cabinfight dialog if no dialog is set. I did this incase there where cases where you wanted to give it a special dialog, but I guess you can always add it after the function (which sounds more reasonable anyways). so just remove the check for attribute and it should be fixed.
Will include it in my next update, but if you can check if it fixes the problem that would be nice.
 
Interesting idea, though it would require all storyline captains and probably side quest captains to either have their surrender dialog built into their own dialog files, or to have no dialog files. Otherwise if that really is what's causing the problem then we can expect Silehard, for one, to do the same thing if he surrenders.

When I get the chance, I will see if the convoy captains behave themselves with the 'if' and its associated brackets commented out. Or you can try it if you get a chance earlier, using the savegame in the first post.
 
Interesting idea, though it would require all storyline captains and probably side quest captains to either have their surrender dialog built into their own dialog files, or to have no dialog files. Otherwise if that really is what's causing the problem then we can expect Silehard, for one, to do the same thing if he surrenders.

When I get the chance, I will see if the convoy captains behave themselves with the 'if' and its associated brackets commented out. Or you can try it if you get a chance earlier, using the savegame in the first post.
that was my problem too ... so that's why the check is in place.
I don't know for sure how the logic should work here ... personally I think the logic as it is now is fine, and in your case for example you should just set the dialog file yourself (as you did)....
Else it can become quit hard for quests to have other surrender dialog.
 
If the condition is left in place then all quests which do not have custom surrender dialog will need to be altered to switch to using "cabinfight_dialog" before their battles. And that would probably be all quests which have a captain who can surrender, as they'd have been written under the assumption that the surrendering captain will automatically use "cabinfight_dialog". "Tales of a Sea Hawk" has two (Silehard and Ferro Cerezo). I'm not sure about any other storylines, let alone side quests.
 
All quests that DO have custom surrender dialog have that included inside the generic Cabinfight_dialog.c file.
So by the time a ship surrenders, that dialog file MUST be assigned to the captain regardless of anything.
 
Cheers ... again!

Continuing with the Nigel Blythe quest line, it seems to be bugged.
I made Nigel captain of a ship and sailed to Bonaire. There, as described in the quest wiki, a pirate ship attaks or better, is attacked by Nigel. After few broadsides the ship struck colors, and when I boarded, I met a captain who asked me to play dice. No matter of I play with him, ignore him, or just kill him, I am stuck in the ship. I can't take it, and don't get out of it.

Here comes screenshot, errror log and savegame.

Also, once this happened, I can not save or dock to port. I just tried to ignore the pirate after it struck, and sailed straight to Bonaire. I can't dock to port there. So something seems to be expected to happen on board that ship.
 

Attachments

  • Nigel Blythe Smuggler ship quest.7z
    655.3 KB · Views: 116
  • 15 - dice.jpg
    15 - dice.jpg
    467.3 KB · Views: 162
Last edited:
That sounds like the issue with quest captains not being assigned the generic surrender dialog while they do need that.
There is a Bug Tracker entry for that by @Grey Roger who ran into the same issue elsewhere.

But I don't really see how I can add leadership to it.
Agreed, Leadership makes no sense to me there either.
I was thinking mainly of Luck. But since its already there, that's one thing you don't need to do. ;)
 
I took on the Marauder at Martinique. During the artillery dual I gave her a broadside of grape while watching through the glass. Crew immediately went from 402 to three. Boarded, engulfed in melee, cleared on deck, wound up in cabin. Captain wanted to talk, not fight but none of usual captain's dialogue came up. Instead vapid stuff about the weather and women. When I drew my blade and attacked him he did nothing.

Here is a save game from right before you raise the French flag and commence the battle.
 

Attachments

  • -=Player=- Open Sea June 8th, 1704 1.rar
    592.7 KB · Views: 136
@Jason I think this is the general captain assignment dialogue issue that Grey Roger first reported for Ardent.

Try this, go into your PROGRAM/loc_ai folder, and find the file Createcaptain

Find this block of code:

//Set up dialog data
if(!CheckAttribute(rCaptain,"Dialog"))
{
rCaptain.Dialog.Filename = "Cabinfight_dialog.c";
rCaptain.Dialog.Currentnode = "First time";
if(rCaptain.sex=="woman") rCaptain.greeting = "Gr_Pirate_f";
else rCaptain.greeting = "Gr_Dark Teacher";
}

Delete it and replace it with the below:

//Set up dialog data
rCaptain.Dialog.Filename = "Cabinfight_dialog.c";
rCaptain.Dialog.Currentnode = "First time";
if(rCaptain.sex=="woman") rCaptain.greeting = "Gr_Pirate_f";
else rCaptain.greeting = "Gr_Dark Teacher";

You may have to load a save before the captain is generated on the sea, not sure, he might be missing the dialogue if he is already generated even if you haven't fought him.
 
Thanks Tinyun,

I neglected to say that if you don't use grape when board and get the cabin he fights you. So I have moved beyond this problem.
 
If he doesn't surrender, then indeed you would bypass the problem.
 
so @Grey Roger and @Pieter Boelen if I understand right we just want to always assign the cabin fight dialog?
In that case its a very easy fix...
 
Yes, that ought to solve all the reported problems related to this issue. I'd imagine that all existing storylines and sidequests were written under the assumption that surrendering captains always use "Cabinfight_dialog.c", as that has always been the case until now, so leaving it that way should not break anything.

Perhaps allow an attribute to be defined so that, if someone writing a quest really needs a custom surrender dialog, e.g.
Code:
ch.SurrenderDialog.Filename = "custom_surrender_dialog.c";
If that attribute is not defined then the character uses the default "Cabinfight_dialog.c". If you want a custom surrender dialog then add that attribute in the captain's character definition.
 
Back
Top