Jump to content

increasing the crime bounty for a specific crime


Recommended Posts

hey everyone.

i've put down a weapon display that i filled with a bunch of items for my quest. i put a master lock on it, so it would be very hard to access it.

i have also created 2 guards with packages that will patrol around the weapon display 24/7 to make sure nobody tries to pick the lock. the guards are set at very aggressive and very hard.

the goal is that, you would either have to have high sneak or use invis potions/ability to be able to reach the display case and then try to open it, but if you're caught, the guards will try to arrest you/attack you.

 

problem is, the bounty for picking the lock is so low that, you can easily persuade the guard to look the other way.

so is there a way to increase the bounty of this specific crime (attempting to pick the lock), to 2000, so that the guards would try to arrest you regardless, if they see you picking it ?

 

any help would be appreciated. thank you

Link to comment
Share on other sites

1 hour ago, xkkmEl said:

If you know what crime faction it should count towards, you can detect when the case is opened and then use "Faction.getCrimeGold" and "Faction.setCrimeGold" to add any amount you like.

thanks for helping out here as well xkkmEl. you're the man.

 

it belongs to the winterhold crime faction. i can change the entire faction's crime gold, but i don't know how to do it for a specific instance of a crime, not the crime in general.

 

1 hour ago, xkkmEl said:

you can detect when the case is opened

how ?

Link to comment
Share on other sites

Faction Property CrimeFactionWinterhold  Auto  

Event OnActivate(ObjectReference akActionRef)
    
    CrimeFactionWinterhold.SetCrimeGold(500)
    
EndEvent

is this script correct ? i attached it to the display case itself inside the render window, so only this instance of the item causes this crime bounty.

 

will this only effect this specific lock pick crime or will this change the bounty for all lockpicking crimes in winterhold ?

Link to comment
Share on other sites

xkkmEl is correct. I'd recommend something like this. May need to be tweaked because I'm not sure how fast crime gold is updated.

no skse version

Faction Property CrimeFactionWinterhold  Auto  

Event OnActivate(ObjectReference akActionRef)
    if akActionRef == Game.GetPlayer()
        if IsLocked()
            int crimeGold = CrimeFactionWinterhold.GetCrimeGold()
            Utility.Wait(2) ;wait for lock picking menu to close 
            int newCrimeGold = CrimeFactionWinterhold.GetCrimeGold()
            int diff = newCrimeGold - crimeGold
            if diff > 0 ;player was likely caught 
                CrimeFactionWinterhold.SetCrimeGold(newCrimeGold + 100) ;add 100 to crime gold
            Endif
        Endif
    Endif
EndEvent

skse version
 

Faction Property CrimeFactionWinterhold  Auto  
int crimeGold

Event OnActivate(ObjectReference akActionRef)
    if akActionRef == Game.GetPlayer()
        if UI.IsMenuOpen("Lockpicking Menu")
            crimeGold = CrimeFactionWinterhold.GetCrimeGold()
            RegisterForMenu("Lockpicking Menu")
        
        Endif
    Endif
EndEvent 

Event OnMenuClose(string menuName)
    if menuName == "Lockpicking Menu"
        UnRegisterForMenu("Lockpicking Menu")
        Utility.Wait(2)
        int newCrimeGold = CrimeFactionWinterhold.GetCrimeGold()
        int diff = newCrimeGold - crimeGold
        if diff > 0 ;player was likely caught 
            CrimeFactionWinterhold.SetCrimeGold(newCrimeGold + 100) ;add 100 to crime gold
        Endif
    Endif
EndEvent

 

Link to comment
Share on other sites

12 minutes ago, dylbill said:

skse version

is there anybody who doesn't use skse ?!

thanks for the script, the OnMenuClose is a script i didn't think i needed to use in this case, since the crime was already being applied after exiting the lockpicking menu.

i'll try this out today and report back the results.

 

thank you both for your help.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...