• 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 Combined Dialog Order

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
This new version of dialog.c should fix the sorting issue.
Say you have a l1 in your first dialog file and in the second dialog file they will be put after each other.
the numbering now is:
link number _ dialog file number

so if dialog 1 has:
l1
l2
l3
l4

and dialog 2 has:
l1
l3
l9

it will make it:
l11
l12
l21
l31
l32
l41
l92

So you see this could go wrong if a character has more then 9 dialog files linked to him. If that is the case I think something else is going wrong already ;), and if that isn't we can then fix that by just introducing a 0 in front of single digits.
let me know how this works out. Maybe the numbering of some of the files has to be changed to finetune it.
Are we quite sure this is working right?
This is a screenshot from Claudio Burrieza at Puerto Rico:
upload_2015-6-27_13-55-32.png

I'd expect the "looking for a specific type of officer" line to be BELOW the "get straight to business" one.
Based on this section of code, shouldn't it do that?
Code:
    case "second time":
       Dialog.defAni = "dialog_stay1";
       Dialog.defCam = "1";
       Dialog.defSnd = "dialogs\0\017";
       Dialog.defLinkAni = "dialog_1";
       Dialog.defLinkCam = "1";
       Dialog.defLinkSnd = "dialogs\woman\024";
       Dialog.ani = "dialog_stay2";
       Dialog.cam = "1";

       dialog.snd1 = "Voice\CLBU\CLBU002";
       dialog.snd2 = "Voice\CLBU\CLBU003";
       dialog.snd3 = "Voice\CLBU\CLBU004";
       dialog.text = randphrase(DLG_TEXT[6], DLG_TEXT[7] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[8], DLG_TEXT[9], &dialog, dialog.snd1, dialog.snd2, dialog.snd3);
       link.l1 = pcharrepphrase(DLG_TEXT[10], DLG_TEXT[11]);
       link.l1.go = "node_1";
       link.l2 = pcharrepphrase(DLG_TEXT[12], DLG_TEXT[13]);
       link.l2.go = "exit";
     break;

    case "second time":
       Dialog.defAni = "dialog_stay1";
       Dialog.defCam = "1";
       Dialog.defSnd = "dialogs\0\017";
       Dialog.defLinkAni = "dialog_1";
       Dialog.defLinkCam = "1";
       Dialog.defLinkSnd = "dialogs\woman\024";
       Dialog.ani = "dialog_stay2";
       Dialog.cam = "1";

       dialog.snd1 = "Voice\CLBU\CLBU002";
       dialog.snd2 = "Voice\CLBU\CLBU003";
       dialog.snd3 = "Voice\CLBU\CLBU004";
       dialog.text = randphrase(DLG_TEXT[6], DLG_TEXT[7] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[8], DLG_TEXT[9], &dialog, dialog.snd1, dialog.snd2, dialog.snd3);
       link.l1 = pcharrepphrase(DLG_TEXT[10], DLG_TEXT[11]);
       link.l1.go = "node_1";
       link.l2 = pcharrepphrase(DLG_TEXT[12], DLG_TEXT[13]);
       link.l2.go = "exit";
     break;
    case "second time":
       Dialog.defAni = "dialog_stay1";
       Dialog.defCam = "1";
       Dialog.defSnd = "dialogs\0\017";
       Dialog.defLinkAni = "dialog_1";
       Dialog.defLinkCam = "1";
       Dialog.defLinkSnd = "dialogs\woman\024";
       Dialog.ani = "dialog_stay2";
       Dialog.cam = "1";

       dialog.snd1 = "Voice\CLBU\CLBU002";
       dialog.snd2 = "Voice\CLBU\CLBU003";
       dialog.snd3 = "Voice\CLBU\CLBU004";
       dialog.text = randphrase(DLG_TEXT[6], DLG_TEXT[7] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[8], DLG_TEXT[9], &dialog, dialog.snd1, dialog.snd2, dialog.snd3);
       link.l1 = pcharrepphrase(DLG_TEXT[10], DLG_TEXT[11]);
       link.l1.go = "node_1";
       link.l2 = pcharrepphrase(DLG_TEXT[12], DLG_TEXT[13]);
       link.l2.go = "exit";
     break;
 
Last edited:
For some reason the secondary dialog file is taking precedence over the primary one again.
See here:
upload_2015-7-4_17-45-12.png

As far as I'm concerned, the merging of the two dialog files should be the other way around.
The MAIN .l1 should display first and the group dialog .l1 can display after that one.
 
Will take a look at it later, think i know what causes it.
 
Back
Top