From 77f6808c459701460c2f92d0e97cc754f84bb38a Mon Sep 17 00:00:00 2001 From: BoroBongo Date: Mon, 15 Jun 2026 02:46:50 +0100 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20ZS=5FDead=20equivalent=20=E2=80=94?= =?UTF-8?q?=20death=20XP=20and=20loot=20init=20on=20NPC=20kill?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FightService.OnNpcDied() now replicates Gothic's ZS_Dead AI state logic: 1. Resets AIV_PLUNDERED to 0 (FALSE) on the dead NPC's instance 2. If EnableDeathXP and the killer is the hero: calls B_DeathXP via the Daedalus VM (sets XP, level, LP), then syncs results to hero.Vob via NpcService.SyncHeroInstanceToVob() 3. Always calls B_GiveDeathInv so the loot panel has items to show 4. Restores GlobalSelf / GlobalOther after both VM calls EnableDeathXP is gated behind EnableCombatSystem in DeveloperConfig and marked WIP (damage values are still debug stubs). Also adds EnableLevel5Cheat and EnableGuildCheat flags in DeveloperConfig (Misc / WIP section) used by StatusMenu cheat triggers. --- .../Scripts/Models/Config/DeveloperConfig.cs | 10 ++++++ .../Scripts/Services/Npc/FightService.cs | 34 +++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/Assets/Gothic-Core/Scripts/Models/Config/DeveloperConfig.cs b/Assets/Gothic-Core/Scripts/Models/Config/DeveloperConfig.cs index 97a281486..9fa876881 100644 --- a/Assets/Gothic-Core/Scripts/Models/Config/DeveloperConfig.cs +++ b/Assets/Gothic-Core/Scripts/Models/Config/DeveloperConfig.cs @@ -177,6 +177,10 @@ public class DebugChannelTypesCollection : CollectionWrapper Date: Mon, 15 Jun 2026 22:30:57 +0100 Subject: [PATCH 2/3] fix: remove cheat config fields that don't belong in zs-dead --- Assets/Gothic-Core/Scripts/Models/Config/DeveloperConfig.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Assets/Gothic-Core/Scripts/Models/Config/DeveloperConfig.cs b/Assets/Gothic-Core/Scripts/Models/Config/DeveloperConfig.cs index 9fa876881..66c348579 100644 --- a/Assets/Gothic-Core/Scripts/Models/Config/DeveloperConfig.cs +++ b/Assets/Gothic-Core/Scripts/Models/Config/DeveloperConfig.cs @@ -295,11 +295,6 @@ public class DebugChannelTypesCollection : CollectionWrapper Date: Wed, 17 Jun 2026 12:49:53 +0100 Subject: [PATCH 3/3] feat: add SyncHeroInstanceToVob to sync hero XP and level to Vob after B_DeathXP --- Assets/Gothic-Core/Scripts/Services/Npc/NpcService.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Assets/Gothic-Core/Scripts/Services/Npc/NpcService.cs b/Assets/Gothic-Core/Scripts/Services/Npc/NpcService.cs index d52ec2b88..e486b8407 100644 --- a/Assets/Gothic-Core/Scripts/Services/Npc/NpcService.cs +++ b/Assets/Gothic-Core/Scripts/Services/Npc/NpcService.cs @@ -247,6 +247,15 @@ public void ExtNpcChangeAttribute(NpcInstance npc, int attributeId, int value) vob.Attributes[attributeId] = value; } + public void SyncHeroInstanceToVob() + { + var hero = GetHeroContainer(); + hero.Vob.Level = hero.Instance.Level; + hero.Vob.Xp = hero.Instance.Exp; + hero.Vob.XpNextLevel = hero.Instance.ExpNext; + hero.Vob.Lp = hero.Instance.Lp; + } + public NpcContainer GetHeroContainer() { return ((NpcInstance)_gameStateService.GothicVm.GlobalHero).GetUserData();