Skip to content

feat: ZS_Dead equivalent — death XP and loot init on NPC kill#375

Open
BoroBongo wants to merge 7 commits into
mainfrom
feat/zs-dead
Open

feat: ZS_Dead equivalent — death XP and loot init on NPC kill#375
BoroBongo wants to merge 7 commits into
mainfrom
feat/zs-dead

Conversation

@BoroBongo

Copy link
Copy Markdown
Contributor

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

Enable DeathXP 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.

BoroBongo and others added 3 commits June 15, 2026 21:46
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.
@BoroBongo BoroBongo marked this pull request as ready for review June 15, 2026 22:30
@BoroBongo BoroBongo requested a review from JaXt0r June 17, 2026 11:50
@BoroBongo

Copy link
Copy Markdown
Contributor Author

Tested and now after killing NPC you'll see a change in the status menu. Killed diego and got a lot of levels 🗡️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant