2021-12-09 20:28:54 +00:00
Scriptname _00E_Func_CheckDependencies Hidden
Function CheckDependencies() global
; If Enderal - Forgotten Stories.esm is not loaded, kick the player back to main menu
2022-07-31 18:55:11 +00:00
if (Game.GetForm(0x4320E) as GlobalVariable).GetValue() as Int != 1
2021-12-09 20:28:54 +00:00
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.")
2022-07-28 20:04:13 +00:00
return
2021-12-09 20:28:54 +00:00
EndIf
; Skip all other check on non-PC/non-VR platforms (for future ports)
; If you are porting Enderal to another platform, you may want to replace _00E_Func_CheckDependencies with your own script.
if Debug.GetPlatformName() != "Win64"
return
endif
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
2022-07-31 18:55:11 +00:00
Quest bSkyUI = Game.GetFormFromFile(0x802, "SkyUI_SE.esp") as Quest
2021-12-09 20:28:54 +00:00
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
2022-07-31 18:55:11 +00:00
if SKSE.GetPluginVersion("EnderalSE") == -1
2021-12-09 20:28:54 +00:00
Utility.wait(2.0)
Game.QuitToMainMenu()
2022-07-31 18:55:11 +00:00
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.")
2021-12-09 20:28:54 +00:00
Return
endif
2021-12-16 08:13:33 +00:00
if (SKSE.GetPluginVersion("JContainers64") == -1) && (SKSE.GetPluginVersion("JContainersVR") == -1)
2021-12-09 20:28:54 +00:00
; 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