• 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 Empty dialogue screen with enemy captain

Tingyun

Corsair
Storm Modder
Boarded a smallish navy ship, upon reaching the captain's cabin, the enemy captain stood peacefully, but had a blank dialogue screen.

The problem is with the code I wrote for cabinfight dialog, the error log points to line 91:

COMPILE ERROR - file: dialogs\Cabinfight_dialog.c; line: 91
missed ')'

I'm afraid I don't know myself how to correct the error, can someone better at coding see what I did wrong and fix it?

Sorry about the mistake. :(

Here is the code for reference:

bDeathFight = false;
if(IsCharacterPerkOn(NPChar, "SwordplayProfessional")
{
if(frnd() < 0.2)
{
if(GetCharacterReputation(PChar) > REPUTATION_NEUTRAL && GetCharacterReputation(NPChar) < REPUTATION_NEUTRAL)
{bDeathFight = true;}
if(GetCharacterReputation(PChar) < REPUTATION_NEUTRAL && GetCharacterReputation(NPChar) > REPUTATION_NEUTRAL)
{bDeathFight = true;}
}
}
if(sti(NPChar.nation) = PIRATE)
{
if(frnd() < 0.3)
{
bDeathFight = true;
}
}
 
Last edited:
In the Pirate nation check, I see a single = where there should be two.
Could that be it?

Which line is line 91?
 
Ah shoot, so I made that error once earlier before I got the correction!

91 is the swordplay professional line, so maybe a second error?

I just shut down everything and got ready for the night's sleep, so can't test anything now, but will edit in and playest any fixes people suggest tomorrow. Really sorry about having messed these lines up.
 
Last edited:
Yep, that line is wrong too.
Just count the number of opening and closing brackets; there are two opening and only one closing.
Just add another bracket at the end and you should be good.
 
I believe you made the change to the dialog file :). If you've got a version which works please upload it
 
Oh @Levis , I do indeed know that this one was my fault. Hence all the apologies and the use of the :( symbol...I feel really sorry about it.

EDIT nevermind, found the missing paranthesis :) I was confused and was looking at the {
 
Ok, here is a fixed version. I'm going to playtest to be sure, then post it to new content

EDIT PROGRAM/DIALOGS
 

Attachments

  • Cabinfight_dialog.c
    43.8 KB · Views: 146
Last edited:
Same happened to me this time.

Just for the record:

After installing all the newest stuff I'm playing the Nathan Hawk Campaign. After reporting to Silehard about the French invasion I came back to Barbados to continue the quest. When I approached at Bridgetown (coming from World Map) there was a battle going on between a French Ketch, a French European Barque and the Bridgetown Fort. The Ketch surrendered after being severely damaged by the Fort's artillery fire.

Saw a big chance for a cheap takeover and boarded the Ketch. After all I ended up the same as Tingyon reported in his OP.

Strange: After the Ketch surrender, the remaining French Barque wasn't hostile at all but neutral.


@Tingyun

Thanks for your efforts. Will try your fix!
 
Darby, It was me who broke it, so fixing is the least I could do. Yes, please let me know if this fixes it, I think it does, but I really want to be sure. :)
 
Strange: After the Ketch surrender, the remaining French Barque wasn't hostile at all but neutral.
This is a known problem. If the flagship of a fleet surrenders, the entire fleet turns neutral. They haven't surrendered so you can't board them.

If you want to continue the fight, save game. You can't do that when there are enemy ships nearby, but there aren't now because they've just turned neutral. Reload the savegame. The enemy ships will be hostile again, unless they genuinely surrendered - in this case, for example, the ketch would remain surrendered but the barque would revert to being hostile.
 
Darby, It was me who broke it, so fixing is the least I could do. Yes, please let me know if this fixes it, I think it does, but I really want to be sure. :)

No need to apologize, Tingyun! I'm so glad you're constantly trying to improve the game!:)

Will try your fix and will report back ASAP!:)
 
This is a known problem. If the flagship of a fleet surrenders, the entire fleet turns neutral. They haven't surrendered so you can't board them.

If you want to continue the fight, save game. You can't do that when there are enemy ships nearby, but there aren't now because they've just turned neutral. Reload the savegame. The enemy ships will be hostile again, unless they genuinely surrendered - in this case, for example, the ketch would remain surrendered but the barque would revert to being hostile.

Thanks for clarification, Grey! Didn't know that.:)
 
@Tingyun you make my life easier (and also that of other users) if you also say where to put the file if you post a fix.
 
Sorry @Levis this one goes in PROGRAM/DIALOGS
No problem. But when making the zip file its easier if it's said. Especially with dialog files and quest files because they could also be placed in any of the storylines.
 
Back
Top