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

Help - Making minor changes in tutorial dialog c files

Captain Alsed

Landlubber
Hi everyone;
Just trying some changes with the tutorial of Pirates of the Caribbean (stock version).
When you need to buy the spyglass, there is an instance where you may already had buy it, so i try this in MalcolmHatcher_dialog.c

C#:
        case "HereAretheTraders":
            //check if already bough spyglass
            if(CheckCharacterItem(Pchar, "spyglass2"))
            {
                dialog.text = DLG_TEXT[147];
                link.l1 = DLG_TEXT[148];
                link.l1.go = "GoToStore";
                link.l2 = DLG_TEXT[149];
                link.l2.go = "Skip_TutorialInPort";
            }
            else
            {
                addDialogExitQuest("Tut_SoBuyTheFuckingGlass");
                NextDiag.TempNode = "SoBuyTheFuckingGlass";
                dialog.text = DLG_TEXT[145];
                link.l1 = DLG_TEXT[146];
                link.l1.go = "Exit";
            }                         
        break;
      
     case "SoBuyTheFuckingGlass":
            if(CheckCharacterItem(Pchar, "spyglass2"))
            {
                dialog.text = DLG_TEXT[147];
                link.l1 = DLG_TEXT[148];
                link.l1.go = "GoToStore";
                link.l2 = DLG_TEXT[149];
                link.l2.go = "Skip_TutorialInPort";
            }
            else
            {
                NextDiag.TempNode = "SoBuyTheFuckingGlass";
                dialog.text = DLG_TEXT[150];
                link.l1 = DLG_TEXT[151];
                link.l1.go = "Exit";  
                link.l2 = DLG_TEXT[152];
                link.l2.go = "ContinueWithoutSpyglass";
                link.l3 = DLG_TEXT[153];
                link.l3.go = "Skip_TutorialInPort";
            }
        break;
     
 case "ContinueWithoutSpyglass":
            dialog.text = DLG_TEXT[154];
            link.l1 = DLG_TEXT[155];
            link.l1.go = "GoToStore";
            link.l2 = DLG_TEXT[156];
            link.l2.go = "Skip_TutorialInPort";
        break;
     
case "GoToStore":
            AddDialogExitQuest("Tut_ReloadToOxbay");
            dialog.text = DLG_TEXT[157];
            link.l1 = DLG_TEXT[158];
            link.l1.go = "Exit";                          
        break;

The dialog runs succesfully until case "GoToStore", but when it's over, the character is stuck in position, unable to move. I can't figure it out what is wrong.
Any help you're most wellcome.
 
Last edited:
You're bypassing code which calls quest case "Tut_SoBuyTheFuckingGlass". That contains this line:
Code:
Lai_SetPlayerType(PChar);
And that's what puts you back in control of your character, allowing you to move, talk, fight etc.

Edit "both_reaction.c", find case "Tut_ReloadToOxbay", and add the same line there. It shouldn't do any harm if you're already in player mode and should ensure that you switch to player mode if you bypassed the code to buy the spyglass.
 
Back
Top