Skip to content
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

Npc runtime corner cases #656

Open
3 tasks
Try opened this issue Jul 24, 2024 · 1 comment
Open
3 tasks

Npc runtime corner cases #656

Try opened this issue Jul 24, 2024 · 1 comment

Comments

@Try
Copy link
Owner

Try commented Jul 24, 2024

As touched breathy in #653

  • Some npc's can auto-equip items, some cannot. At this point we separating those cases by isMonster check.
    Testing in vanilla:
  • auto-equip works for skeletons (skeleton is monster)
  • changing C_Npc::guild, has no effect, what means our approach is fundamentally incorrect.
    • testing Nikolas (hunter near Khorinis) - guild has no effect, auto equip works
    • testing Skeleton - replacing guild to human-guiless has no effect
  • maybe effect is related to the "true guild" - need to test it
  • Dragon corpses are awkward
  • vanilla seem to never remove dragon body, as it might break game progressing
  • but dragons inserted by Marvin, are removed automatically!
  • doesn't "feel" correct to test guild explicitly, as modders are free to reassign them
  • Inventory access is unclear
  • Humans can have inventory-menu and animals - can't
    • but Skeletons and Goblins also cannot
    • Orc/Draconian can use inventory

Here current assumption, that true-guild must be in !isMonster() range to enable inventory.

@thokkat
Copy link
Contributor

thokkat commented Jul 25, 2024

maybe it's related to npc having some builtin bones, such as ZS_SWORD/ZS_RIGHTHAND ?

Seems like the right idea. Npc_HasEquippedMeleeWeapon returns always true but weapon is only visible if ZS_SWORD is present like for skeletons or zombies. But the latter can't draw that weapon because animation is missing.

Goblin lacks ZS_SWORD like other monsters. In script Npc_SetToFightMode is used to fake 1h mode. Damage is purely determined by strength. Skeletons even have their strength reduced by weapon damage to behave the same.

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

No branches or pull requests

2 participants