diff --git a/IntegrityCheck.esp b/IntegrityCheck.esp new file mode 100644 index 00000000..131a35a5 Binary files /dev/null and b/IntegrityCheck.esp differ diff --git a/scripts/_00E_IntegrityCheckAlias.pex b/scripts/_00E_IntegrityCheckAlias.pex new file mode 100644 index 00000000..436f20b6 Binary files /dev/null and b/scripts/_00E_IntegrityCheckAlias.pex differ diff --git a/scripts/_00e_playersetupscript.pex b/scripts/_00e_playersetupscript.pex index 6cdc7d91..60737b7d 100644 Binary files a/scripts/_00e_playersetupscript.pex and b/scripts/_00e_playersetupscript.pex differ diff --git a/source/scripts/_00E_IntegrityCheckAlias.psc b/source/scripts/_00E_IntegrityCheckAlias.psc new file mode 100644 index 00000000..35c6e72f --- /dev/null +++ b/source/scripts/_00E_IntegrityCheckAlias.psc @@ -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 diff --git a/source/scripts/_00e_playersetupscript.psc b/source/scripts/_00e_playersetupscript.psc index e832cd0d..d0c5050e 100644 --- a/source/scripts/_00e_playersetupscript.psc +++ b/source/scripts/_00e_playersetupscript.psc @@ -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