Jump to content

Recommended Posts

Hello there, I'm back here asking for some insight on the behavior that Prison Jailors have in the game. As some may be aware, the jailors will attack you on sight if you ever dare touch the cell gate in prison, even if you open and close it back pretending nothing happened and I would like this to be tweaked.

 

However, I have looked for a few hours now for some AI package, global script or setting but I have not found anything that triggers upon opening the cell gate, there's not even a script on the cell door itself. There is one scripted door but it's actually the locked door jailors open when you want to visit prisoners which only adds more bounty when escaping and doesn't seem related to the cell gate gate interaction. I really would like to know if anyone has found some more information on this or if perhaps I'm just facing a stone wall here. Thanks in advance.

Link to comment
5 hours ago, LostData751 said:

Hello there, I'm back here asking for some insight on the behavior that Prison Jailors have in the game. As some may be aware, the jailors will attack you on sight if you ever dare touch the cell gate in prison, even if you open and close it back pretending nothing happened and I would like this to be tweaked.

 

However, I have looked for a few hours now for some AI package, global script or setting but I have not found anything that triggers upon opening the cell gate, there's not even a script on the cell door itself. There is one scripted door but it's actually the locked door jailors open when you want to visit prisoners which only adds more bounty when escaping and doesn't seem related to the cell gate gate interaction. I really would like to know if anyone has found some more information on this or if perhaps I'm just facing a stone wall here. Thanks in advance.

 

what is your end goal? ?

Because the behavior of the guard is probably related to the software algorithm of his package, it cannot be changed. But you can stop it through the control script.

 

 

Edited by tda4
Link to comment

Well, my initial goal is to have the guard at the jail not immediately attack you and psychically know if you touched the cell gate, as if they would only realize you are trying to escape if the gate is not closed.

 

About the AI package, I have not found anything related to the change in their behavior, but I'm not too sure if this is something deep into the game's code that is out of reach, either in the package itself or somewhere else. I did find out that when the jailor starts attacking you they get a temporary package with an id that starts with "ff", not sure if that means it gets a temporary package from somewhere. You mentioned a way to stop it through the control script, how do I do that?

Edited by LostData751
Link to comment

You can touch the locked cell door, nothing happens.

But if you unlock it, or open the unlocked door the guards will attack you. ( if you unlock with console  and then the player opens the unlocked door the guard will attack )

 

I have not found a script, maybe it is the ownership of the cell door. Activating or unlocking the door is a crime ( 50 gold )

 

How you get out the door without unlock or open it:  From https://en.uesp.net/wiki/Oblivion:Crime

Opening the door to your cell will allow you to attempt an escape. Once the door is unlocked, all Jailors and guards within the jail will attack you on sight, and not accept yields. You will have a single lockpick in your inventory to pick the cell lock with, or you can cast a custom "Open Very Hard Lock" spell on the cell door. Alternatively, you can pickpocket the Jailor for the cell key, which will also open the Evidence Chest. If you are caught pickpocketing, the guard will open the cell door. Another method to escape is to Summon a creature within your cell and provoke it, which will cause the guard to open the cell door and defend you.

 

So let the guard open the door for you.

But the next problem is the prison door with script that triggers the  "Set EscapeFlag to 1" and  JailBreakFine

You don't even have to touch the door, the script will react if you get too close to the door.

Link to comment

Well, I am aware of the way to provoke creatures inside and have guards come in and open the door themselves as if nothing happened. Despite that, I would like to find the source of the behavior the actually be able to unlock gates oneself without jailors figuring out magically whether you tampered with them or not.

 

I have looked, tested some more and it seems that neither door nor cell ownership has any relation to the guard's aggressiveness. As I did mention, they seem to have some form of Script package that is added on them that causes them to simply attack on sight with no way for yields, also when looking at the package's id it seems to be temporary since stopping the combat will have it generate a new id again. I will be sure to look further on this.

 

Gladly, the second door is a non-issue, this EscapeFlag is not related at all to the Crime or has any effect to the Crime.PCEscaped variable, the flag is only for the door script itself to avoid applying the jailbreak fine multiple times.

Link to comment

Yes the AI pack of the guard is a temporary pack (starts with ff, so not in the  Oblivion.esm AI Packages)  I checked it with RefScope.

 

Even killing the aggressive guard with the console and then resurrect him (or disable, resurrect, enable)  does not stop the aggression.

 

The guard script only lock and open doors, for his patrol AIPack or Player visits a prisoner. ( not the prison cell door, only the exit door )

 

In crime quest scripts are only shorts and Refs, not even a "Begin at game mode"

 

When I delete the door in CS the only warning I get is the the door Ref is used in two dialogs. When the player is arrested the cell door will be locked. So there is no Script that use the door.

 

The same in prisions in other Mods ( e.g. DibellasWatch. own world and prisions ).

I removed the faction, the key,  replaced the prision door nif with another door. When I unlock the door with console nothing happens, but when the player open the door the guard goes crazy.

The same test with removed lock. When I open the unlocked door the guard attack.

 

When I open the door with console ( setopenstate 1 ) the guard stays friendly.

There aere 3 prison cells , 3 doors in the Prison ( plus the exit door) . If the player open or close any of the doors the guard attacks.  I opened all 3 doors with console and then the player closed one door ( not the one of my prison cell. And the other doors are not  Persistent ). 

I put a new door in the prison (in the middle of the room) and when I open it the guard attack.

I used the console command TCL to get behind the exit door without trigger the door script and then I closed a door of the guard bedroom... and the guard attacks.

So activating any door in the prison set the guard aggressive . Click a locked door and doesn't unlock it does not set the guard aggressive.

The guard hates it when a door moves.  :classic_wink:  So no script, nothing you could change.

 

(and in the mod the guard attacks the other prisoners too. I moved a door and the shit guard kills two other NPCs.  An advantage, he attacks these NPCs first and I have time to flee )

 

Link to comment

I figured something out and created a script. I found out that when you unlock a door, the unlock animation needs to fully play to have the game cause you to open the door. So... the solution is to cut the lockpick menu animation with CloseAllMenus and you're now able to remove a lock without the risk to open a door.

 

Also made a script to disable the "Activate" control but still have the doors open when pressing the control. Here is the esp and below the script I made, the jailor will now ignore you fully when using this.

 

Spoiler

scn zPrisonBreakQuestScript

float fQuestDelayTime
short plescp
short plincell
short pldopen
short dopen
float brtimer

ref tgdoor
ref tgmdoor

Begin Gamemode

    set fQuestDelayTime to 0.1

    set tgdoor to GetCrosshairRef

    if tgdoor.IsDoor && tgdoor.GetLocked == 0
        DisableControl 5
        if OnControlDown 5 == 1 && IsControlDisabled 5 == 1
            if tgdoor.GetOpenState == 3
                tgdoor.SetOpenState 1
            elseif tgdoor.GetOpenState == 1
                tgdoor.SetOpenState 0
            endif
        endif
    else
        EnableControl 5
    endif
    
End

Begin Menumode 1014
    if tgdoor.IsDoor && tgdoor.GetLocked == 0
        set brtimer to brtimer + GetSecondsPassed        
        if brtimer >= 0.8
            CloseAllMenus
            set brtimer to 0
        endif
    else
        return
    endif

End

 

Thanks a lot for the help, fejeena! Now I will be working with this to make prison slightly more interesting.

PrisonBreak_v0.1.esp

Edited by LostData751
Link to comment

That looks interesting, will try it.

 

A idea: if the jailor is in the room (patrolling) , it would be weird if he didn't notice when the player fiddling with the lock  or opens the door. So maybe a "isSneaking" check for the player when unlock and when open the door.   It should symbolize that the player quietly opens the lock and quietly opens the door. If he doesn't, the guards will hear him and the vanilla system will be used ( all guards will hunt the player ) .

Not sure if a IsSneaking check works in Menu mode.

 

EDIT:  test result

works:

The open/activate door always works. no hostile guard.

 

does not work:

-The unlock door sometimes makes the guard hostile

-In the prison I tested it the exit door ( the one with the prison break script)  is a load door. I can unlock the door but I can not activate/use the door, only the set open state is changed.  ( it is a real door, just a black void behind the door )

Now you open all doors in game with your prison break esp. All  load doors doesn't work anymore.

-------

Maybe allow unlock and open door only once when in prison.

Or only if "Get in jail == 1" and  NO prison break flag from the exit door. So when you get near the exit door and get the prison break flag  the vanilla door/lock opening is used again.

 

-----------------------------

When I unlock and open the door without making the guard hostile I can walk around, get near the exit door and activate that script ( prison break.... ) and I still can talk to the patrolling guard (No talking allowed. And reminder they kill escaped prisoners)

That is too easy if you can leave the prison and say goodbye to all the guards on your way out.

 

Edited by fejeena
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use