Closed wapcaplet closed 4 years ago
I was able to reproduce this a couple more times in a build from master today (0.D-11818-g2c8919d95b) with these steps:
Once, the faulty item was a pot helmet; another time, a Mossberg 500 Security shotgun.
I have not tried killing friendly NPCs to see if it affects them too, but I might have to take the morale penalty and do it for science.
Attaching save game with a nearby corpse; the Mossberg 500 can't be examined or picked up, and shows up in red text:
Save game: NPCville_CDDA_savegame.zip
Now that I'm sure I can reproduce the issue, I will try cracking this and submit a PR if I can figure out a fix.
I located the code that deals with factions after an NPC's death but it'll take some time for me to grok it:
It looks like this bit is part of the "lone wolf" faction system added / revised back in September 2019:
My guess is the faction was deleted after the NPC's death, but one of the dropped items remained attached to that faction ID somehow.
Cant reproduce, but can reproduce linked issue which is a different circumstance.
Well, either way, the linked PR will fix all future instances of this type of bug, hopefully
Describe the bug
After I killed NPC Omar Bender inside my base in self-defense, he dropped a bunch of items, including a radio and crossbow that emit errors when I try to
e
xamine org
rab them:followed by:
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected all of dead NPC's items to have similar ownership/faction attributes. Or, if there is some reason his radio and crossbow are owned by another faction, at least there should be no errors trying to examine them.
Screenshots
Here are the two problematic items once I moved the corpse and clothing aside. Attempting to move them using advanced inventory manager or hauling simply does nothing (which seems fine, if these items aren't mine), but I only see errors if I try to
e
xamine org
rab them:Versions and configuration