More non-SKSE feature flags

This commit is contained in:
Eddoursul 2024-02-08 07:45:07 +01:00
parent 1a9175d4b7
commit b24010ff81
14 changed files with 65 additions and 12 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -132,7 +132,13 @@ Function UpdateMajorSchool()
EndFunction EndFunction
Int[] Function GetPerkDistribution() 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 Int Index = 0
While Index < PerkTree_Trees.Length While Index < PerkTree_Trees.Length
@ -146,7 +152,13 @@ Int[] Function GetPerkDistribution()
EndFunction EndFunction
Int[] Function GetMaxPerkDistribution() 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 Int Index = 0
While Index < PerkTree_Trees.Length While Index < PerkTree_Trees.Length
@ -196,6 +208,11 @@ Function UpdateClassIndices(Int[] PerkDistribution)
EndFunction EndFunction
Function ResetUnlockedAffinities() Function ResetUnlockedAffinities()
if SKSE.GetVersion() == 0
affinitiesUnlocked = new bool[21]
return
endif
affinitiesUnlocked = Utility.CreateBoolArray(Affinity_Spells.Length, False) 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 ; 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 nTotalUnlockedAffinityCount = 0
Int nSinceLastTimeUnlockedAffinityCount = 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 Int Index = 0
While Index < affinitiesUnlocked.Length While Index < affinitiesUnlocked.Length

View File

@ -56,7 +56,8 @@ EndEvent
Function EnterClassMenu() 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) Player.ForceRefTo(PlayerREF)
Bool isFirstPerson = False Bool isFirstPerson = False
isFirstPerson = PlayerREF.GetAnimationVariableBool("IsFirstPerson") isFirstPerson = PlayerREF.GetAnimationVariableBool("IsFirstPerson")
@ -79,7 +80,7 @@ Function EnterClassMenu()
Wait(0.7) Wait(0.7)
PlayerREF.MoveTo(_00E_ClassMenuOrigin) PlayerREF.MoveTo(_00E_ClassMenuOrigin)
Game.ShowFirstPersonGeometry(False) Game.ShowFirstPersonGeometry(False)
DisablePlayerControls(false, true, true, false, true, false, false, true) DisablePlayerControls(false, bDisableFighting, true, false, true, false, false, true)
ForceFirstPerson() ForceFirstPerson()
EndFunction EndFunction

View File

@ -190,7 +190,7 @@ State RealPlayer
; Level up ; Level up
If iLevelUpsNeeded > 0 If iLevelUpsNeeded > 0
; Level up if not in combat, not in dialogue, activate controls enabled (not in a scene?) and, obviously, not dead ; 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() levelUp()
EndWhile EndWhile
EndIf EndIf

View File

@ -14,6 +14,28 @@ MagicEffect Property effect2 = None Auto
MagicEffect Property effect3 = None Auto MagicEffect Property effect3 = None Auto
Event OnRead() 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] MagicEffect[] effects = new MagicEffect[4]
effects[0] = effect0 effects[0] = effect0
effects[1] = effect1 effects[1] = effect1

View File

@ -18,7 +18,9 @@ EndEvent
Event OnTriggerLeave(ObjectReference akActionRef) Event OnTriggerLeave(ObjectReference akActionRef)
If akActionRef == PlayerREF If akActionRef == PlayerREF
if SKSE.GetVersion()
UnregisterForKey(Input.GetMappedKey("Shout")) UnregisterForKey(Input.GetMappedKey("Shout"))
endif
_00E_A2_GhostwalkSneakFailsave.SetValue(PlayerREF.GetActorValue("Sneak")) _00E_A2_GhostwalkSneakFailsave.SetValue(PlayerREF.GetActorValue("Sneak"))
EndIf EndIf
@ -27,8 +29,10 @@ EndEvent
Event OnTriggerEnter(ObjectReference akActionRef) Event OnTriggerEnter(ObjectReference akActionRef)
If akActionRef == PlayerREF && MQP03.GetCurrentStageID() >= 15 If akActionRef == PlayerREF && MQP03.GetCurrentStageID() >= 15
if SKSE.GetVersion()
iMappedKeyCode = Input.GetMappedKey("Shout") iMappedKeyCode = Input.GetMappedKey("Shout")
RegisterForKey(iMappedKeyCode) RegisterForKey(iMappedKeyCode)
endif
Game.RequestAutoSave() Game.RequestAutoSave()
EndIf EndIf

View File

@ -18,7 +18,8 @@ Event OnTriggerEnter (ObjectReference akActionREF)
PlayerREF.MoveTo(_00E_ClassMenuOrigin) PlayerREF.MoveTo(_00E_ClassMenuOrigin)
Debug.SendAnimationEvent(PlayerRef, "IdleForceDefaultState") Debug.SendAnimationEvent(PlayerRef, "IdleForceDefaultState")
Game.ShowRaceMenu() 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) MQP03.SetCurrentStageID(15)
(MQP02 as _00E_MQP02_Functions).AddRacialAbilites() (MQP02 as _00E_MQP02_Functions).AddRacialAbilites()
else else

View File

@ -36,7 +36,8 @@ Function MovePlayerToStart()
_00E_Func_AIWalk.PlayerAIWalkStop() _00E_Func_AIWalk.PlayerAIWalkStop()
FadeToBlackHoldIMOD.Apply() FadeToBlackHoldIMOD.Apply()
ForceFirstPerson() 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.SetAlpha(0.0)
PlayerREF.MoveTo(_00E_ClassMenuOrigin) PlayerREF.MoveTo(_00E_ClassMenuOrigin)
SetCurrentStageID(10) SetCurrentStageID(10)