Ownership by dead actors is not cleared from picked items
When picking up an item, there should be no stolen tag if the owner is dead. Some dungeon loot is owned and will otherwise be confiscated by guards when it shouldn't.
If the item was picked up before the owner was dead, vanilla behaviour clears the ownership in either of these cases:
- when the item is dropped and picked up again
- when the game is reloaded
To reproduce with this example #3728
coc "Galom Daeus, Entry"
skirt on the right, find daedric boots on lower shelves
kill its owner "arenara"
placeatme "hlaalu guard" 1 1 1
punch guard: item should not be confiscated if the owner was killed before picking it up, or if it was picked up again, or if the game is reloaded
I just double-checked and could not reproduce "when the item is dropped and picked up again", which was probably due to, of course, reloading with the item on the ground. It seems reloading is the only thing that clears the stolen tag if you didn't kill the owner before picking up the item (tested cell load and 72 hours flush earlier).
Also just double-checked the initial cas (picking up after the owner is dead) to make sure that wasn't also reloading at work - and it wasn't, not exactly, but to clarify:
In vanilla without MCP, the stolen tag is only bypassed if you pick the item from inside a container,
With the MCP fix, the stolen tag is also bypassed for items that aren't inside a container. This is what MCP says about it:
Normally, the property of deceased people is takeable without being marked stolen, although it's still a crime if observed. In vanilla, owned property in containers was takeable without being flagged, but owned items placed in the world would always be marked as stolen, due to a bug checking if the player was dead, instead of the owner. Further, it would incorrectly assign the item as stolen if the corpse had expired after the usual 72 hours.
Apologies for all the inaccuracy. Should've also specified "picked the first time" to avoid confusion. Summary of vanilla behaviour as I tested it:1. Object is picked up for the first time after its owner's death
is still a crime if witnessed, but
- (vanilla bug) has no stolen tag only if it was in a container or after reloading and the corpse isn't flushed
- (MCP fix) has no stolen tag whether it was in a container or in the world, no time limit
- object always has a stolen tag until the game is reloaded, has no stolen tag after reload
- if the object is dropped and picked up before reload, it doesn't affect its stolen tag and the fact that the owner is dead changes nothing for crime behaviour (isn't a crime if dropped and picked up on the ground, is a crime if put inside another owned container and retrieved).
#12 Updated by Alexei Dobrohotov 3 months ago
So the behavior if my pull request gets merged is the following1. Object is picked up for the first time (owner is dead)
- Is a crime if seen
- Never has "stolen" tag so it's never confiscated by guards
- Is obviously a crime if seen
- Never gets its "stolen" tag cleared afterwards
- Is not a crime when seen
- "Stolen" tag isn't cleared if the object was stolen
Clearing the tag during saved game loading is not a good idea because the behavior of things shouldn't suddenly change from session to session, and it also makes debugging more difficult if the behavior the player has seen does not correspond to the state of the saved game. Something more practical could probably be done after the crime mechanics part of post-1.0 Great De-hardcoding.
That seems fine in most cases, since players in dungeons will normally encounter the owners and kill them before looting things.
For the future maybe the easiest would be to clear stolen tags associated with a NPC upon that NPC's death (assuming that's what's intended)
#14 Updated by Alexei Dobrohotov 3 months ago
That'd be difficult to implement, as there is no stolen "tag" per se. OpenMW tracks the count of stolen items of a certain ID, but it doesn't track specific references (cause of #3373).
A nuance I didn't mention: for performance reasons, OpenMW will always consider owners that don't have a dead reference in the cells that were loaded at the time you were taking an item alive for the purpose of increasing the stolen item counter - this includes NPCs like "a shady smuggler" which don't have a reference in the world at all, and regular NPCs that happened not to be loaded while you were taking the item.
Coming to think of it, this includes actors which were cleared during corpse clearing.