gothic-1-community-patch
gothic-1-community-patch copied to clipboard
Player character gets Experience when being defeated by a follower
Describe the bug The player character gets Experience when a follower defeats or kills him.
Expected behavior The player character no longer gets Experience when a follower defeats or kills him.
Additional context Bug provided by Blubbler.
https://github.com/AmProsius/gothic-1-community-patch/blob/f386ca443496783307a91437f00772b92802a4dd/scriptbase/_work/Data/Scripts/Content/Story/B/B_GiveXP.d#L36-L52
changed to
func void B_DeathXP()
{
if (Npc_IsPlayer(self)) {
return;
};
PrintDebugNpc (PD_ZS_FRAME, "B_DeathXP");
PrintGlobals (PD_ZS_CHECK);
if C_NpcIsHuman(self)
&& Npc_WasInState(self, ZS_Unconscious)
{
PrintDebugNpc (PD_ZS_CHECK, "...Opfer ist bewußtloser Mensch!");
// SN: keine XP für Finishing-Move!!!
}
else
{
PrintDebugNpc (PD_ZS_CHECK, "...Opfer ist entweder nicht bewußtlos oder kein Mensch!");
B_GiveXP (self.level * XP_PER_LEVEL_DEAD);
};
};
and
https://github.com/AmProsius/gothic-1-community-patch/blob/f386ca443496783307a91437f00772b92802a4dd/scriptbase/_work/Data/Scripts/Content/Story/B/B_GiveXP.d#L54-L66
changed to
func void B_UnconciousXP()
{
if (Npc_IsPlayer(self)) {
return;
};
PrintDebugNpc (PD_ZS_FRAME, "B_UnconciousXP");
PrintGlobals (PD_ZS_CHECK);
//-------- Erfahrung nur beim ersten Sieg über Menschen --------
if !C_NpcIsHuman(self)
|| !self.aivar[AIV_WASDEFEATEDBYSC]
{
PrintDebugNpc (PD_ZS_CHECK, "...erster Sieg!");
B_GiveXP (self.level * XP_PER_LEVEL_DEAD); // die vollen XP beim Sieg vergeben, da finishing-Move keine XPs mehr ergibt!
};
};