Create witnesses to crimes who can be killed to remove bount

Post » Sun Dec 04, 2011 4:05 pm

I know some mods out there do something like this, but they all also add tons of stuff I don't like.

What I want to do:

If an NPC (civillian or guard) sees the player commit a crime, they become a witness to that crime. If the player kills that witness the bounty is removed.

So, if I hit a guard in the wilderness but kill him, the bounty for hitting him is removed. Unless of course another NPC witnesses me doing it.

Anyone got any ideas how I could go about this with a script?
User avatar
sunny lovett
 
Posts: 3388
Joined: Thu Dec 07, 2006 4:59 am

Post » Sun Dec 04, 2011 5:33 pm

You can use GetCrime and GetCrimeKnown to determine whether or not specific actors know about a crime committed by the player. That only tells you if they know about any crime the player may have committed that falls under one of the crime types, and only in relation to a specific actor, it doesn't give you a specific crime.

You would have to ref walk cells for actors that detect the player, check to see if any of the player's misc stats have increased (GetPCMiscStat on assaults, murders, etc.), and check to see if they now know about specific crimes that they didn't know about a minute ago and if it was the player that committed them. That's at least part of what you'd need to determine whether or not the actor was a witness.

You'd also have to compare the player's previous bounty to their new bounty after a crime has been committed and deduct it if the witness is killed.

I'm sure it's a lot more complicated than this, but that's all I could come up with off the top of my head. This is actually a feature I've been planning for Balzu but haven't gotten around to implementing yet. I think Kuertee or Reneer has implemented something like this already, so I would check out their mods and see how they did it.

hth
User avatar
sw1ss
 
Posts: 3461
Joined: Wed Nov 28, 2007 8:02 pm


Return to IV - Oblivion