New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPCs don't collect weapons after fight #3
Comments
gothic-1-community-patch/scriptbase/_work/Data/Scripts/Content/AI/AI_Intern/B_Functions.d Lines 297 to 312 in 746a440
changed to func void B_RegainDroppedWeapon(var C_NPC slf)
{
//-------- fallgelassene Waffe aufheben... --------
Npc_PerceiveAll (slf);
if ( Wld_DetectItem (slf, ITEM_KAT_NF) )
{
if !Npc_IsPlayer(slf)
&& Npc_CanSeeItem(slf,item)
&& !Npc_HasEquippedMeleeWeapon(slf)
{
PrintDebugNpc(PD_ZS_CHECK, "...NSC hebt seine Nahkampf-Waffe wieder auf!" );
AI_TakeItem (slf, item);
AI_EquipBestMeleeWeapon(slf);
};
};
Npc_PerceiveAll (slf);
if ( Wld_DetectItem (slf, ITEM_KAT_FF) )
{
if !Npc_IsPlayer(slf)
&& Npc_CanSeeItem(slf,item)
&& !Npc_HasEquippedRangedWeapon(slf)
{
PrintDebugNpc(PD_ZS_CHECK, "...NSC hebt seine Fernkampf-Waffe wieder auf!" );
AI_TakeItem (slf, item);
AI_EquipBestRangedWeapon(slf);
};
};
Npc_PerceiveAll (slf);
if ( Wld_DetectItem (slf, ITEM_KAT_MUN) )
{
if !Npc_IsPlayer(slf)
&& Npc_CanSeeItem(slf,item)
{
PrintDebugNpc(PD_ZS_CHECK, "...NSC hebt seine Munition wieder auf!" );
AI_TakeItem (slf, item);
};
};
}; |
#3 correctly pick up weapons after fight
gothic-1-community-patch/src/Ninja/G1CP/Content/Fixes/Session/fix003_RegainDroppedWeapon.d Lines 32 to 70 in 04830dc
It seems like a made a mistake with the distances here. 5000 corresponds to 50 meters, which is way too far. Something like 300 as found in the function below seems more reasonable. gothic-1-community-patch/scriptbase/_work/Data/Scripts/Content/AI/B_Human/B_AssessBody.d Lines 110 to 130 in 04830dc
|
Describe the bug
NPCs don't always collect their weapons and loast ammunition when they regain consciousness after a lost fight.
Expected behavior
NPCs now always pick up their weapons and lost ammunition after a lost fight.
The text was updated successfully, but these errors were encountered: