-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Friendly NPC won't wield another weapon after the current one was "traded" away from it #32613
Comments
I recently had similar stuff - npc had compound bow, traded away, tried to make him use a spear - said it sucked in comparison to mega points from the bow. Cured by reentering the game. But in regard to your referenced unarmed - good point to mention yet again, should npc master unarmed it becomes extremely hard to convince him to train any other sort of weapon, like a proper pike for proper formation reach attacks. |
This looks like a caching error from my npc perf work.
…On Thu, Jul 25, 2019, 2:43 PM TychaiosIlithios ***@***.***> wrote:
I recently had similar stuff - npc had compound bow, traded away, tried to
make him use a spear - said it sucked in comparison to mega points from the
bow. Cured by reentering the game.
But in regard to your referenced unarmed - good point to mention yet
again, should npc master unarmed it becomes extremely hard to convince him
to train any other sort of weapon, like a proper pike for proper formation
reach attacks.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#32613?email_source=notifications&email_token=AAGSA5A2FOMLDPHOTY3XHFLQBIM7RA5CNFSM4IG4IJMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD223SZA#issuecomment-515225956>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGSA5GEKTNOYB46VFJ4HCTQBIM7RANCNFSM4IG4IJMA>
.
|
Tested in 0.D-6301-g3597e0f.
Give hatchet using
It really depends on the distance from NPC to a zombie. Another test:
Works fine if you try to give a shotgun to an NPC at this step: changes makeshift crowbar to shotgun. So the issue here seems to be avoiding of using |
No, i meant trading makeshift crowbar for hatchet. |
NPCs only periodically re-evaluate what weapon they are wielding, the
process if them obtaining or losing items should probably either force a
new evaluation or at least reset the cache that they're using.
|
Before you spawn the zombie far from the NPC, it is very possible that you have reentered the game, so the NPC re-evaluate what it is wielding and choose the hatchet. So, it has nothing to do with the distance I guess. It is certainly fine if you try to give the NPC a shotgun to replace the makeshift crowbar, because the shotgun is evaluated as a better weapon. But what if you try to replace the shotgun with a makeshift crowbar? The NPC will refuse to wield it. And it will refuse to do so even after the shotgun is traded away unless you reenter the game. |
Fixes CleverRaven#32613 The trade interface allowed you to remove an NPC's weapon without removing the cached value of the weapon. Invalided the weapon value cache entry when a weapon is removed.
Steps To Reproduce
Steps to reproduce the behavior:
g: I want you to use this item.
.Expected behavior
NPC picking the best weapon from his inventory if he holds nothing and sucks at unarmed fighting.
2019.07.22-buggy.zip
0.D-5829-g4a400484d3-dirty
The text was updated successfully, but these errors were encountered: