Project

General

Profile

Bug #4328

Ownership by dead actors is not cleared from picked items

Added by rot tor 3 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
Game Mechanics
Target version:
Start date:
02/25/2018
% Done:

100%

Reproducibility:
Always
Operating system:
Other
Severity:
Normal

Description

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

Associated revisions

Revision 929fc681 (diff)
Added by Alexei Dobrohotov 3 months ago

Consider items with dead owner not stolen (fixes bug #4328)

Revision cc0c6dda (diff)
Added by Alexei Dobrohotov 3 months ago

Account for empty victimRef (Bug #4328)

Revision d371bebb (diff)
Added by Alexei Dobrohotov 3 months ago

Prevent items in a container owned by a dead actor from being counted as stolen (Bug #4328)

History

#1 Updated by Alexei Dobrohotov 3 months ago

  • Status changed from New to Confirmed
  • Operating system changed from Windows to Other

#2 Updated by Alexei Dobrohotov 3 months ago

  • Status changed from Confirmed to In Progress
  • Assignee set to Alexei Dobrohotov

#3 Updated by Alexei Dobrohotov 3 months ago

  • Status changed from In Progress to Resolved
  • Target version set to openmw-0.44
  • % Done changed from 0 to 100

#4 Updated by rot tor 3 months ago

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).

#5 Updated by Alexei Dobrohotov 3 months ago

  • Status changed from Resolved to In Progress

#6 Updated by rot tor 3 months ago

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.

#7 Updated by Alexei Dobrohotov 3 months ago

This is getting more and more complicated. I wish MCP was open-source.

#8 Updated by Alexei Dobrohotov 3 months ago

Though that's physically impossible for a collection of bindiffs. So far my fix should replicate MCP behavior.

#9 Updated by Alexei Dobrohotov 3 months ago

although it's still a crime if observed

Wait wha-

This changes everything, I need to fix this a completely different way.

#10 Updated by Alexei Dobrohotov 3 months ago

  • Status changed from In Progress to Resolved

#11 Updated by rot tor 3 months ago

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
2. Object is picked up for the first time before its owner's death, then the owner dies
  • 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 following

1. 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
2. Object is picked up for the first time (owner is alive)
  • Is obviously a crime if seen
  • Never gets its "stolen" tag cleared afterwards
3. Object is picked up for the second time (after being dropped somewhere by the player or moved by a script)
  • 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.

#13 Updated by rot tor 3 months ago

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.

#15 Updated by Alexei Dobrohotov 3 months ago

Coming to think of it, this includes actors which were cleared during corpse clearing.

That's not the case, thankfully.

#16 Updated by Alexei Dobrohotov 3 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF