4
Fork 0

Moved integrity checks to a separate quest

steam-1.6.1130
Eddoursul 6 months ago
parent 687c28275b
commit ddf5960320
  1. BIN
      IntegrityCheck.esp
  2. BIN
      scripts/_00E_IntegrityCheckAlias.pex
  3. BIN
      scripts/_00e_playersetupscript.pex
  4. 37
      source/scripts/_00E_IntegrityCheckAlias.psc
  5. 25
      source/scripts/_00e_playersetupscript.psc

Binary file not shown.

@ -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

@ -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

Loading…
Cancel
Save