JailBedScript? Where Is It In The Game?

Post » Sun Oct 30, 2016 3:34 am

I have edited the JailBedScript.psc file which is a script but in order to compile it and add my new properties I need to find it in the creation kit. But I cannot find where it is. Is this script even used in the game? The first line in the script is "Scriptname JailBedScript extends ObjectReference" which means it has to be connected to a Reference of an Object. Any help will be most appreciated!

User avatar
Lewis Morel
 
Posts: 3431
Joined: Thu Aug 16, 2007 7:40 pm

Post » Sat Oct 29, 2016 11:29 pm

That script isn't used in the final game. The comment at the top says its author was wanting it to be temporary. It appears they hard coded jail behavior into the game engine instead of relying on that script by the time they released the game. If you've been sent to jail you get the jail special actions no matter where you sleep. I tested with my own portable bedroll mod and it doesn't matter whether I use it or the standard jail bed.

User avatar
jessica breen
 
Posts: 3524
Joined: Thu Aug 03, 2006 1:04 am

Post » Sat Oct 29, 2016 6:48 pm


That make sense why when I right click on the JailBedMsg in the Creation Kit under info it wasn't linked to anything. Do you know of a way to detect if the player served his jail time? I know how to detect if a player has gone to jail and escaped by using...



Game.QueryStat("Jail Escapes")

Game.QueryStat("Times Jailed")

But I cannot figure out a way to detect if the person has gone to jail and served their time.

User avatar
Jason Rice
 
Posts: 3445
Joined: Thu Aug 16, 2007 3:42 pm

Post » Sat Oct 29, 2016 4:05 pm

There a game stat for time in prison. You could keep track of that stat this way:



http://www.creationkit.com/index.php?title=OnTrackedStatsEvent_-_Form



Update your stat-tracking after each wait / sleep.



The stat is called "Days Jailed".

User avatar
Kortniie Dumont
 
Posts: 3428
Joined: Wed Jan 10, 2007 7:50 pm

Post » Sat Oct 29, 2016 1:32 pm

I have figure out a way and tested it with every jail in Skyrim and Solstheim. It needs to be in a Quest Script.



Event OnInIt()
RegisterForUpdate(1.0)
EndEvent

Event OnUpdate()
If MyJailVar.GetValue() == 0
If Game.QueryStat("Times Jailed") > MyJailTimes.GetValue()
MyJailTimes.SetValue(Game.QueryStat("Times Jailed"))
MyJailVar.SetValue(1)
MyJailEscapes.SetValue(Game.QueryStat("Jail Escapes"))
Endif
ElseIf MyJailVar.GetValue() == 1
If Game.QueryStat("Jail Escapes") > MyJailEscapes.GetValue()
;Add Escaped Jail code here
MyJailVar.SetValue(0)
Elseif Game.GetPlayer().IsInInterior() == 0
MyJailVar.SetValue(2)
Endif
ElseIf MyJailVar.GetValue() == 2
If Game.QueryStat("Jail Escapes") > MyJailEscapes.GetValue()
;Add Escaped Jail code here
MyJailVar.SetValue(0)
Elseif Game.GetPlayer().IsInInterior() == 0
;Add Served Jailtime code here
MyJailVar.SetValue(0)
Endif
EndIf
EndEvent
User avatar
Pixie
 
Posts: 3430
Joined: Sat Oct 07, 2006 4:50 am


Return to V - Skyrim