• 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

ok, so i was a little pissed off to write actual words before. probably lost a couple of hours for each of these ,
it does work now. if i wasn't pissed off i probably would've been proud of myself...
No worries, mate. Happens to the best of us. :yes

In the meantime, did @Jack Rackham's suggestion help you to fix it?
Can I include some files in my coming modpack update then? :cheeky
 
In the meantime, did @Jack Rackham's suggestion help you to fix it?

Yes, after i added the two comas the new line popped up immediately for the first time, right when i needed it to. Thanks @Jack Rackham. Only thing is the player/officer icons on the lower left appear in front of that but since it happens to be a monologue they don't really cover anything up.

Can I include some files in my coming modpack update then? :cheeky

When is this coming? I have been making changes to some of the dialogs for a more correct spelling plus an attempted more Jack Sparrowy feeling wherever possible but nothing is finished and i would like to replay the first changed parts because maybe i've added too much too soon? i could upload them if you just wanted to see/test what has been done so far still being a WIP
 
When is this coming? I have been making changes to some of the dialogs for a more correct spelling plus an attempted more Jack Sparrowy feeling wherever possible but nothing is finished and i would like to replay the first changed parts because maybe i've added too much too soon? i could upload them if you just wanted to see/test what has been done so far still being a WIP
The original idea was to make the new installer today.
But now I'm finally taking some time to check some still outstanding issues myself, so maybe I'll delay a bit...
 
I don't know how it works, then. One such case is "calling_the_black_pearl", which calls for text line 274, which is "[The cursed coin in the necklace around Elizabeth's neck has called the Black Pearl]". Can anyone who has played "Jack Sparrow" remember what, if anything, you say to yourself in answer to that?

I think that the top box of the dialog is blank - and the bottom box ( the one the player says ) has that text in it. -- Or there is only one box of text on the screen with that text in it.

Can't remember which.


:cheers
 
But you may admittedly want to hold off until you've sorted out that Maximus and Philippe quest issue you were working on. :doff

The dialogue part that i wanted to create can be considered fixed. However immediately after this, there is supposed to be a fight with pirates upon exiting the cave which never happens. And after that a dialogue with Teague that mentions the fight. So either the fight has to be fixed, or skipped and i have to fix the dialogue after to never mention it.

Here is the code after the part i was working on , the last case leads to "Another_local_option"

Code:
case "Another_local_option":
            LAi_SetImmortal(Pchar, true);
//            AddQuestRecord("The Brotherhood",17); // Talisman was 16 <- wrong
            AddQuestRecord("Aztec",16);                // TALISMAN - moved entry to different header - makes more sense
            ChangeCharacterAddressGroup(CharacterFromID("Treas_Pirate_9"), "IslaDemuerte_shore_01", "goto", "citizen01");
            ChangeCharacterAddressGroup(CharacterFromID("Treas_Pirate_8"), "IslaDemuerte_shore_01", "goto", "locator13");
            GiveItem2Character(CharacterFromId("Treas_Pirate_9"), "blade4");
            GiveItem2Character(CharacterFromId("Treas_Pirate_8"), "blade4");
            equipCharacterByItem(CharacterFromId("Treas_Pirate_9"), "blade4");
            equipCharacterByItem(CharacterFromId("Treas_Pirate_8"), "blade4");
            ChangeCharacterAddressGroup(characterFromID("Teague Sparrow"), "IslaDeMuerte_Cabin", "goto", "locator1");
        //    ChangeCharacterAddressGroup(characterFromID("Matthew Shaw"), "IslaDeMuerte_Cabin", "sit", "sit1"); // Talisman: That's Vanderdecken's seat!
        //    LAi_SetSitType(characterfromID("Matthew Shaw")); // Talisman: That's Vanderdecken's seat!
            ChangeCharacterAddress(characterFromID("Captain Philippe"), "None", "");
            ChangeCharacterAddress(characterFromID("Captain Maximus"), "None", "");
            LAi_Fade("Fight_the_Muerte_Pirates", "");
        break;

        case "Fight_the_Muerte_Pirates":
            LAi_SetPlayerType(pchar);
//            AddQuestRecord("The Brotherhood",16); // Talisman moved up a case so player gets entry at treasure telling them what to do
            LAi_ActorAttack(CharacterFromID("Treas_Pirate_8"), PChar, "");
            LAi_ActorAttack(CharacterFromID("Treas_Pirate_9"), PChar, "");

            Pchar.quest.Killed_the_Muerte_Pirates.win_condition.l1 = "NPC_Death";
            Pchar.quest.Killed_the_Muerte_Pirates.win_condition.l1.character = "Treas_Pirate_9";
            Pchar.quest.Killed_the_Muerte_Pirates.win_condition.l2 = "NPC_Death";
            Pchar.quest.Killed_the_Muerte_Pirates.win_condition.l2.character = "Treas_Pirate_8";
            Pchar.quest.Killed_the_Muerte_Pirates.win_condition = "Killed_the_Muerte_Pirates";
        break;

        case "Killed_the_Muerte_Pirates":
            Pchar.quest.Father_in_beach_ship.win_condition.l1 = "location";
            PChar.quest.Father_in_beach_ship.win_condition.l1.character = Pchar.id;
            Pchar.quest.Father_in_beach_ship.win_condition.l1.location = "IslaDeMuerte_Cabin";
            Pchar.quest.Father_in_beach_ship.win_condition = "Father_in_beach_ship";
        break;

        case "Father_in_beach_ship":
            characters[GetCharacterIndex("Teague Sparrow")].Dialog.Filename = "Teague Sparrow_dialog.c";
            LAi_SetActorType(characterFromID("Teague Sparrow"));
            LAi_ActorDialog(characterFromID("Teague Sparrow"),PChar,"",5.0,5.0);
            Characters[GetCharacterIndex("Teague Sparrow")].dialog.currentnode = "Father_on_IslaDemuerte";
        break;
 
The dialogue part that i wanted to create can be considered fixed. However immediately after this, there is supposed to be a fight with pirates upon exiting the cave which never happens. And after that a dialogue with Teague that mentions the fight. So either the fight has to be fixed, or skipped and i have to fix the dialogue after to never mention it.
Do you have a savegame again? Or is it still the one you posted earlier?
Can you upload your PROGRAM\globals.c and PROGRAM\ITEMS\items.h, please?
Since my game is by now a bit "too new", I need those files to 'fake' savegame compatibility without causing my game to crash... :wp

Unfortunately I don't have time to check this now, but it should be doable to fix the fight.
Maybe @Jack Rackham or @Grey Roger may see the chance to help you if I can't find the opportunity in time?
 
Use the same savegame from before. It is very close to the fight.
 

Attachments

  • globals.c
    13 KB · Views: 113
  • items.h
    3.6 KB · Views: 107
Use the same savegame from before. It is very close to the fight.
Thanks. Can't make any promises on when I get the chance to look at it, but with a bit of luck it will be before the end of the day.
Maybe, perhaps....
 
Tried the game with the save from post #4

The 2 pirates don't appear on the beach after you leave the cave. :yes

Got these entries in the compile log

Code:
Quest name Philippe_and_Maximus_get_Doctor FOUND in QuestComplete
Template <runto> -> timeout for chr.id = Captain Philippe
Template <runto> -> teleport chr.id = Captain Philippe to <goto : goto12>
Quest name Another_local_option FOUND in QuestComplete
Actor error: character <Treas_Pirate_8> now is not actor, his have type <warrior>
Actor error: character <Treas_Pirate_9> now is not actor, his have type <warrior>
Quest name Fight_the_Muerte_Pirates FOUND in QuestComplete
Quest name Killed_the_Muerte_Pirates FOUND in QuestComplete
Reload: Process started for locator_name = reload2_back and lockedReloadLocator =
reload_cur_island_index = -1

No error log

:drunk
 

Attachments

  • compile.log
    7.9 KB · Views: 91
  • system.log
    5.5 KB · Views: 104
@Talisman: Are these lines here correct, do you know?
Code:
ChangeCharacterAddressGroup(CharacterFromID("Treas_Pirate_9"), "IslaDemuerte_shore_01", "goto", "citizen01");
ChangeCharacterAddressGroup(CharacterFromID("Treas_Pirate_8"), "IslaDemuerte_shore_01", "goto", "locator13");

Last time I had characters not appears was yesterday, but that same LoginTime problem does not seem to affect these two guys.
So whatever this is, it is a different problem.
 
The problem seems to be very similar to the "3D Sailing Mode CTD" problem we had before:
As far as the game is concerned, those enemies are already dead before you even get to fight them.
This is Levelling-related.
 
@Talisman: Are these lines here correct, do you know?
Code:
ChangeCharacterAddressGroup(CharacterFromID("Treas_Pirate_9"), "IslaDemuerte_shore_01", "goto", "citizen01");
ChangeCharacterAddressGroup(CharacterFromID("Treas_Pirate_8"), "IslaDemuerte_shore_01", "goto", "locator13");

Last time I had characters not appears was yesterday, but that same LoginTime problem does not seem to affect these two guys.
So whatever this is, it is a different problem.


Yes - I have checked the locators & they are OK.

Also checked the time of day @jack sparring was playing at night - I tried night & day time - both cases they did not appear

Also tried removing the 2 Officers ( Rhys Bloom & Fred Bob) - but that also made no difference.

The last time I played this part was with Beta 4 ( 18 Sept version ) and it worked OK then. :yes

:drunk
 
I've got a pretty good idea why this is going wrong and it is NASTY.
Definitely a new problem and not at all easily fixed by beginning modders. In fact, it is giving me a hard time too.

As I said above, it seems to be a side-effect of recent Levelling-related changes. Maybe @Levis has any ideas.
I could probably figure out a band-aid fix for this particular example, but I am afraid of similar problems cropping up in other spots.
Surprising as it may be, it seems to be pretty much the same issue as this one: Fixed - Levelling: Missing Ships and Crashes on Encounter Reload from Worldmap to Sea | PiratesAhoy!
And it may even be related to this one too: Unconfirmed Bug - Levelling: Boarding Enemy not Correctly Initialized | PiratesAhoy!
 
As a "fix" for the non-appearing pirates, try the attached.
Extract to PROGRAM\Storyline\JackSparrow\quests to make use of this.

It ended up as quite an insane bit of coding because I tried to make use of the already existing "Treas_Pirate" characters that were already in use there before:
Code:
    case "Fight_the_Muerte_Pirates":
//       AddQuestRecord("The Brotherhood",16); // Talisman moved up a case so player gets entry at treasure telling them what to do
     /*   LAi_ActorAttack(CharacterFromID("Treas_Pirate_8"), PChar, "");
       LAi_ActorAttack(CharacterFromID("Treas_Pirate_9"), PChar, "");*/
       
       for(cc =  8; cc <= 9 ; cc++)
       {
         sld = &Characters[GetcharacterIndex("Treas_Pirate_" + cc)];
         ClearCharacter(sld); // PB: Clear ALL attributes from previous character
         sld.nation = PIRATE;
         SetModelfromArray(sld, GetModelIndex(GetRandomModelForTypeExSubCheck(1, "Sailors", "man", sti(sld.nation))) );
         SetRandomNameToCharacter(sld);
         InitCharacterSkills(sld);   // PB: Reset this character
         LAi_NPC_Equip(sld, sti(sld.rank), true, true);
         LAi_SetWarriorType(sld);
         LAi_group_MoveCharacter(sld, "treasure_pirates");
         LAi_SetImmortal(sld, false);
       }

       ChangeCharacterAddressGroup(CharacterFromID("Treas_Pirate_9"), "IslaDemuerte_shore_01", "goto", "citizen01");
       ChangeCharacterAddressGroup(CharacterFromID("Treas_Pirate_8"), "IslaDemuerte_shore_01", "goto", "locator13");

Normally we would use one line like this to generate a temporary character:
Code:
sld = LAi_CreateFantomCharacter(false, 0, false, true, 0.25, "black_corsair", "goto", "goto19");
In this case though I wanted to know what was needed to make it work like this so that I could apply the same changes to GenerateTreasureQuest in MAXIMUS_functions.c .

This seems to work, but there should definitely be simpler and cleaner solutions.
@Levis should probably have a look into this one as similar situations may occur elsewhere as well.
 

Attachments

  • quests_reaction.zip
    53.8 KB · Views: 101
Also, @jack sparring did quite a nice job on his first code changes! It definitely seems more fluid now.

Probably could still use some further work though. For example, I'd like to try and figure out why that self dialog does not show properly.

And should the player remain locked in place until Maximus and Philippe leave or should those two just be allowed to get a head start?
Alternate idea would be to lock the player, wait a bit, self dialog, allow player to move, then another self dialog of "now what?" once those two actually leave.
Depends on how @jack sparring would prefer it to work. :doff
 
@Pieter Boelen could you recap the problem?
Refer to the code in this post above for the original situation: Fix in Progress - Jack Sparrow: Improvements to Maximus and Philippe Quest | Page 3 | PiratesAhoy!

- A bunch of "Treasure Quest" pirate characters are initialized in TActors.c
- These are reused again for each Treasure Quest; for details, see here: Fix in Progress - Levelling: Treasure Quest Pirates Unaffected | PiratesAhoy!
- However, these guys are ALSO re-purposed in this part of the Jack Sparrow main quest for some reason (???)
- They should appear as enemies, but they don't and they DO need to die for the quest to continue
- That doesn't actually break the quest though, since the reason they didn't appear is because the game figures they're ALREADY DEAD (remember we had that problem before, but at sea)
- Probably happens because they were used in a Treasure Quest, got killed and then the game considered them dead and wouldn't resurrect them properly again

Come to think of it, this MAY have been the reason why Claire Larrousse's ship never reappeared after killing her as well.
That must have worked at some point in the past, but we "fixed" it by assigning a completely different character with a technically brand new ship instead.
Could "Claire" also have been "already dead" so that the game skipped the part where you have to fight her again?
 
Probably could still use some further work though. For example, I'd like to try and figure out why that self dialog does not show properly.

And should the player remain locked in place until Maximus and Philippe leave or should those two just be allowed to get a head start?

I think he should be locked because he is not going after them. He decides to remain in the island and search the bays for some to help his "condition". Plus he gets into the pirate fight later , which now works, so the pirates missed the other captains which I believe is another reason why this head start should be obvious.

But could still need some work to show properly but i won't consider it a priority. I won't have so much time this week so I will stick to the dialogs mostly, for now, as coding when I have no idea is ridiculously time consuming for me :unsure
 
Back
Top