NPC "Nyras" flees if the Player Character is too strong.
Hello, everyone and Happy New Year!
I would like to report the following bug:
Describe the bug: This issue can be encountered in the Swamp Camp if the user starts the "Focus for the Gurus" quest. NPC "Nyras" is supposed to protect and fight for the Focus Stone, however, if the Player Character is too strong, he will flee.
Expected behavior: NPC "Nyras" stands and fights regardless of user stats.
Steps to reproduce the issue:
- Initiate and progress through the "Focus for the Gurus" quest.
- Travel to the WP_CIRCLE_01 waypoint.
- Talk with NPC "Nyras" and select the "I'm searching for the focus." dialogue option.
- Listen to Nyras's speech and threats.
- Notice how he flees from the Player Character.
Additional context This behavior is probably triggered due to the fact that the user's stats or level are too high. In my case, Level 20, Strength 100, sword training, etc. Chasing him can be a bit frustrating if you are not quick enough to actually hit him before he runs away. Story wise, he is corrupted or manipulated by the Sleeper, therefore, he needs to attack the player.
Attaching some screenshots for more clear information.
-
Location at WP_CIRCLE_01.
-
Initiate conversation with Nyras.
-
NPC "Nyras" flees from the Player Character.
-
My current Skills and Stats.
Thank You and Best Regards! Quintus24
Thanks for submitting the issue. After validating it, we will see how and if we can change the fleeing behavior.
The relevant code might be this one (there are other portions where fleeing is triggered, I haven't checked all of them): https://github.com/AmProsius/gothic-1-community-patch/blob/2892a60a3edf33340d7907fe7b3c137d079e8474/scriptbase/_work/Data/Scripts/Content/AI/ZS_Human/ZS_AssessEnemy.d#L70-L79
If this one is the cause, we'll have to either bend the if-clause (that will only work if that part of the function remains unaltered by any mod), or intercept/replace the call to AI_StartState.
Alternatively, we could modify the function C_AmIWeaker, to add an exception for Nyras:
https://github.com/AmProsius/gothic-1-community-patch/blob/2892a60a3edf33340d7907fe7b3c137d079e8474/scriptbase/_work/Data/Scripts/Content/AI/AI_Intern/C_Functions.d#L32-L52
changed to
//////////////////////////////////////////////////////////////////////////
// C_AmIWeaker
// ===========
// Überfrüft, ob der NSC 'slf' schwächer als der NSC 'oth' ist. Diese
// Funktion ist genau das gegenteil von C_AmIStronger().
//////////////////////////////////////////////////////////////////////////
func int C_AmIWeaker (var C_Npc slf, var C_Npc oth)
{
if (Hlp_GetInstanceId(slf) == NOV_1303_Nyras)
&& (Npc_IsPlayer(oth)) {
/* Additionally check if the current quest is running or similar */
return FALSE;
};
PrintDebugNpc (PD_ZS_DETAIL, "C_AmIWeaker" );
if ((2*slf.level) <= oth.level)
{
PrintDebugNpc (PD_ZS_DETAIL, "...yes" );
return TRUE;
}
else
{
PrintDebugNpc (PD_ZS_DETAIL, "...no" );
return FALSE;
};
};
The second proposal is much easier to implement, but will be less reliable - in case a mod no longer consults/contains that function but sets the fleeing state differently.