Moved integrity checks to a separate quest

This commit is contained in:
Eddoursul 2023-10-27 21:14:07 +02:00
parent 687c28275b
commit ddf5960320
5 changed files with 37 additions and 25 deletions

BIN
IntegrityCheck.esp Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,37 @@
Scriptname _00E_IntegrityCheckAlias extends ReferenceAlias Hidden
Event OnInit()
; needs the IsInMenuMode() check to prevent stuck messages
While Utility.IsInMenuMode()
Utility.WaitMenuMode(0.1)
EndWhile
CheckForgottenStories()
_00E_Func_CheckSKSE.Run()
_00E_Func_CheckEnderalDLL.Run()
EndEvent
Event OnPlayerLoadGame()
CheckForgottenStories()
_00E_Func_CheckSKSE.Run()
_00E_Func_CheckEnderalDLL.Run()
EndEvent
function CheckForgottenStories()
; If Enderal - Forgotten Stories.esm is not loaded, kick the player back to main menu
if _00E_FS_IsForgottenStoriesActivated.GetValue() as Int != 1
Utility.wait(2.0)
Game.QuitToMainMenu()
Debug.MessageBox("Enderal - Forgotten Stories.esm is not loaded! The game will not run properly. Open Data Files and enable it.")
return
EndIf
endfunction
GlobalVariable Property _00E_FS_IsForgottenStoriesActivated Auto

View File

@ -14,16 +14,6 @@ Event OnInit()
If self != (PlayerREF as ObjectReference)
return
EndIf
; needs the IsInMenuMode() check to prevent stuck messages when FS is not loaded
While Utility.IsInMenuMode()
Utility.WaitMenuMode(0.1)
EndWhile
CheckForgottenStories()
_00E_Func_CheckSKSE.Run()
_00E_Func_CheckEnderalDLL.Run()
GoToState("RealPlayer")
PlayerREF.SetActorValue("speedMult", 95)
@ -43,11 +33,6 @@ EndEvent
Event OnPlayerLoadGame()
If self == (PlayerREF as ObjectReference) ; A check just in case. Most likely this condition is always True
CheckForgottenStories()
_00E_Func_CheckSKSE.Run()
_00E_Func_CheckEnderalDLL.Run()
Maintenance()
If GetState() != "RealPlayer"
GoToState("RealPlayer")
@ -129,16 +114,6 @@ EndFunction
; MAINTENANCE
;=====================================================================================
function CheckForgottenStories()
; If Enderal - Forgotten Stories.esm is not loaded, kick the player back to main menu
if (Game.GetForm(0x4320E) as GlobalVariable).GetValue() as Int != 1
Utility.wait(2.0)
Game.QuitToMainMenu()
Debug.MessageBox("Enderal - Forgotten Stories.esm is not loaded! The game will not run properly. Open Data Files and enable it.")
return
EndIf
endfunction
Function Maintenance()
; changes to the actor value healrate will not persist in consecutive saves