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

Solved Quests Not Executing

I'll see what I can do in the future.
You mean in itemlogic for example?
Exactly. Should be easy enough. And then we could even put in some code so none of it is executed outside your storyline.
Wouldn't make much difference, but might help a bit with performance here and there.

I know what you mean. I put in an unique searchword which takes me right where I want.
That's why you see my own name left here and there.
That's what I did too. But then it was still much to go through. You've done a LOT of work! :shock

Only thing I don't understand is why these messages show up on the screen.
To me it looks like text you find in compile log.
Simply because I told them to be there by using TraceAndLog instead of just trace. I want to actively check this while playing the game, so I want to see it when it occurs and not afterwards. :shrug

I have tested the WoodesRogers storyteller and am sorry to say that the function of returning to cabin will be skipped soon.
It's too complex - I can't control everything - meaning can't reset all.
I was afraid of that. Oh well, so be it. Easy enough to start a new game if you really want to go some place else. :doff
 
I think I have just had one of these

Playing - Jack Sparrow - Hoist the Colors -Main Story

At the beginning - just talked to Teague & Matthew Shaw in Caymen Town Hall - exited - talked to Thomas Tipman outside - then entered Tavern to meet Thomas the Terror -- Thomas not there.

Compile Log:
Code:
Bnd: 0.0000000, Vag: 0.5000000, Sk: 0, Mo: 0, Mu: 0
Equip Character Mirabel with blade1+2 his nation: 0 blade nation=
ItemLogic: On load location Grand_Cayman_Tavern
ItemLogic: found 0 buttons
OnQuestComplete called for More_information_Cayman
Quest name More_information_Cayman not found in CommonQuestComplete
SETTING MUSIC: music_tavern
SetCharacterTask_GotoPoint -> locator 'stay1' in group 'tables' not found
Template <goto> -> path not found chr.id = Grand_Cayman_officiant

:shrug

Error log shows:
Code:
RUNTIME ERROR - file: quests\quests_check.c; line: 426
Invalid function call
RUNTIME ERROR - file: quests\quests_check.c; line: 426
function 'OnQuestComplete' stack error
 

Attachments

  • error.log
    175 bytes · Views: 130
  • compile.log
    19.7 KB · Views: 149
  • system.log
    27.1 KB · Views: 150
And again inconsistent like usual! I happened to play that exact same part today and it worked fine.
Code:
OnQuestComplete called for More_information_Cayman
Quest name More_information_Cayman not found in CommonQuestComplete
^ That's REALLY quite ugly! It cocks up on the quests_reaction.c file somewhere, but this still doesn't quite give me enough information.
I added even MORE trace lines in today's code update here: http://www.piratesahoy.net/threads/build-14-beta-3-progress.20686
Hopefully that will give us even more to go on when this happens again. (Me no likey this one!!! :whipa) Thanks for helping! :cheers

--------------------------------------------------------------------------------------------------------------------

I got this one myself:
Code:
CompleteQuestName called for
Quest name  not found in CommonQuestComplete
Quest name  not found in QuestComplete
Quest name  not found in BothQuestComplete
ERROR - Quest name  NOT found in ANY function
But I've experienced no ill effects from that one. It happened during the opening scenes of Jack Sparrow. Have to try again to see if that one is consistent. :facepalm
Edit: Indeed it IS consistent. Simply because of using DoQuestReloadToLocation without an actual quest to trigger. Nothing to worry about at all. :no

Edit 2: Turns out that the REAL correct way to not execute a quest after the reload is to use "_" instead of ".
So I just went through all code files in the game and changed that around. Shouldn't make a difference, but why call code when it is not required?
Just simplifies things a bit here and there. :shrug
 
OK - in Jack Sparrow -Main Story

Reloaded save & Thomas in Tavern now - Sailed with Thomas to Speightstown, Barbados - Thomas supposed to talk to me on Speightstown Jetty - but not there ( get flashing red Hostile warning).

compile shows:-

Code:
rying to spawn item: pistolpdart with rarity=0.76505 itemProb=0.35
trying to spawn item: potionrum with rarity=0.80664 itemProb=0.14
trying to spawn item: potion1 with rarity=8.4045e-002 itemProb=0.21
OnQuestComplete called for Now_in_Oxbay_from_Cayman_Thomas
Quest name Now_in_Oxbay_from_Cayman_Thomas not found in CommonQuestComplete
OnQuestComplete continues with QuestComplete for: Now_in_Oxbay_from_Cayman_Thomas
SETTING MUSIC: music_bitva
LandInterface DoSetFlags: 0

error log:

Code:
RUNTIME ERROR - file: quests\quests_check.c; line: 427
Invalid function call
RUNTIME ERROR - file: quests\quests_check.c; line: 427
function 'OnQuestComplete' stack error

using latest version of logging as per post 24

:shrug
 

Attachments

  • compile.log
    145.6 KB · Views: 130
  • error.log
    175 bytes · Views: 134
  • system.log
    31.8 KB · Views: 154
Code:
void OnQuestComplete(aref quest)
{
    if(!CheckAttribute(quest,"over") && CheckAttribute(quest,"win_condition"))
    {
        quest.over = "yes";
        // PB: Error checking -->
        ref PChar = GetMainCharacter();
        TraceAndLog("OnQuestComplete called for " + quest.win_condition);

        CommonQuestComplete(quest.win_condition); // KK
        if(!CheckAttribute(PChar, "questnotfound"))
        {
            TraceAndLog("Quest name " + quest.win_condition + " FOUND in CommonQuestComplete");
            return;
        }
        DeleteAttribute(PChar, "questnotfound");

        trace("OnQuestComplete continues with QuestComplete for: " + quest.win_condition); // <-- This line runs fine AND the game still does remember the name of the quest case
        QuestComplete(quest.win_condition); // Here it goes wrong
This continues with:
Code:
void QuestComplete(string sQuestName)
{
    trace("QuestComplete called for " + sQuestName) // <-- This never happens;
Perhaps the game is having trouble "remembering" the storyline folder? That is the only explanation I can think of that would prevent it from opening the storyline-specific quest_reaction.c file.
But it must somehow be reminded basically right after, because things work fine again afterwards. :shock
 
Turns out that quests_reaction.c and both_reaction.c are loaded only once, namely at the beginning of the game.
Assuming that the problem is indeed that the game "forgets", I have made an attempted fix:

The game will now load the applicable file again right before executing ANY quest case.
See here for the applicable test files: http://www.piratesahoy.net/threads/build-14-beta-3-progress.20686/

If this works as intended, this problem will NOT occur again. Here's to hoping.... :unsure
 
I managed to support my theory by breaking the console code on purpose, because that uses very similar coding:
Code:
        case "executeconsole":
        //    if(LoadSegment("console.c"))
        //    {
                ExecuteConsole();
        //        UnloadSegment("console.c");
        //    }
        break;
With those lines commented out, then I run the console, I am doing so without the file being actively loaded. This is what I suspected to happen with those quest cases too.
This indeed results in the exact same type of error message that the quest cases not executing does:
Code:
RUNTIME ERROR - file: seadogs.c; line: 1555
Invalid function call
RUNTIME ERROR - file: seadogs.c; line: 1555
process event stack error
So I now have high hopes that this is indeed the correct way to go about it! :woot
 
I think that we could give it a try. I made this file to load once due to performace issues, but didn't rally realize that this would work incorrectly for a longer periods of time.
 
Interesting find, Pieter! This could potentially be a whole series of random storyline bugs eliminated in one fell swoop. :cheers
 
New version posted to: http://www.piratesahoy.net/threads/build-14-beta-3-progress.20686/
This one first CHECKS if the relevant files are loaded and only reloads it if it isn't. It also generates a log message if this happens.​
So if we get to SEE that log message, but the quest case continues properly, that is final proof that it has been fixed.​
I also reduced the amount of on-screen messages to errors only.​
 
Has anyone been able to confirm yet if this works? Basically this is what SHOULD happen:
1. This error message shows up on the screen:
"ERROR - quests_reaction.c not loaded, loading now!"
2. The quest case does load properly and the story continues like normal
3. There is NO quest-related stack error in error.log

If we have even one single instance of it happening like this, that proves the problem is solved and we can finally lay this to rest.

If you see "ERROR - Unable to load quests_reaction.c!!!" though, that IS bad and I want to know about that straight away!
So keep an eye!!! :checklist
 
In Jack Sparrow - Mings - Brotherhood Main Story

I have just started this story and played this ( from walkthrough )

The Brotherhood - Mings Story

Talk to Mings – QB Update -- go to Mings room up steps by shipyard - and talk to Mings again - tells you to work for Cutler Beckett until he sends you to Tia Dalma in Antigua then bring back whatever you get to Mings in Speightstown. - QB Update
Go back to tavern and talk to Cutler Beckett and accept Escort job. – Let Beckett leave tavern – QB Update


When I accepted Beckett's escort job and he left the tavern - I got the ERROR - quests_reaction.c not loaded, loading now!" message on screen and everything continued OK.

this is the compile for it.


:cheers
 

Attachments

  • compile.log
    13.7 KB · Views: 142
I will test this now. If one of those messages show up I'll let you know. :doff
Brilliant, thanks a lot! :D

In Jack Sparrow - Mings - Brotherhood Main Story
[...]
When I accepted Beckett's escort job and he left the tavern - I got the ERROR - quests_reaction.c not loaded, loading now!" message on screen and everything continued OK.

this is the compile for it.
Really? REALLY??? You know what that means? That means that this horrible, nasty and long-standing bug is now officially DEAD! Dead, I say. DEAD!!! :guns:
 
Code:
OnQuestComplete called for Beckett_run_for_Mings
Quest name Beckett_run_for_Mings not found in CommonQuestComplete
ERROR - quests_reaction.c not loaded, loading now!
OnQuestComplete continues with QuestComplete for: Beckett_run_for_Mings
QuestComplete called for Beckett_run_for_Mings
Quest name Beckett_run_for_Mings FOUND in QuestComplete
Just wanted to say:
things-that-make-you-go-kaboom-20080213013154517.jpg

"It's beautiful!!!!"

Edit: Just had to look at this compile.log excerpt again before going to bed.
This was SUCH a massively annoying problem and I'm exceedingly happy to know it will not bother us again! :dance
 
Back
Top