diff --git a/scripts/_00E_AffinityControl.pex b/scripts/_00E_AffinityControl.pex index 4b3276d5..133e5676 100644 Binary files a/scripts/_00E_AffinityControl.pex and b/scripts/_00E_AffinityControl.pex differ diff --git a/scripts/_00e_class_openclassmenuscript.pex b/scripts/_00e_class_openclassmenuscript.pex index 9195b3b0..de9b9812 100644 Binary files a/scripts/_00e_class_openclassmenuscript.pex and b/scripts/_00e_class_openclassmenuscript.pex differ diff --git a/scripts/_00e_epupdatefunctions.pex b/scripts/_00e_epupdatefunctions.pex index cf13a25b..e0a4a8d3 100644 Binary files a/scripts/_00e_epupdatefunctions.pex and b/scripts/_00e_epupdatefunctions.pex differ diff --git a/scripts/_00e_fs_recipe.pex b/scripts/_00e_fs_recipe.pex index 19d9804f..dceaf5ac 100644 Binary files a/scripts/_00e_fs_recipe.pex and b/scripts/_00e_fs_recipe.pex differ diff --git a/scripts/_00e_game_skillmenuleavesc.pex b/scripts/_00e_game_skillmenuleavesc.pex index c6eaa868..085612f2 100644 Binary files a/scripts/_00e_game_skillmenuleavesc.pex and b/scripts/_00e_game_skillmenuleavesc.pex differ diff --git a/scripts/_00e_mqp01_startsc.pex b/scripts/_00e_mqp01_startsc.pex index b9b08656..f0175856 100644 Binary files a/scripts/_00e_mqp01_startsc.pex and b/scripts/_00e_mqp01_startsc.pex differ diff --git a/scripts/_00e_mqp03_functions.pex b/scripts/_00e_mqp03_functions.pex index 8f48649a..1a923b7c 100644 Binary files a/scripts/_00e_mqp03_functions.pex and b/scripts/_00e_mqp03_functions.pex differ diff --git a/source/scripts/_00E_AffinityControl.psc b/source/scripts/_00E_AffinityControl.psc index 29a154c1..01cfa01b 100644 --- a/source/scripts/_00E_AffinityControl.psc +++ b/source/scripts/_00E_AffinityControl.psc @@ -132,8 +132,14 @@ Function UpdateMajorSchool() EndFunction Int[] Function GetPerkDistribution() - Int[] PerkDistribution = Utility.CreateIntArray(PerkTree_Trees.Length, 0) - + Int[] PerkDistribution + + if SKSE.GetVersion() > 0 + PerkDistribution = Utility.CreateIntArray(PerkTree_Trees.Length, 0) + else + PerkDistribution = new int[12] + endif + Int Index = 0 While Index < PerkTree_Trees.Length If PerkTree_Trees[Index] @@ -146,8 +152,14 @@ Int[] Function GetPerkDistribution() EndFunction Int[] Function GetMaxPerkDistribution() - Int[] MaxPerkDistribution = Utility.CreateIntArray(PerkTree_Trees.Length, 0) - + Int[] MaxPerkDistribution + + if SKSE.GetVersion() > 0 + MaxPerkDistribution = Utility.CreateIntArray(PerkTree_Trees.Length, 0) + else + MaxPerkDistribution = new int[12] + endif + Int Index = 0 While Index < PerkTree_Trees.Length If PerkTree_Trees[Index] @@ -196,6 +208,11 @@ Function UpdateClassIndices(Int[] PerkDistribution) EndFunction Function ResetUnlockedAffinities() + if SKSE.GetVersion() == 0 + affinitiesUnlocked = new bool[21] + return + endif + affinitiesUnlocked = Utility.CreateBoolArray(Affinity_Spells.Length, False) ; For whatever reason, the second "filler" arg in CreateBoolArray does not work, the array is filled with True @@ -331,7 +348,14 @@ Function GetPlayerClass() Int nTotalUnlockedAffinityCount = 0 Int nSinceLastTimeUnlockedAffinityCount = 0 - Int[] unlockedAffinityIndices = Utility.CreateIntArray(affinitiesUnlocked.Length, 0) + + Int[] unlockedAffinityIndices + + if SKSE.GetVersion() > 0 + unlockedAffinityIndices = Utility.CreateIntArray(affinitiesUnlocked.Length, 0) + else + unlockedAffinityIndices = new int[21] + endif Int Index = 0 While Index < affinitiesUnlocked.Length diff --git a/source/scripts/_00e_class_openclassmenuscript.psc b/source/scripts/_00e_class_openclassmenuscript.psc index 077554b8..4b3dca59 100644 --- a/source/scripts/_00e_class_openclassmenuscript.psc +++ b/source/scripts/_00e_class_openclassmenuscript.psc @@ -56,7 +56,8 @@ EndEvent Function EnterClassMenu() - DisablePlayerControls(false, true, true, false, true, false, false, true) + bool bDisableFighting = (SKSE.GetVersion() > 0) + DisablePlayerControls(false, bDisableFighting, true, false, true, false, false, true) Player.ForceRefTo(PlayerREF) Bool isFirstPerson = False isFirstPerson = PlayerREF.GetAnimationVariableBool("IsFirstPerson") @@ -79,7 +80,7 @@ Function EnterClassMenu() Wait(0.7) PlayerREF.MoveTo(_00E_ClassMenuOrigin) Game.ShowFirstPersonGeometry(False) - DisablePlayerControls(false, true, true, false, true, false, false, true) + DisablePlayerControls(false, bDisableFighting, true, false, true, false, false, true) ForceFirstPerson() EndFunction diff --git a/source/scripts/_00e_epupdatefunctions.psc b/source/scripts/_00e_epupdatefunctions.psc index 5093c0d5..0bf4832f 100644 --- a/source/scripts/_00e_epupdatefunctions.psc +++ b/source/scripts/_00e_epupdatefunctions.psc @@ -190,7 +190,7 @@ State RealPlayer ; Level up If iLevelUpsNeeded > 0 ; Level up if not in combat, not in dialogue, activate controls enabled (not in a scene?) and, obviously, not dead - While !IsInCombat() && UI.IsMenuOpen("Dialogue Menu") == False && Game.IsActivateControlsEnabled() && !Player.IsDead() && (isdead == False) && (iLevelUpsNeeded > 0) + While !IsInCombat() && (SKSE.GetVersion() == 0 || UI.IsMenuOpen("Dialogue Menu") == False) && Game.IsActivateControlsEnabled() && !Player.IsDead() && (isdead == False) && (iLevelUpsNeeded > 0) levelUp() EndWhile EndIf diff --git a/source/scripts/_00e_fs_recipe.psc b/source/scripts/_00e_fs_recipe.psc index cce29e41..a967904a 100644 --- a/source/scripts/_00e_fs_recipe.psc +++ b/source/scripts/_00e_fs_recipe.psc @@ -14,6 +14,28 @@ MagicEffect Property effect2 = None Auto MagicEffect Property effect3 = None Auto Event OnRead() + if SKSE.GetVersion() == 0 + If ing0 != None + ing0.LearnAllEffects() + EndIf + If ing1 != None + ing1.LearnAllEffects() + EndIf + If ing2 != None + ing2.LearnAllEffects() + EndIf + If ing3 != None + ing3.LearnAllEffects() + EndIf + If ing4 != None + ing4.LearnAllEffects() + EndIf + If ing5 != None + ing5.LearnAllEffects() + Endif + return + endif + MagicEffect[] effects = new MagicEffect[4] effects[0] = effect0 effects[1] = effect1 diff --git a/source/scripts/_00e_game_skillmenuleavesc.psc b/source/scripts/_00e_game_skillmenuleavesc.psc index 61334da7..6a63cca3 100644 --- a/source/scripts/_00e_game_skillmenuleavesc.psc +++ b/source/scripts/_00e_game_skillmenuleavesc.psc @@ -18,7 +18,9 @@ EndEvent Event OnTriggerLeave(ObjectReference akActionRef) If akActionRef == PlayerREF - UnregisterForKey(Input.GetMappedKey("Shout")) + if SKSE.GetVersion() + UnregisterForKey(Input.GetMappedKey("Shout")) + endif _00E_A2_GhostwalkSneakFailsave.SetValue(PlayerREF.GetActorValue("Sneak")) EndIf @@ -27,8 +29,10 @@ EndEvent Event OnTriggerEnter(ObjectReference akActionRef) If akActionRef == PlayerREF && MQP03.GetCurrentStageID() >= 15 - iMappedKeyCode = Input.GetMappedKey("Shout") - RegisterForKey(iMappedKeyCode) + if SKSE.GetVersion() + iMappedKeyCode = Input.GetMappedKey("Shout") + RegisterForKey(iMappedKeyCode) + endif Game.RequestAutoSave() EndIf diff --git a/source/scripts/_00e_mqp01_startsc.psc b/source/scripts/_00e_mqp01_startsc.psc index 13f73bfa..9787fcdd 100644 --- a/source/scripts/_00e_mqp01_startsc.psc +++ b/source/scripts/_00e_mqp01_startsc.psc @@ -18,7 +18,8 @@ Event OnTriggerEnter (ObjectReference akActionREF) PlayerREF.MoveTo(_00E_ClassMenuOrigin) Debug.SendAnimationEvent(PlayerRef, "IdleForceDefaultState") Game.ShowRaceMenu() - Game.DisablePlayerControls(false, true, true, false, true, false, false, true) + bool bDisableFighting = (SKSE.GetVersion() > 0) + Game.DisablePlayerControls(false, bDisableFighting, true, false, true, false, false, true) MQP03.SetCurrentStageID(15) (MQP02 as _00E_MQP02_Functions).AddRacialAbilites() else diff --git a/source/scripts/_00e_mqp03_functions.psc b/source/scripts/_00e_mqp03_functions.psc index e34ec2e3..c9de2ef2 100644 --- a/source/scripts/_00e_mqp03_functions.psc +++ b/source/scripts/_00e_mqp03_functions.psc @@ -36,7 +36,8 @@ Function MovePlayerToStart() _00E_Func_AIWalk.PlayerAIWalkStop() FadeToBlackHoldIMOD.Apply() ForceFirstPerson() - DisablePlayerControls(false, true, true, false, true, false, false, true) + bool bDisableFighting = (SKSE.GetVersion() > 0) + DisablePlayerControls(false, bDisableFighting, true, false, true, false, false, true) PlayerREF.SetAlpha(0.0) PlayerREF.MoveTo(_00E_ClassMenuOrigin) SetCurrentStageID(10)