Crime System

Everything about development and the OpenMW source code.
User avatar
Jyby
Posts: 408
Joined: 10 Dec 2013, 04:16

Crime System

Post by Jyby »

I did some testing and found some rather odd issues with the current system.

Features Not-implemented:
1) Indoril armor is not implemented. This should be an easy add, similar to guards perusing the death penalty.

Two ways to implement. We check the players equipped items for the indoril pieces that trigger the attacks or we create a player flag that is set when a player wears a piece of the armor and then removes it. The latter might have to be an array of flags because multiple pieces can set the flag, e.g. what happens if I have two pieces on and remove just one? Another way to do the same thing is by checking if the very last piece is unequipped then remove the flag. In which case the setting of a flag happens with a single bool value.

But, I'd think we should entertain the idea of creating a more customizable crime system from the start. We wouldn't have to implement 100% of the required features for this to work, rather we would just create a bit more of the framing to support this in the future. This will allow us to save time and resources during production on v1 expansions.

Features Implemented but not correctly:
1) If you loot a corpse in front of a guard you will receive a bounty for each item you take. You would expect the crime to only be reported once since the corpse is a container and your looting it in entirety. But this behavior shouldn't be happening in the first place.

Note: I killed an indoril guard with "sethealth 0" and stole his belongings in front of another indoril guard.

2) Another issue that I thought was fixed was the stealing of items. Some items can be taken without penalty in peoples houses. I'll need to investigate this further.

3) Also some NPCs who are hostile in vanilla morrowind will not attack the player on sight.

4) Line of sight or maybe awareness is not working correctly, this can be shown in the excise office during the beginning of the game. The cell where you get your papers completed and the cell where you hand them in are the same. If you commit a crime in the excise office you'll trigger the officer who takes your papers to try to pursue you. Very odd.

Maybe this has something to do with the word of mouth feature. Meaning that if an NPC sees a crime he'll tell those nearby.

Could someone check to see if this behavior works as described in vanilla morrowind.

To summarize, the crime system and the outcomes it produces will need a lot more work and fine tuning. So I think its a good idea to discuss this more with the team and I recommend we explore OpenMW's crime system design.
User avatar
heilkitty
Posts: 158
Joined: 11 Aug 2011, 07:57
Location: Vivec City, MW
Contact:

Re: Crime System

Post by heilkitty »

AFAIK, Indoril armor crime is scripted, not hardcoded. If it ain't working, then, probably, some scripting instructions are not yet implemented or bugged.
User avatar
Jyby
Posts: 408
Joined: 10 Dec 2013, 04:16

Re: Crime System

Post by Jyby »

heilkitty wrote:AFAIK, Indoril armor crime is scripted, not hardcoded. If it ain't working, then, probably, some scripting instructions are not yet implemented or bugged.
That makes a lot of sense. Any idea on how to implement this?
User avatar
heilkitty
Posts: 158
Joined: 11 Aug 2011, 07:57
Location: Vivec City, MW
Contact:

Re: Crime System

Post by heilkitty »

Here's the script attached to Indoril cuirass and helmet:

Code: Select all

begin OrdinatorUniform

;script for ordinator armor so people can react to you wearing it

short OnPCEquip
short OnPC				;this is needed since this script also runs on the armor pieces the NPC wears

if ( OnPCEquip == 1 )
	set WearingOrdinatorUni to 1
	set OnPC to 1
endif

;this one has been equipped by PC ast some point, so check for it being unequipped

if ( OnPC == 1 )

	;oops, now he took it off
	if ( OnPCEquip == 0 )
		set WearingOrdinatorUni  to 0
		set OnPC to 0						;start looking again if he has it on
	endif

endif

end OrdinatorUniform
In the dialog (Greeting 0):

Class: Guard
Faction: Temple
Variable: WearingOrdinatorUni == 1
Result:

Code: Select all

;for ordinators when wearing their armor (helmet or cuirass)
Goodbye
SetFight 100
StartCombat player
So, if it ain't working, some script or dialog features are not implemented.
Last edited by heilkitty on 20 Apr 2014, 17:01, edited 1 time in total.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Crime System

Post by Zini »

I don't see anything that is missing. A good starting point might be to try it out and see if there are any error messages in the console (use the --script-verbose option).
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Crime System

Post by scrawl »

1) Indoril armor is not implemented. This should be an easy add, similar to guards perusing the death penalty.
That is scripted in the guard dialogue. It happens whenever you talk to them. That was working before, so if it doesn't now, then something unrelated to crime has broke.
1) If you loot a corpse in front of a guard you will receive a bounty for each item you take. You would expect the crime to only be reported once since the corpse is a container and your looting it in entirety. But this behavior shouldn't be happening in the first place.
http://bugs.openmw.org/issues/1100

What needs to be done here is discard the owner of all items once someone dies.
4) Line of sight or maybe awareness is not working correctly
Thats because line of sight is afaik taken from foot to foot (Edit: it's from the half extents, actually), so it can be blocked by tables, etc. It should either be a head to head line, or multiple rays in different directions?
2) Another issue that I thought was fixed was the stealing of items. Some items can be taken without penalty in peoples houses.
That is working as intended. Items without owner can be taken. Even for items with an owner, if the witness has an alarm value of 0 they don't report stealing. It's the same in vanilla.
3) Also some NPCs who are hostile in vanilla morrowind will not attack the player on sight.
So is that due to the line of sight bug? You could check with the getDetected console function.
Last edited by scrawl on 20 Apr 2014, 19:45, edited 2 times in total.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Crime System

Post by scrawl »

I just tested it, gave myself an indoril cuirass, equipped it, talked to ordinator, he attacks as expected. Are you seeing something different?
User avatar
Jyby
Posts: 408
Joined: 10 Dec 2013, 04:16

Re: Crime System

Post by Jyby »

So if you are marked all ordinators should pursue you right?

"Once you have been thus marked, every Ordinator you see from then on will try to kill you."
http://www.uesp.net/wiki/Morrowind:Indo ... oril_Armor
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Crime System

Post by scrawl »

In the original game, yes. That is only due to a limitation in how AI settings (and a couple other things, IIRC) work in vanilla. When you change it for one instance of an object, it actually gets changed for all instances instead. I don't think that is actually what the developers intended. There is no way to get off that "ordinator deathlist" once you are on it. It also makes no sense whatsoever that one individual ordinator detecting you, even if he is in an isolated cell and you kill him afterwards, causes all ordinators in the world to attack you on sight from then on.
Bottom line: this is a side-product of a bug. Replicating it makes no real sense because its a severe limitation for mods not to be able to change settings on a single NPC instance.
User avatar
Jyby
Posts: 408
Joined: 10 Dec 2013, 04:16

Re: Crime System

Post by Jyby »

I'm not sure what you mean by this being a bug.

It is meant as a feature, so can you explain the bug some more.

If you wear the armor and encounter an ordinator, he will try to kill you. If you take the armor off and encounter the same ordinator should he still try to kill you? Will other try to oil you since you've been marked.

This is a situation where it would be nice to have some extendibility to the crime system.

How should we approach this?

EDIT: It makes since, if you talk to an ordinator wearing the armor he will "remember you" and then tell his buddies. This is no different to being attacked on sight if your crimes are absurd.

I don't like the idea of "fixing this" as I don't think it is a bug. I also don't want players freely strolling around with the best armor in the game.
Post Reply