• 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 Possible problem with ship hunting

Grey Roger

Sea Dog
Staff member
Administrator
Storm Modder
I made a quick trip to Cayman to check whether certain side quests are properly disabled in the "Bartolomeu" storyline. In particular, "First Contact", i.e. Elizabeth Shaw's disappearance, is disabled, which means when I talked to the governor and asked about business, he gave me a regular ship-hunting quest instead, which produced an error message. So I reloaded my savegame at Jamaica, asked that governor about business, got a ship-hunting quest and got the same error:

"ERROR - Quest name kill_pirate_agree NOT found in ANY function"

kill_pirate_error.jpg

Log files attached. I can supply a savegame, if you don't mind walking from the port, as it's one of my usual savegames from just before I'm about to board ship.
 

Attachments

  • compile.zip
    2.4 KB · Views: 68
  • error.zip
    274 bytes · Views: 81
  • system.zip
    1.1 KB · Views: 65
But "kill_pirate_agree" should be defined in PROGRAM\QUESTS\quests_common.c; it has been there forever. :shock
 
I have been doing some ship hunting for the French and Dutch with no problems. Is it only the English that have a problem?
 
Or is it only in the Bartolomeu storyline that there is a problem?
 
And now it gets weirder. At the time when I posted the report, I hadn't had enough play time to try a ship-hunting quest; I'd run out of time after doing a few quick tests e.g. getting to Cayman and checking that a couple of blocked side quests really were blocked. During the most recent play session I started off at Port Royal again, accepted a ship-hunting quest, ignored the error message and put to sea. The normal message about Direct Sail being disabled due to a ship-hunting quest duly appeared. After using Sail-To to get to various ships in the vicinity, I eventually found the target ship, sank it and got a quest book update, then returned to port and got the reward from the governor.

Despite the error message, the ship-hunting quest completed successfully. :confused:
 
We've had that before when there was an unnecessary "return" call somewhere in the quest coding that prevented the game from understanding that the case HAD actually been found.
Do you have a savegame just before the error message is triggered? Perhaps we can find where the game gets confused.
 
The error message is triggered as soon as you accept a ship-hunting quest. I don't have a savegame with you standing in or near the governor's residence, but here's one where I'm at the port ready to board ship. I wasn't planning on doing a ship-hunting quest when I saved this, so I used this savegame as a start point for various tests and never bothered saving game after any of them. It's a quick walk to the governor's residence, or you can just use Fast Travel. ;)
 

Attachments

  • -=Player=- Jamaica.zip
    978 KB · Views: 70
This was a REALLY weird problem and I haven't got a clue how you managed to trigger this.
See here the relevant code:
Code:
    // PB: Error checking -->
     ref PChar = GetMainCharacter();

     // Common Quests
     CommonQuestComplete(sQuestName);             // <-- Execute the actual quest case
     if(!CheckAttribute(PChar, "questnotfound"))
     {
       trace("Quest name " + sQuestName + " FOUND in CommonQuestComplete");
       return;
     }
     DeleteAttribute(PChar, "questnotfound");

     // Main Quests
     LoadStorylineFile("quests\", "quests_reaction.c");     // PB: To Prevent Errors
     QuestComplete(sQuestName);                 // <-- Execute the actual quest case
     if(!CheckAttribute(PChar, "questnotfound"))
     {
       trace("Quest name " + sQuestName + " FOUND in QuestComplete");
       return;
     }
     DeleteAttribute(PChar, "questnotfound");

     // Both Quests
     LoadStorylineFile("quests\", "both_reaction.c");     // PB: To Prevent Errors
     BothQuestComplete(sQuestName);               // <-- Execute the actual quest case
     if(!CheckAttribute(PChar, "questnotfound"))
     {
       trace("Quest name " + sQuestName + " FOUND in BothQuestComplete");
       return;
     }
     DeleteAttribute(PChar, "questnotfound");

     // Side Quests
     SideQuestComplete(sQuestName);               // <-- Execute the actual quest case
     if(!CheckAttribute(PChar, "questnotfound"))
     {
       trace("Quest name " + sQuestName + " FOUND in SideQuestComplete");
       return;
     }
     DeleteAttribute(PChar, "questnotfound");

     TraceAndLog("ERROR - Quest name " + sQuestName + " NOT found in ANY function");
     // PB: Error checking <--
The "questnotfound" attribute is something that I added for error checking purposes.
It is added at the bottom of each quest case file (quests_common.c, quests_side.c, quests_reaction.c and both_reaction.c) and removed again when the next such file is called.
So that means that if the attribute is there, then the case wasn't found, but if a quest case IS found, then it would abort prior to adding that line.

What happened in this case is that your character already had this attribute before the quest case was called.
That should not be possible because the attribute is always added and removed right after each other.
But not now....

Anyway, to fix this I added an extra DeleteAttribute line before the CommonQuestComplete call.
That will ensure that even if for whatever bizarre reason you did have that attribute before, it will be cleared before calling the next quest.

Makes sense? :facepalm
 
Strange. Either something in the "Bartolomeu" main quest is triggering it or one of the numerous side quests I've completed didn't disable that attribute.
 
The only thing I can think of is if the quest-case searching was aborted while it was in progress.
Rather odd since that whole process takes only a split second or so. But at least this should prevent it in the future.
 
Back
Top