diff --git a/scripts/_00e_func_checkdependencies.pex b/scripts/_00e_func_checkdependencies.pex deleted file mode 100644 index 640df0d5..00000000 Binary files a/scripts/_00e_func_checkdependencies.pex and /dev/null differ diff --git a/scripts/_00e_func_checkenderaldll.pex b/scripts/_00e_func_checkenderaldll.pex new file mode 100644 index 00000000..5b44ee2a Binary files /dev/null and b/scripts/_00e_func_checkenderaldll.pex differ diff --git a/scripts/_00e_func_checkjcontainers.pex b/scripts/_00e_func_checkjcontainers.pex new file mode 100644 index 00000000..ffbb6b7b Binary files /dev/null and b/scripts/_00e_func_checkjcontainers.pex differ diff --git a/scripts/_00e_func_checkskse.pex b/scripts/_00e_func_checkskse.pex new file mode 100644 index 00000000..e4e486e0 Binary files /dev/null and b/scripts/_00e_func_checkskse.pex differ diff --git a/scripts/_00e_func_checkskyui.pex b/scripts/_00e_func_checkskyui.pex new file mode 100644 index 00000000..46f23189 Binary files /dev/null and b/scripts/_00e_func_checkskyui.pex differ diff --git a/scripts/_00e_playersetupscript.pex b/scripts/_00e_playersetupscript.pex index 0cc0d19e..fc9cf840 100644 Binary files a/scripts/_00e_playersetupscript.pex and b/scripts/_00e_playersetupscript.pex differ diff --git a/source/scripts/_00e_func_checkdependencies.psc b/source/scripts/_00e_func_checkdependencies.psc deleted file mode 100644 index e0d9673d..00000000 --- a/source/scripts/_00e_func_checkdependencies.psc +++ /dev/null @@ -1,39 +0,0 @@ -Scriptname _00E_Func_CheckDependencies Hidden - -Function CheckDependencies() global - - ; SKSE is currently mandatory - Int SKSEVer = SKSE.GetVersion() - - if SKSEVer == 0 - Utility.wait(2.0) - Game.QuitToMainMenu() - Debug.MessageBox("SKSE is not detected! Start Enderal through the launcher or skse64_loader.exe in the game directory.") - Return - endif - - ; SkyUI is optional - override quest_journal.swf with the vanilla file, remove this check, and you are good to go - Quest bSkyUI = Game.GetFormFromFile(0x802, "SkyUI_SE.esp") as Quest - - If bSkyUI == None - Utility.wait(2.0) - Game.QuitToMainMenu() - Debug.MessageBox("SkyUI_SE.esp is not loaded! The game will not run properly. Open Data Files and enable it.") - Return - EndIf - - ; To get rid of this, make alternatives for CreatePotion and CalculateContentStrength first - if SKSE.GetPluginVersion("EnderalSE") == -1 - Utility.wait(2.0) - Game.QuitToMainMenu() - Debug.MessageBox("EnderalSE.dll is not loaded! The game will not run properly. Verify integrity of your files.\n\nThis may also happen, if your version of SKSE or Enderal is too old. In this case, it is advised to upgrade.") - Return - endif - - if (SKSE.GetPluginVersion("JContainers64") == -1) && (SKSE.GetPluginVersion("JContainersVR") == -1) - ; JContainers is only required for lycanthropy, so we just nag users without preventing playing without it - Utility.wait(2.0) - Debug.MessageBox("JContainers is not loaded! The game will not run properly. Verify integrity of your files or reinstall JContainers.") - endif - -EndFunction diff --git a/source/scripts/_00e_func_checkenderaldll.psc b/source/scripts/_00e_func_checkenderaldll.psc new file mode 100644 index 00000000..ce0134fe --- /dev/null +++ b/source/scripts/_00e_func_checkenderaldll.psc @@ -0,0 +1,15 @@ +Scriptname _00E_Func_CheckEnderalDLL Hidden + +Function Run() global + + Int SKSEVer = SKSE.GetVersion() + + ; To get rid of this, make alternatives for CreatePotion and CalculateContentStrength first + if SKSEVer == 0 || SKSE.GetPluginVersion("EnderalSE") == -1 + Utility.wait(2.0) + Game.QuitToMainMenu() + Debug.MessageBox("EnderalSE.dll is not loaded! The game will not run properly. Verify integrity of your files.\n\nThis may also happen, if your version of SKSE or Enderal is too old. In this case, it is advised to upgrade.") + Return + endif + +EndFunction diff --git a/source/scripts/_00e_func_checkjcontainers.psc b/source/scripts/_00e_func_checkjcontainers.psc new file mode 100644 index 00000000..e622efb7 --- /dev/null +++ b/source/scripts/_00e_func_checkjcontainers.psc @@ -0,0 +1,13 @@ +Scriptname _00E_Func_CheckJContainers Hidden + +Function Run() global + + Int SKSEVer = SKSE.GetVersion() + + if (SKSEVer == 0 || (SKSE.GetPluginVersion("JContainers64") == -1) && (SKSE.GetPluginVersion("JContainersVR") == -1)) + ; JContainers is only required for lycanthropy, so we just nag users without preventing playing without it + Utility.wait(2.0) + Debug.MessageBox("JContainers is not loaded! The game will not run properly. Verify integrity of your files or reinstall JContainers.") + endif + +EndFunction diff --git a/source/scripts/_00e_func_checkskse.psc b/source/scripts/_00e_func_checkskse.psc new file mode 100644 index 00000000..dfbe84e0 --- /dev/null +++ b/source/scripts/_00e_func_checkskse.psc @@ -0,0 +1,15 @@ +Scriptname _00E_Func_CheckSKSE Hidden + +Function Run() global + + ; SKSE is currently mandatory + Int SKSEVer = SKSE.GetVersion() + + if SKSEVer == 0 + Utility.wait(2.0) + Game.QuitToMainMenu() + Debug.MessageBox("SKSE is not detected! Start Enderal through the launcher or skse64_loader.exe in the game directory.") + Return + endif + +EndFunction diff --git a/source/scripts/_00e_func_checkskyui.psc b/source/scripts/_00e_func_checkskyui.psc new file mode 100644 index 00000000..dc60cc6a --- /dev/null +++ b/source/scripts/_00e_func_checkskyui.psc @@ -0,0 +1,15 @@ +Scriptname _00E_Func_CheckSkyUI Hidden + +Function Run() global + + ; SkyUI is optional - override quest_journal.swf with the vanilla file, remove this check, and you are good to go + Quest bSkyUI = Game.GetFormFromFile(0x802, "SkyUI_SE.esp") as Quest + + If bSkyUI == None + Utility.wait(2.0) + Game.QuitToMainMenu() + Debug.MessageBox("SkyUI_SE.esp is not loaded! The game will not run properly. Open Data Files and enable it.") + Return + EndIf + +EndFunction diff --git a/source/scripts/_00e_playersetupscript.psc b/source/scripts/_00e_playersetupscript.psc index ed4face9..36260c35 100644 --- a/source/scripts/_00e_playersetupscript.psc +++ b/source/scripts/_00e_playersetupscript.psc @@ -20,7 +20,11 @@ Event OnInit() EndWhile CheckForgottenStories() - _00E_Func_CheckDependencies.CheckDependencies() + + _00E_Func_CheckSKSE.Run() + _00E_Func_CheckSkyUI.Run() + _00E_Func_CheckEnderalDLL.Run() + _00E_Func_CheckJContainers.Run() If fPatchVersion == 0.00 fPatchVersion = CURRENT_PATCH_VERSION @@ -52,7 +56,12 @@ EndEvent Event OnPlayerLoadGame() If self == (PlayerREF as ObjectReference) ; A check just in case. Most likely this condition is always True CheckForgottenStories() - _00E_Func_CheckDependencies.CheckDependencies() + + _00E_Func_CheckSKSE.Run() + _00E_Func_CheckSkyUI.Run() + _00E_Func_CheckEnderalDLL.Run() + _00E_Func_CheckJContainers.Run() + Maintenance() If GetState() != "RealPlayer" ; Post-1.2.5.0 version update GoToState("RealPlayer") @@ -163,14 +172,6 @@ Function Update_212() PlayerREF.AddPerk(Game.GetFormFromFile(0x14CF8, "Enderal - Forgotten Stories.esm") as Perk) ; _00E_SE_WerewolfBlockFurniturePerk PlayerREF.AddPerk(Game.GetFormFromFile(0x14CFA, "Enderal - Forgotten Stories.esm") as Perk) ; _00E_SE_DismantlePerk PlayerREF.AddPerk(Game.GetFormFromFile(0x14CF9, "Enderal - Forgotten Stories.esm") as Perk) ; _00E_SE_2_0_12_UpgradePerk - - Quest qSkyUI = Game.GetFormFromFile(0x802, "SkyUI_SE.esp") as Quest - if qSkyUI - (qSkyUI as SKI_ConfigManager).ForceReset() - qSkyUI.Reset() - qSkyUI.Start() - (qSkyUI as SKI_ConfigManager).OnGameReload() - endif EndFunction