gothic-1-community-patch icon indicating copy to clipboard operation
gothic-1-community-patch copied to clipboard

Baal Lukor doesn't follow the player

Open AmProsius opened this issue 3 years ago • 4 comments

Describe the bug Baal Lukor doesn't follow the player if he gave him the scroll half before and led him to the alcove.

Expected behavior Baal Lukor now correctly follows the player character, even if the player gave him the scroll before.

Steps to reproduce the issue

  1. Give Baal Lukor one half of the scroll.
  2. Lead him to the alcove.

Additional context Bug provided by Blubbler.

AmProsius avatar Apr 02 '21 20:04 AmProsius

To track down the origin of the problem, the steps to reproduce might have to be extended a bit, e.g. does it matter where to give him the piece of the scroll? What exactly is the "alcove"? ...

szapp avatar May 13 '21 14:05 szapp

From what I had to guess from the scripts, this bug may happen if the player finds the scroll before Baal Lukor proposes to search for it. Is that the issue that is described here? Please confirm this.

If so, it could be solve by adjusting the dialog like the other: https://github.com/AmProsius/gothic-1-community-patch/blob/f386ca443496783307a91437f00772b92802a4dd/scriptbase/_work/Data/Scripts/Content/Story/Missions/DIA_GUR_1211_BaalLukor.d#L223-L232 https://github.com/AmProsius/gothic-1-community-patch/blob/f386ca443496783307a91437f00772b92802a4dd/scriptbase/_work/Data/Scripts/Content/Story/Missions/DIA_GUR_1211_BaalLukor.d#L297-L309

That would mean to replace the function call to Npc_ExchangeRoutine inside the function Info_BaalLukor_FIRSTWAIT_Info and check if the player has the scroll piece OrkParchmentOne already. If so exit the function, if not change the routine as in the original.

szapp avatar May 13 '21 14:05 szapp

Hello 👋 I was just recently looking into the same and I believe there is still a gap in the logic:

    if (!Npc_HasItems (hero, OrkParchmentTwo))
    {
        AI_StopProcessInfos (self);
        Npc_ExchangeRoutine (self, "WaitInSideTunnelTwo");
    };

You can give the pergamen to Baal Lukor before triggering this dialogue, therefore condition checking whether player has it is not enough. I've tried instead this condition, checking values of variable BaalLukor_BringParchment and when testing everything worked fine:

func int Info_BaalLukor_FIRSTWAIT_Condition()
{
    if ((Npc_KnowsInfo(hero,Info_BaalLukor_HELP))
    && (Npc_GetDistToWP(self,"GRYD_040") < 500))
    && (BaalLukor_BringParchment != 1) //first pergamen not found yet
    && (BaalLukor_BringParchment < 3) //both pergamens not found yet
    {
        return 1;
    };

    return 0;
};
func int Info_BaalLukor_SECONDWAIT_Condition()
{
    if ((Npc_KnowsInfo(hero,Info_BaalLukor_HELP))
    && (Npc_GetDistToWP(self,"GRYD_047") < 500))
    && (BaalLukor_BringParchment != 2) //second pergamen not found yet
    && (BaalLukor_BringParchment < 3) //both pergamens not found yet
    {
        return 1;
    };

    return 0;
};

Hope this helps.

Fawkes-dev avatar Apr 29 '22 22:04 Fawkes-dev

Thanks for diving into the issue! I will surely look into your provided fix.

AmProsius avatar Apr 30 '22 12:04 AmProsius