diff --git a/scripts/SKSE_placeholder.pex b/scripts/SKSE_placeholder.pex index 301eef8a..4bfc559c 100644 Binary files a/scripts/SKSE_placeholder.pex and b/scripts/SKSE_placeholder.pex differ diff --git a/scripts/_00E_Func_ReferenceFormList.pex b/scripts/_00E_Func_ReferenceFormList.pex index c1380a0d..4a477dcd 100644 Binary files a/scripts/_00E_Func_ReferenceFormList.pex and b/scripts/_00E_Func_ReferenceFormList.pex differ diff --git a/scripts/_00E_SafeItemRemove.pex b/scripts/_00E_SafeItemRemove.pex index e631a9db..0238b6f7 100644 Binary files a/scripts/_00E_SafeItemRemove.pex and b/scripts/_00E_SafeItemRemove.pex differ diff --git a/scripts/_00E_UnlockSpellAlias.pex b/scripts/_00E_UnlockSpellAlias.pex index 7e553f0a..ef4aeace 100644 Binary files a/scripts/_00E_UnlockSpellAlias.pex and b/scripts/_00E_UnlockSpellAlias.pex differ diff --git a/scripts/_00e_autosavesystem_functions.pex b/scripts/_00e_autosavesystem_functions.pex index 6a645788..c20f1708 100644 Binary files a/scripts/_00e_autosavesystem_functions.pex and b/scripts/_00e_autosavesystem_functions.pex differ diff --git a/scripts/_00e_enderalmcm.pex b/scripts/_00e_enderalmcm.pex index b61d37fe..1a741612 100644 Binary files a/scripts/_00e_enderalmcm.pex and b/scripts/_00e_enderalmcm.pex differ diff --git a/scripts/_00e_game_talentcontrolsc.pex b/scripts/_00e_game_talentcontrolsc.pex index c59824a2..d5cfc626 100644 Binary files a/scripts/_00e_game_talentcontrolsc.pex and b/scripts/_00e_game_talentcontrolsc.pex differ diff --git a/scripts/_00e_gui_actorhealthbar.pex b/scripts/_00e_gui_actorhealthbar.pex index 9f833a2d..c0e2af76 100644 Binary files a/scripts/_00e_gui_actorhealthbar.pex and b/scripts/_00e_gui_actorhealthbar.pex differ diff --git a/scripts/_sag_activ_newstatsscripts.pex b/scripts/_sag_activ_newstatsscripts.pex index 856f5989..7324f7c1 100644 Binary files a/scripts/_sag_activ_newstatsscripts.pex and b/scripts/_sag_activ_newstatsscripts.pex differ diff --git a/scripts/_sag_pc_statstrack_playerscript.pex b/scripts/_sag_pc_statstrack_playerscript.pex index 0c57d709..a059053c 100644 Binary files a/scripts/_sag_pc_statstrack_playerscript.pex and b/scripts/_sag_pc_statstrack_playerscript.pex differ diff --git a/source/scripts/SKSE_placeholder.psc b/source/scripts/SKSE_placeholder.psc index ab6406a1..7be5eeab 100644 --- a/source/scripts/SKSE_placeholder.psc +++ b/source/scripts/SKSE_placeholder.psc @@ -13,7 +13,7 @@ int Function GetVersionMinor() global endFunction ; get the beta version of SKSE -int Function GetVersionBeta() +int Function GetVersionBeta() global return 0 endFunction diff --git a/source/scripts/_00E_Func_ReferenceFormList.psc b/source/scripts/_00E_Func_ReferenceFormList.psc index f5a73a00..d78b2cb7 100644 --- a/source/scripts/_00E_Func_ReferenceFormList.psc +++ b/source/scripts/_00E_Func_ReferenceFormList.psc @@ -5,7 +5,7 @@ Function Enable(FormList referenceList) Global Int nItems = referenceList.GetSize() Int i = 0 - If nItems < 128 && nItems > 1 + If nItems < 128 && nItems > 1 && SKSE.GetVersion() > 0 Form[] refArray = referenceList.ToArray() While i < nItems (refArray[i] as ObjectReference).EnableNoWait() @@ -25,7 +25,7 @@ Function Disable(FormList referenceList) Global Int nItems = referenceList.GetSize() Int i = 0 - If nItems < 128 && nItems > 1 + If nItems < 128 && nItems > 1 && SKSE.GetVersion() > 0 Form[] refArray = referenceList.ToArray() While i < nItems (refArray[i] as ObjectReference).DisableNoWait() diff --git a/source/scripts/_00E_SafeItemRemove.psc b/source/scripts/_00E_SafeItemRemove.psc index af60829a..c08ef49e 100644 --- a/source/scripts/_00E_SafeItemRemove.psc +++ b/source/scripts/_00E_SafeItemRemove.psc @@ -6,10 +6,11 @@ Function RemoveAllItemsSafeVersion(ObjectReference TransferToLoc = NONE) EndIf RemoveItemsIncrementally(Gold001, TransferToLoc) - Form[] arrows = _00E_AllAmmos.ToArray() + + Int nItems = _00E_AllAmmos.GetSize() Int i = 0 - While i < arrows.Length - RemoveItemsIncrementally(arrows[i], TransferToLoc) + While i < nItems + RemoveItemsIncrementally(_00E_AllAmmos.GetAt(i), TransferToLoc) i += 1 EndWhile diff --git a/source/scripts/_00E_UnlockSpellAlias.psc b/source/scripts/_00E_UnlockSpellAlias.psc index 01a24f77..646ba86d 100644 --- a/source/scripts/_00E_UnlockSpellAlias.psc +++ b/source/scripts/_00E_UnlockSpellAlias.psc @@ -7,11 +7,13 @@ Int Property LOCK_LEVEL_EXPERT = 75 AutoReadOnly Int Property LOCK_LEVEL_MASTER = 254 AutoReadOnly event OnInit() - RegisterForModEvent("Enderal_UnlockSpellHit", "OnUnlockSpell") + OnPlayerLoadGame() endevent event OnPlayerLoadGame() - RegisterForModEvent("Enderal_UnlockSpellHit", "OnUnlockSpell") + if SKSE.GetVersion() > 0 + RegisterForModEvent("Enderal_UnlockSpellHit", "OnUnlockSpell") + endif endevent Event OnUnlockSpell(string eventName, string strArg, float fSpellFormID, Form containerForm) diff --git a/source/scripts/_00e_autosavesystem_functions.psc b/source/scripts/_00e_autosavesystem_functions.psc index 586e4271..679b588d 100644 --- a/source/scripts/_00e_autosavesystem_functions.psc +++ b/source/scripts/_00e_autosavesystem_functions.psc @@ -29,6 +29,7 @@ Function UpdateAutoSaveInterval() if SKSE.GetVersion() <= 0 UnregisterForUpdate() + Debug.Trace("NO SKSE: timed autosaves are disabled") return endif diff --git a/source/scripts/_00e_enderalmcm.psc b/source/scripts/_00e_enderalmcm.psc index 8e3b1cbc..6525b799 100644 --- a/source/scripts/_00e_enderalmcm.psc +++ b/source/scripts/_00e_enderalmcm.psc @@ -8,6 +8,14 @@ int function _GetScriptVersion() Global return 1 endFunction +event OnGameReload() + if SKSE.GetVersion() == 0 + Debug.Trace("NO SKSE: the Mod Configuration Menu is disabled") + return + endif + parent.OnGameReload() +endevent + Event OnPageReset(string page) ; adding options to rebind new key options: 1) Hero menu 2) meditation 3) Phasmalist summon apparition 4) Horseflute diff --git a/source/scripts/_00e_game_talentcontrolsc.psc b/source/scripts/_00e_game_talentcontrolsc.psc index adcf9ecb..77a08e79 100644 --- a/source/scripts/_00e_game_talentcontrolsc.psc +++ b/source/scripts/_00e_game_talentcontrolsc.psc @@ -38,15 +38,20 @@ EndFunction ;===================================================================================== Event OnInit() - If self == PlayerREF - GoToState("RealPlayer") - RegisterForActions() - EndIf + OnPlayerLoadGame() EndEvent Event OnPlayerLoadGame() - If self == PlayerREF ; A check just in case. Most likely this condition is always True + If self == PlayerREF && SKSE.GetVersion() > 0 + if GetState() != "RealPlayer" + GoToState("RealPlayer") + endif RegisterForActions() + else + Debug.Trace("NO SKSE: individual shout cooldowns are disabled") + if GetState() != "Disabled" + GoToState("Disabled") + endif EndIf EndEvent @@ -90,6 +95,10 @@ State RealPlayer EndState +state Disabled + ; Do nothing +endstate + ;===================================================================================== ; PROPERTIES ;===================================================================================== diff --git a/source/scripts/_00e_gui_actorhealthbar.psc b/source/scripts/_00e_gui_actorhealthbar.psc index 5f215a72..8bf24254 100644 --- a/source/scripts/_00e_gui_actorhealthbar.psc +++ b/source/scripts/_00e_gui_actorhealthbar.psc @@ -111,6 +111,11 @@ endEvent event OnGameReload() + if SKSE.GetVersion() == 0 + Debug.Trace("NO SKSE: companion health bars are disabled") + return + endif + parent.OnGameReload() If Game.GetModByName("SkyUI_SE.esp") == 255 || _00E_ActorHealthBarsEnabled.GetValue() == 0 diff --git a/source/scripts/_sag_activ_newstatsscripts.psc b/source/scripts/_sag_activ_newstatsscripts.psc index 1b0e54df..8e8a7064 100644 --- a/source/scripts/_sag_activ_newstatsscripts.psc +++ b/source/scripts/_sag_activ_newstatsscripts.psc @@ -12,8 +12,13 @@ GlobalVariable Property ProphetDiceLostGold Auto GlobalVariable Property _SAG_ProphDiceWonGold Auto Event OnInit() - RegisterForMenu("Journal Menu") + if SKSE.GetVersion() > 0 + RegisterForMenu("Journal Menu") + else + Debug.Trace("NO SKSE: Dice Jack stats display is disabled") + endif EndEvent + Event OnPlayerLoadGame() OnInit() EndEvent diff --git a/source/scripts/_sag_pc_statstrack_playerscript.psc b/source/scripts/_sag_pc_statstrack_playerscript.psc index d63ddcf4..4eb0b1c9 100644 --- a/source/scripts/_sag_pc_statstrack_playerscript.psc +++ b/source/scripts/_sag_pc_statstrack_playerscript.psc @@ -13,7 +13,11 @@ String sLostBetsValue Event OnInit() - RegisterForMenu("Journal Menu") + if SKSE.GetVersion() > 0 + RegisterForMenu("Journal Menu") + else + Debug.Trace("NO SKSE: card game stats display is disabled") + endif endEvent Event OnPlayerLoadGame()