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

Modding tool's?

You should add your code BEFORE the final } , not after it. <img src="style_emoticons/<#EMO_DIR#>/no.gif" style="vertical-align:middle" emoid=":no" border="0" alt="no.gif" />
 
I finaly managed to add an character to the game <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />!
Now where should i go to write the dialog?

Thanks,Malk <img src="style_emoticons/<#EMO_DIR#>/buds.gif" style="vertical-align:middle" emoid=":drunk" border="0" alt="buds.gif" />
 
Dialogs are in PROGRAM\Storyline\LegendJackSparrow\DIALOGS; set the dialog file used in the character init file.
 
im kinda stuck here.
i dont know how to make an dialog
if i see well in the DIALOGS folder there is another folder "ENGLISH" and in those files are the dialogs..in the original DIALOGS folder are the same named files but with some scripts.
Can someone tell me what are the files in /dialogs for since the dialogs are in /dialogs/english.?
i need some help to get familiar with the scripting you know...

Thanks,Malk <img src="style_emoticons/<#EMO_DIR#>/buds.gif" style="vertical-align:middle" emoid=":drunk" border="0" alt="buds.gif" />
 
Basically the one in DIALOGS is the code to make them talk and in ENGLISH is what they say <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

DLG_TEXT[num]; refers to the line they say

Dialog.text is what the NPC says
Link.l1 is what you say
Link.l1.go is the case that that goes to

For example <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->//#include "DIALOGS\Malk Sparrow_dialog.h"
void ProcessDialogEvent()
{
    ref NPChar, PChar, d;
    PChar = GetMainCharacter();
    aref Link, Diag;
    string NPC_Meeting;

    DeleteAttribute(&Dialog,"Links");

    makeref(NPChar,CharacterRef);
    makearef(Link, Dialog.Links);
    makeref(d, Dialog);
    makearef(Diag, NPChar.Dialog);

    switch(Dialog.CurrentNode)
    {
        case "First 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.snd = "Voice\ANAC\ANAC001";
            dialog.text = DLG_TEXT[0];
            link.l1 = DLG_TEXT[1];
            link.l1.go = "response";
            link.l2 = DLG_TEXT[2];
            link.l2.go = "exit";
        break;
        
        case "response":
            dialog.snd = "Voice\ANAC\ANAC002";
            dialog.text = DLG_TEXT[3];
            link.l1 = DLG_TEXT[4];
            link.l1.go = "exit";
        break;
        
        case "exit":
            Diag.CurrentNode = Diag.TempNode;
            DialogExit();
        break;
    }
}<!--c2--></div><!--ec2-->
and in ENGLISH
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->string DLG_TEXT[5] = {
"Hello my name is Malk Sparrow.",
"I'm Jack Sparrow.",
"I don't care who you are.",
"We have the same last name.",
"That we do.",

};<!--c2--></div><!--ec2-->
So if you reply "I'm Jack Sparrow" it will continue to "We have the same last name"
If you select "I don't care who you are" it will end the dialog.

NOTE: string DLG_TEXT[num] num has to equal num + 1 to how many lines of dialog being used <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />
 
ok..so if i want to add more than 5 dialog lines i need to make the string DLG_TEXT[5] = { to look like string DLG_TEXT[10] = { ?
?

and can i use this for any other dialog i'll create? <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->//#include "DIALOGS\Malk Sparrow_dialog.h"
void ProcessDialogEvent()
{
    ref NPChar, PChar, d;
    PChar = GetMainCharacter();
    aref Link, Diag;
    string NPC_Meeting;

    DeleteAttribute(&Dialog,"Links");

    makeref(NPChar,CharacterRef);
    makearef(Link, Dialog.Links);
    makeref(d, Dialog);
    makearef(Diag, NPChar.Dialog);

    switch(Dialog.CurrentNode)
    {
        case "First 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.snd = "Voice\ANAC\ANAC001";
            dialog.text = DLG_TEXT[0];
            link.l1 = DLG_TEXT[1];
            link.l1.go = "response";
            link.l2 = DLG_TEXT[2];
            link.l2.go = "exit";
        break;
        
        case "response":
            dialog.snd = "Voice\ANAC\ANAC002";
            dialog.text = DLG_TEXT[3];
            link.l1 = DLG_TEXT[4];
            link.l1.go = "exit";
        break;
        
        case "exit":
            Diag.CurrentNode = Diag.TempNode;
            DialogExit();
        break;
    }
}<!--c2--></div><!--ec2--> but with some little changes ,like for example'
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->//#include "DIALOGS\Governor Constantin_dialog.h"
void ProcessDialogEvent()
{
    ref NPChar, PChar, d;
    PChar = GetMainCharacter();
    aref Link, Diag;
    string NPC_Meeting;

    DeleteAttribute(&Dialog,"Links");

    makeref(NPChar,CharacterRef);
    makearef(Link, Dialog.Links);
    makeref(d, Dialog);
    makearef(Diag, NPChar.Dialog);

    switch(Dialog.CurrentNode)
    {
        case "First 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.snd = "Voice\ANAC\ANAC001";
            dialog.text = DLG_TEXT[0];
            link.l1 = DLG_TEXT[1];
            link.l1.go = "response";
            link.l2 = DLG_TEXT[2];
            link.l2.go = "exit";
        break;
        
        case "response":
            dialog.snd = "Voice\ANAC\ANAC002";
            dialog.text = DLG_TEXT[3];
            link.l1 = DLG_TEXT[4];
            link.l1.go = "exit";
        break;
        
        case "exit":
            Diag.CurrentNode = Diag.TempNode;
            DialogExit();
        break;
    }
}<!--c2--></div><!--ec2--> ??

Thanks , Malk <img src="style_emoticons/<#EMO_DIR#>/buds.gif" style="vertical-align:middle" emoid=":drunk" border="0" alt="buds.gif" />
 
in your character init there is a line like: ch.Dialog.Filename = "Vincent Bethune_dialog.c";

What ever you set that to eg. "Malk Sparrow_dialog.c" you will need a file with the code in DIALOGS called Malk Sparrow_dialog and in ENGLISH Malk Sparrow_dialog

Copy and paste any dialog file from DIALOGS so its name is copy of ......._dialog.c and also the English file of the same name

Rename them Malk Sparrow_dialog and try and run it to see if it works <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />
 
Any line with \\ in front of it or any text between /* and */ does ABSOLUTELY NOTHING.
These are called "comments" and can be used to explain something in human words instead of computer code.
It's useful for the coders, but does nothing for the game.

If you want to make a second dialog file for another character, you need to make another .c (code) and .h file (text in English folder).
 
Look,i maked this script.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->string DLG_TEXT[28] = {
"Hello friend,my name is Malk Sparrow!You look like an nice fellow..perhaps you should help me with my little problem.",
"Did you said your last name is SPARROW?",
"Ye,why are you so interested about my last name?",
"My name is jack sparrow.",
"Strike me down!That's why my father camed here!Good to see you jack.",
"So,why are you here?",
"I followed my father to this place..i knew he's up to something important!",
"Hmm.And what's that problem you needed help with?",
"Well when i arrived here one guy offered to give me some advices.I got my advices but unfornately it costed my all my gold!that sneaky piece of %&*$ stolen all my gold!",
"Go on.",
"And when i found the guy..he said that he is a member of some Smugglers group or somethin'.And i have seen a group in the forest..exactly where he told me the camp would be",
"I persued him in my own way.Now lets go and kill all of'em!",
"Okey i will help you to get your gold back but first lets talk.",
".",
".",
".",
".",
".",
".",
".",
".",
".",
".",
".",
".",
".",
".",
};<!--c2--></div><!--ec2-->
and .
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->//#include "DIALOGS\Malk Sparrow_dialog.h"
void ProcessDialogEvent()
{
    ref NPChar;
    aref Link, NextDiag;

    DeleteAttribute(&Dialog,"Links");

    makeref(NPChar,CharacterRef);
    makearef(Link, Dialog.Links);
    makearef(NextDiag, NPChar.Dialog);

    ref PChar;
    PChar = GetMainCharacter();


    switch(Dialog.CurrentNode)
    {
        // -----------------------------------Äèàëîã ïåðâûé - ïåðâàÿ âñòðå÷à
        case "First 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.mood = "normal";

            dialog.snd = "Voice\ARGU\ARGU001";
            dialog.text = DLG_TEXT[0];
            link.l1 = DLG_TEXT[1];
            link.l1.go = "Exit";

        break;

        case "meet_Drow&Rackham_Again":
            dialog.snd = "Voice\ARGU\ARGU001";
            dialog.text = DLG_TEXT[2];
            link.l1 = DLG_TEXT[3];
            link.l1.go = "Exit_at_Dock";
        break;

        case "Warning_message":
            dialog.snd = "Voice\ARGU\ARGU001";
            dialog.text = DLG_TEXT[4];
            link.l1 = DLG_TEXT[5];
            link.l1.go = "Exit_Warning";
        break;

        case "We_Found_the_Motherload":
            dialog.snd = "Voice\ARGU\ARGU001";
            dialog.text = DLG_TEXT[6];
            link.l1 = DLG_TEXT[7];
            link.l1.go = "We_Found_the_Motherload2";
        break;

        case "We_Found_the_Motherload2":
            dialog.snd = "Voice\ARGU\ARGU001";
            dialog.text = DLG_TEXT[8];
            link.l1 = DLG_TEXT[9];
            link.l1.go = "We_Found_the_Motherload3";
        break;

        case "We_Found_the_Motherload3":
            GiveModel2Player("47_Jack_Skel", true);
            dialog.snd = "Voice\ARGU\ARGU001";
            dialog.text = DLG_TEXT[10];
            link.l1 = DLG_TEXT[11];
            link.l1.go = "Exit_We_Found_the_Motherload";
        break;

        case "Going_for_the_Doctor":
            dialog.snd = "Voice\ARGU\ARGU001";
            dialog.text = DLG_TEXT[12];
            link.l1 = DLG_TEXT[13];
            link.l1.go = "Exit_Going_for_the_Doctor";
        break;

        case "Exit_Going_for_the_Doctor":
            DialogExit();
            NextDiag.CurrentNode = NextDiag.TempNode;
            AddDialogExitQuest("Philippe_and_Maximus_get_Doctor");
        break;

        case "Exit_We_Found_the_Motherload":
            DialogExit();
            NextDiag.CurrentNode = NextDiag.TempNode;
            AddDialogExitQuest("Move_the_Treasure");
        break;

        case "Exit_at_Dock":
            DialogExit();
            NextDiag.CurrentNode = NextDiag.TempNode;
            AddDialogExitQuest("On_to_the_Guadelope_Tavern");
        break;

        case "Exit_Warning":
            DialogExit();
            NextDiag.CurrentNode = NextDiag.TempNode;
            AddDialogExitQuest("Maximus_and_Philippe3");
        break;
        
        case "Exit":
            DialogExit();
            NextDiag.CurrentNode = NextDiag.TempNode;
        break;

    }
}<!--c2--></div><!--ec2-->
But in game i cant speak with my character.
What would be the problem?
 
What do you mean by "can't talk with"? Nothing happens when you try to talk or you get a "can't load dialog" error on the screen?
In the second case, <a href="http://forum.piratesahoy.net//index.php?showtopic=9234" target="_blank">error logging</a> will give you the line that gives the problem in error.log.

Judging by your .c code, you just copied some existing code from another dialog. You do need to tailor the code to your dialog.
After all, you need to define which text goes where and when and where you need additional dialog options and where they lead.
 
<!--quoteo(post=336443:date=Jul 10 2009, 07:59 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Jul 10 2009, 07:59 PM) <a href="index.php?act=findpost&pid=336443"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->What do you mean by "can't talk with"? Nothing happens when you try to talk or you get a "can't load dialog" error on the screen?
In the second case, <a href="http://forum.piratesahoy.net//index.php?showtopic=9234" target="_blank">error logging</a> will give you the line that gives the problem in error.log.

Judging by your .c code, you just copied some existing code from another dialog. You do need to tailor the code to your dialog.
After all, you need to define which text goes where and when and where you need additional dialog options and where they lead.<!--QuoteEnd--></div><!--QuoteEEnd-->
Nothing happens.
 
can you tell me 1 character who just talk's with you..no quest no shit so i can copy it? <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />

Thanks,malk <img src="style_emoticons/<#EMO_DIR#>/buds.gif" style="vertical-align:middle" emoid=":drunk" border="0" alt="buds.gif" />
 
So,i can use this code <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->//#include "DIALOGS\Malk Sparrow_dialog.h"
void ProcessDialogEvent()
{
    ref NPChar, PChar, d;
    PChar = GetMainCharacter();
    aref Link, Diag;
    string NPC_Meeting;

    DeleteAttribute(&Dialog,"Links");

    makeref(NPChar,CharacterRef);
    makearef(Link, Dialog.Links);
    makeref(d, Dialog);
    makearef(Diag, NPChar.Dialog);

    switch(Dialog.CurrentNode)
    {
        case "First 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.snd = "Voice\ANAC\ANAC001";
            dialog.text = DLG_TEXT[0];
            link.l1 = DLG_TEXT[1];
            link.l1.go = "response";
            link.l2 = DLG_TEXT[2];
            link.l2.go = "exit";
        break;
        
        case "response":
            dialog.snd = "Voice\ANAC\ANAC002";
            dialog.text = DLG_TEXT[3];
            link.l1 = DLG_TEXT[4];
            link.l1.go = "exit";
        break;
        
        case "exit":
            Diag.CurrentNode = Diag.TempNode;
            DialogExit();
        break;
    }
}<!--c2--></div><!--ec2-->for any other dialog i will make but i will need to change this<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->DIALOGS\Malk Sparrow_dialog.h"
void ProcessDialogEvent()<!--c2--></div><!--ec2-->
 
You need to define the dialog name in Characters/init

Once you have done that in DIALOGS have a .c with the name you have defined
And in ENGLISh have a .h with the same name

The line at the top does nothing (It is just useful for modders keeping notes)
 
<!--quoteo(post=336449:date=Jul 10 2009, 09:27 PM:name=Malk)--><div class='quotetop'>QUOTE (Malk @ Jul 10 2009, 09:27 PM) <a href="index.php?act=findpost&pid=336449"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->for any other dialog i will make but i will need to change this<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->DIALOGS\Malk Sparrow_dialog.h"
void ProcessDialogEvent()<!--c2--></div><!--ec2--><!--QuoteEnd--></div><!--QuoteEEnd-->No; you can remove that line and it will not matter. The .h file is loaded based on the name of the .c file.
They're both loaded together and you get trouble if one of them doesn't exist.
 
Did you add his name to:
RESOURCE\INI\TEXTS\ENGLISH\Storyline\LegendJackSparrow\characters_names

The name Sparrow is there, but you would need to add your characters first name.
Malk{Malk}
to the list.
 
Actually, it seems you don't need to ad the names there, but for translation purposes it's better if you do. <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />
 
The problem can be that i dont use .(.) at the end of every dialog end?


Thanks,Malk <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />
 
Back
Top