Updated dependency checks:

- Added checks for loaded SKSE and fs.dll.
- Ensured the FS.esm check runs without SKSE.
- Check for SKSE, SkyUI, and fs.dll only on PC and VR, skipping it on other platforms.
This commit is contained in:
Eddoursul 2021-12-04 02:30:32 +01:00
parent 48c67c3558
commit 3f58c132d4
6 changed files with 42 additions and 53 deletions

Binary file not shown.

Binary file not shown.

View File

@ -64,25 +64,6 @@ Event OnPlayerLoadGame()
EndIf
RegisterForActions()
Bool bFS = (Game.GetModByName("Enderal - Forgotten Stories.esm") != 255)
Bool bSkyUI = (Game.GetModByName("SkyUI_SE.esp") != 255)
If bFS == False && bSkyUI == False
Debug.MessageBox("Enderal - Forgotten Stories.esm and SkyUI_SE.esp are not loaded! Open Data Files and enable them. If the game was started without them, you should start a new game.")
Game.QuitToMainMenu()
Return
ElseIf bFS == False
Debug.MessageBox("Enderal - Forgotten Stories.esm is not loaded! Open Data Files and enable it. If the game was started without it, you should start a new game.")
Game.QuitToMainMenu()
Return
ElseIf bSkyUI == False
Debug.MessageBox("SkyUI_SE.esp is not loaded! Open Data Files and enable it.")
EndIf
; SE: Workaround for broken physics in saves, made on a mount
If PlayerREF.IsOnMount()
PlayerREF.Dismount()
EndIf
EndIf
EndEvent

View File

@ -23,23 +23,6 @@ Function SetUpScene()
Wait(5.0)
Game.EnablePlayerControls()
Game.DisablePlayerControls(false, true, true, false, true, false, false)
Bool bFS = (Game.GetModByName("Enderal - Forgotten Stories.esm") != 255)
Bool bSkyUI = (Game.GetModByName("SkyUI_SE.esp") != 255)
If bFS == False && bSkyUI == False
Debug.MessageBox("Enderal - Forgotten Stories.esm and SkyUI_SE.esp are not loaded! The game will not run properly. Open Data Files and enable them.")
Game.QuitToMainMenu()
Return
ElseIf bFS == False
Debug.MessageBox("Enderal - Forgotten Stories.esm is not loaded! The game will not run properly. Open Data Files and enable it.")
Game.QuitToMainMenu()
Return
ElseIf bSkyUI == False
Debug.MessageBox("SkyUI_SE.esp is not loaded! The game will not run properly. Open Data Files and enable it.")
Game.QuitToMainMenu()
Return
EndIf
Wait(1.0)
_00E_MQP01_Thoughts01.ShowAsHelpMessage("Empty", 5, 1, 1)

View File

@ -66,19 +66,44 @@ Function CheckIfForgottenStoriesIsLoaded()
; function that quits back to the main menu when the Enderal - Forgotten Stories.esm is not not being added to the plugins.txt
; and hence not being loaded in-game. Unknown reason, probably write protection issues
If Game.GetModByName("Enderal - Forgotten Stories.esm") == 255
bFSWasNotLoadedBefore = true
_00E_Game_ForgottenStoriesNotLoaded.Show()
if (Game.GetFormFromFile(0x0004320E, "Skyrim.esm") as GlobalVariable).GetValueInt() != 1
Utility.wait(2.0)
Game.QuitToMainMenu()
Else
If bFSWasNotLoadedBefore == true
AddPerks()
If FSQuestsToStartFailsafePatch1560 == None
FSQuestsToStartFailsafePatch1560 = Game.GetFormFromFile(0x0102F4B0, "Enderal - Forgotten Stories.esm") as FormList
Debug.MessageBox("Enderal - Forgotten Stories.esm is not loaded! The game will not run properly. Open Data Files and enable it.")
EndIf
StartQuests(FSQuestsToStartFailsafePatch1560)
bFSWasNotLoadedBefore = false
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
Quest bSkyUI = Game.GetFormFromFile(0x00000802, "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
if SKSE.GetPluginVersion("fs_skse_functions") == -1
Utility.wait(2.0)
Game.QuitToMainMenu()
Debug.MessageBox("fs.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
; fixes properties that were accidentally set to NONE by the "More Affinities" mod
If Game.GetModByName("Enderal_FS_More_Affinities.esp") != 255
FixMoreAffinitiesMod()
EndIf
EndFunction
@ -404,9 +429,9 @@ Function Maintenance()
RefreshMountNamesOnLoad()
; fixes properties that were accidentally set to NONE by the "More Affinities" mod
If Game.GetModByName("Enderal_FS_More_Affinities.esp") != 255
FixMoreAffinitiesMod()
; Workaround for broken physics on loading saves, made on a mount
If PlayerREF.IsOnMount()
PlayerREF.Dismount()
EndIf
EndFunction