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

@ -15,16 +15,6 @@ Event OnInit()
return return
EndIf 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") GoToState("RealPlayer")
PlayerREF.SetActorValue("speedMult", 95) PlayerREF.SetActorValue("speedMult", 95)
PlayerREF.SetActorValue("Healrate", 0) PlayerREF.SetActorValue("Healrate", 0)
@ -43,11 +33,6 @@ EndEvent
Event OnPlayerLoadGame() Event OnPlayerLoadGame()
If self == (PlayerREF as ObjectReference) ; A check just in case. Most likely this condition is always True 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() Maintenance()
If GetState() != "RealPlayer" If GetState() != "RealPlayer"
GoToState("RealPlayer") GoToState("RealPlayer")
@ -129,16 +114,6 @@ EndFunction
; MAINTENANCE ; 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() Function Maintenance()
; changes to the actor value healrate will not persist in consecutive saves ; changes to the actor value healrate will not persist in consecutive saves