• 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 Jack Sparrow: Improvements to Maximus and Philippe Quest

jack sparring

Sailor Apprentice
Storm Modder
Maybe if we are lucky @jack sparring will eventually start fixing the jack sparrow storyline more :p.

I don't know what kind of fixes you have in mind and if i will ever be able to do them. Only time will tell. But for now i want to ask if it is possible to add a line while there is some kind of event going on. And i explain.
Went for the treasure of Cortez with Jack, found it and got the dialogue with captain Maximus and captain Philippe to work (i'll comment on that below). so when the dialogue ends Jack is cursed and they are running off to Cayman to fetch a doctor. while they are running away, as we wait for them to disappear from screen, the player can't move and we just have to wait until they are gone for the game to continue (that's what i called event, this waiting period). I want to add a line while this is happening, if it's possible, where Jack shouts at them to wait, not go and just leave him there waiting (they are leaving him in a cursed island for who knows how many days until they return right?). How can i do that?

And the comment about the dialogue with the two captains. After opening the treasure the first time and taking the coins, the dialogue didn't initiate. And without the dialogue there is no questbook update. I tried several times and found out it only triggered when i stepped in a certain spot between the two piles of gold, beside the chest, that has light shining on it passing through a crack in the wall. Is that intended? Nice idea, when the moonlight shines on him the others see him cursed but there is a chance that someone who doesn't know this might be stuck there. I tried a couple of times wandering around before i stepped there accidentally.
 
I don't know what kind of fixes you have in mind and if i will ever be able to do them. Only time will tell. But for now i want to ask if it is possible to add a line while there is some kind of event going on. And i explain.
Went for the treasure of Cortez with Jack, found it and got the dialogue with captain Maximus and captain Philippe to work (i'll comment on that below). so when the dialogue ends Jack is cursed and they are running off to Cayman to fetch a doctor. while they are running away, as we wait for them to disappear from screen, the player can't move and we just have to wait until they are gone for the game to continue (that's what i called event, this waiting period). I want to add a line while this is happening, if it's possible, where Jack shouts at them to wait, not go and just leave him there waiting (they are leaving him in a cursed island for who knows how many days until they return right?). How can i do that?
I'm hoping @Levis or @Grey Roger can elaborate on that one; I myself am hard-pressed for time this whole week. :(
One very simple solution is to add a "LogIt" message that appears at the top-right corner of the screen.

Do you have any log files from this situation? And maybe a savegame too?
It is not a part I ever played through, so I'm quite curious. Maybe the quest coding itself could be tweaked to be a bit more convenient.

And the comment about the dialogue with the two captains. After opening the treasure the first time and taking the coins, the dialogue didn't initiate. And without the dialogue there is no questbook update. I tried several times and found out it only triggered when i stepped in a certain spot between the two piles of gold, beside the chest, that has light shining on it passing through a crack in the wall. Is that intended? Nice idea, when the moonlight shines on him the others see him cursed but there is a chance that someone who doesn't know this might be stuck there. I tried a couple of times wandering around before i stepped there accidentally.
It may be linked to stepping on a "locator". To see what that means, open PROGRAM\InternalSettings.h and set VISIBLE_LOCATORS to 1 at the bottom.
If the locator is too small, it is possible to increase its radius.
 
I don't know what kind of fixes you have in mind and if i will ever be able to do them. Only time will tell. But for now i want to ask if it is possible to add a line while there is some kind of event going on. And i explain.
Went for the treasure of Cortez with Jack, found it and got the dialogue with captain Maximus and captain Philippe to work (i'll comment on that below). so when the dialogue ends Jack is cursed and they are running off to Cayman to fetch a doctor. while they are running away, as we wait for them to disappear from screen, the player can't move and we just have to wait until they are gone for the game to continue (that's what i called event, this waiting period). I want to add a line while this is happening, if it's possible, where Jack shouts at them to wait, not go and just leave him there waiting (they are leaving him in a cursed island for who knows how many days until they return right?). How can i do that?
My guess is that this is the code responsible:
Code:
    case "Philippe_and_Maximus_get_Doctor":
       LAi_SetActorType(pchar);
       RemoveCharacterCompanion(pchar, characterFromID("Captain Maximus"));
       RemoveCharacterCompanion(pchar, characterFromID("Captain Philippe"));
       LAi_ActorRunToLocator(characterFromID("Captain Philippe"), "goto", "goto12", "",13.0);
       LAi_ActorRunToLocator(characterFromID("Captain Maximus"), "goto", "goto12", "",13.0);
       LAi_QuestDelay("Another_local_option", 14.0);
     break;
You can't set up a dialog with either Captain Philippe or Captain Maximus because that will bring the captain running back to you to have the dialog. So you would need to use 'LAi_ActorSelfDialog' to have Sparrow talk to himself. There's an example of this in "PROGRAM\QUESTS\quests_side.c" when you've just found the sword that you get as a reward for the "Angelique Moulin's father" side quest:
Code:
    case "cachette":
       LAi_SetActorType(Pchar);
       Pchar.Temp.self.dialog = Pchar.dialog.currentnode;
       Pchar.dialog.currentnode = "Francis_sword";
       LAi_ActorSelfDialog(Pchar, "player_back");
     break;

So you might be able to change that 'LAi_QuestDelay' line to, perhaps, 'LAi_QuestDelay("come_back", 7.0);'. Add case "come_back" which includes a block like the one in "cachette" above, to arrange for Jack to say something suitable. And have that lead to one more case which includes 'LAi_QuestDelay("Another_local_option, 7.0);' to make up the rest of the delay and put the story back on track.

This, however, is a guess. You don't want to know how many times I've been making guesses like this while working on "Hornblower", finding it didn't work the way I expected, and having to try something else. So you can either try this at your own risk or wait until someone who knows how to code properly can say whether this will do what you want...

And the comment about the dialogue with the two captains. After opening the treasure the first time and taking the coins, the dialogue didn't initiate. And without the dialogue there is no questbook update. I tried several times and found out it only triggered when i stepped in a certain spot between the two piles of gold, beside the chest, that has light shining on it passing through a crack in the wall. Is that intended? Nice idea, when the moonlight shines on him the others see him cursed but there is a chance that someone who doesn't know this might be stuck there. I tried a couple of times wandering around before i stepped there accidentally.
As @Pieter Boelen says, this will be due to having to step on a locator to trigger the dialog. My guess is that this is the responsible code:
Code:
    case "Maximus_and_Philippe_on_the_Beach":
       ChangeCharacterAddressGroup(characterFromID("Captain Philippe"), "Grotto", "goto", "goto2");
       ChangeCharacterAddressGroup(characterFromID("Captain Maximus"), "Grotto", "goto", "goto1");   

       pchar.quest.Maximus_and_Philippe_In_the_Grotto.win_condition.l1 = "locator";
       pchar.quest.Maximus_and_Philippe_In_the_Grotto.win_condition.l1.location = "Grotto";
       pchar.quest.Maximus_and_Philippe_In_the_Grotto.win_condition.l1.locator_group = "goto";
       pchar.quest.Maximus_and_Philippe_In_the_Grotto.win_condition.l1.locator = "goto4";
       pchar.quest.Maximus_and_Philippe_In_the_Grotto.win_condition = "Maximus_and_Philippe_In_the_Grotto";
     break;
Case "Maximus_and_Philippe_In_the_Grotto" certainly involves a dialog with Captain Maximus involving finding the treasure.

I ran into a similar problem in "Hornblower" because there's a point where you need to be standing in the right place to trigger a dialog with Lt. Uriah Quelp, and it always took me ages to find the spot even when I knew roughly where I needed to be. Here's how I made the locator larger:
Code:
Locations[FindLocation("Antigua_outskirts")].locators_radius.goto.goto60 = 5.0;
So you probably want to put 'Locations[FindLocation("Grotto")].locators_radius.goto.goto4 = 5.0;' somewhere in there. Edit "InternalSettings.h", enable visible locators, then play around with that value - set it to something big enough that you can find the spot more easily without it taking up half the cave.
 
Do you have any log files from this situation? And maybe a savegame too?
It is not a part I ever played through, so I'm quite curious. Maybe the quest coding itself could be tweaked to be a bit more convenient.


It may be linked to stepping on a "locator". To see what that means, open PROGRAM\InternalSettings.h and set VISIBLE_LOCATORS to 1 at the bottom.
If the locator is too small, it is possible to increase its radius.

It is a locator and it is quite easy to miss. Here are the logs and a savegame right after landing on the beach. Additional comments if you take the time to check it out:

1) When talking to Captain Maximus the place where there is usually a face "talking" to you is blank. (That's for captain maximus through the whole game)
2) I'm supposed to get in a fight after leaving the cave according to the story guide and the dialogue later with Captain Teague which never happens
3) Earlier in the game there are characters informing Jack that the treasure is cursed but everyone here acts as if they didn't know except Teague.
 

Attachments

  • -=Monkey D Luffy=- Isla de Muerta.7z
    633.2 KB · Views: 95
  • compile.log
    9.3 KB · Views: 124
  • system.log
    4.8 KB · Views: 110
They don't matter because you will be using your own names.

"Francis_sword" is the name of a dialog node in a dialog.c file used by the side quest. You'll want to add a new case block to "PROGRAM\Storyline\JackSparrow\dialogs\Blaze_dialog.c" and some new text to "PROGRAM\Storyline\JackSparrow\dialogs\ENGLISH\Blaze_dialog.h" to define your new dialog. Whatever name you assign to the new case block, that's what you put instead of "Francis_sword". (In fact, you can find "Francis_sword" in that version of "Blaze_dialog.c" because it's been copied in its entirety from somewhere else.)

"player_back" is the name of the quest case which should follow on from the dialog. I had suggested that after the dialog you define another new case block which contains 'LAi_QuestDelay("Another_local_option, 7.0);'. The name of that case block is what should replace "player_back" in your 'LAi_ActorSelfDialog' line.
 
1) When talking to Captain Maximus the place where there is usually a face "talking" to you is blank. (That's for captain maximus through the whole game)
The Maximus character uses an AoP model and that game never had animated heads.
Only way to "solve" that is by taking a PotC head, renaming it and pretending that it fits with the Maximus model when it technically doesn't... :wp

2) I'm supposed to get in a fight after leaving the cave according to the story guide and the dialogue later with Captain Teague which never happens
Sounds like I really DO need to play through this some time to see what happens.
Agh, I need more time! :shock

3) Earlier in the game there are characters informing Jack that the treasure is cursed but everyone here acts as if they didn't know except Teague.
Could you change that by improving the dialog texts?

the "francis_sword" and "player_back" cases in which files are they located?
Just in case it is of any help, "player_back" is a general quest function from PROGRAM\QUESTS\quests_common.c .
 
I just wanted to see where each is located so that i can see your example in its entire complete version (what file gets "called" by what file etc) and maybe figure out how this thing works as it looks simple enough (i guess compared to other things) and maybe i can pull this off.
where exactly i put the case in the Blaze_dialog.c is irrelevant right?
 
Could you change that by improving the dialog texts?
That means removing some lines completely or replace those entire dialogues with something else. I'd like to avoid the first option so when i come back to this i'm gonna try replacing them with new ones. i prefer correcting than making up from scratch but what the heck, i've got imagination, maybe i can come up with something good.
 
Using a selfdialog should work in this case indeed. Calling it by a questdelay should also work.
There is probably a quest case called when they exit the area. You could just remove that and have it called trough the dialog exit to put it back on track again.
I will answer more elaborate later, but maybe @Grey Roger could show want I mean.
 
where exactly i put the case in the Blaze_dialog.c is irrelevant right?
Indeed, as long as it is together with all the other cases. Normally people just add their new cases to the bottom.

That means removing some lines completely or replace those entire dialogues with something else. I'd like to avoid the first option so when i come back to this i'm gonna try replacing them with new ones. i prefer correcting than making up from scratch but what the heck, i've got imagination, maybe i can come up with something good.
All it takes is a little imagination. :onya

Using a selfdialog should work in this case indeed. Calling it by a questdelay should also work.
Maybe something like what I did with the opening of the Jack Sparrow storyline?
I mean the example when you get to the Tortuga tavern still as Guy Verbinski and talk to the tavern owner about a room.
Then you get a dialog, a small delay, an automated self dialog and then "back to player".
 
About the locator problem.
You could for example:
Remove the locator requirement. If jack starts a dialog with one of them there is one line, after that you make jack an actor let him walk to the locator and then start the dialog again.
 
i tried to make some changes, loaded the savegame but i get a "couldn't load the quests_reaction.c file" message. did i break the file or is it possible that it's just incompatible with the savegame now?
 
did i break the file or is it possible that it's just incompatible with the savegame now?
Changes to the quest files don't cause savegame imcompatibility. :no
Have a look in your main game folder for "error.log"; probably that will point you to the relevant spot. :doff
 
Sounds like you broke it :p.
The game did start?
 
Could you post the code you wrote?
 
ok. i'm flying blind here , i don't know what i'm doing :p. Don't worry though i keep backups.

this is the part from quests_reaction.c
Code:
case "Philippe_and_Maximus_get_Doctor":
            LAi_SetActorType(pchar);
            RemoveCharacterCompanion(pchar, characterFromID("Captain Maximus"));
            RemoveCharacterCompanion(pchar, characterFromID("Captain Philippe"));
            LAi_ActorRunToLocator(characterFromID("Captain Philippe"), "goto", "goto12", "",7.0);
            LAi_ActorRunToLocator(characterFromID("Captain Maximus"), "goto", "goto12", "",7.0);
            LAi_QuestDelay("come_back", 7.0);
        break;

        case "come_back":
            LAi_SetActorType(Pchar);
            Pchar.Temp.self.dialog = Pchar.dialog.currentnode;
            Pchar.dialog.currentnode = "isla_muerta_alone";
            LAi_ActorSelfDialog(Pchar, "they_are_gone");
        break;

        case "they_are_gone":
            LAi_SetActorType(pchar);
            LAi_ActorRunToLocator(characterFromID("Captain Philippe"), "goto", "goto12", "",6.0);
            LAi_ActorRunToLocator(characterFromID("Captain Maximus"), "goto", "goto12", "",6.0);
            LAi_QuestDelay("Another_local_option", 7.0);
        break;

and this from blaze_dialog.c
Code:
case "isla_muerta_alone":
        Dialog.Text = DLG_TEXT[306];
        Link.l1.go = "exit";
    break;
 
There's no 'Link.l1 = DLG_TEXT[307];' line. Dialogs always seem to be of the form "he says something, you say something back", even when you're both sides of the dialog in a 'LAi_ActorSelfDialog'. I'm not sure what happens if that line is missing but I think you've found out. :D
 
I always use it this block for selfdialogs, and it works:

case "sketch_cliff_found":
LAi_SetActorType(pchar);
characters[GetCharacterIndex("Blaze")].dialog.CurrentNode = "sketch_cliff_found";
LAi_ActorSelfDialog(pchar, "");
break;
 
Back
Top