Renamed _00E_Game_SkillmenuSC to _00E_AffinityControl
This commit is contained in:
parent
162085c155
commit
dee35927cb
Binary file not shown.
BIN
scripts/_00E_AffinityControl.pex
Normal file
BIN
scripts/_00E_AffinityControl.pex
Normal file
Binary file not shown.
BIN
scripts/_00e_func_getpointsinclass.pex
Normal file
BIN
scripts/_00e_func_getpointsinclass.pex
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
Scriptname _00E_Game_SkillmenuSC extends ReferenceAlias
|
||||
Scriptname _00E_AffinityControl extends ReferenceAlias Hidden
|
||||
;
|
||||
; ATTENTION
|
||||
; this script contains a new affinity system that requires FS. Therefore, many elements in this script are redundant, as
|
||||
@ -138,32 +138,13 @@ Function UpdateMajorSchool()
|
||||
EndIf
|
||||
EndFunction
|
||||
|
||||
int Function GetPointsInClass(Formlist akClassPerkformlist) Global
|
||||
|
||||
Actor PlREF = Game.GetForm(0x14) as Actor
|
||||
Form[] perkForms = akClassPerkformlist.ToArray()
|
||||
int PointsSpentInClass
|
||||
|
||||
int iClassIndex = 0
|
||||
While iClassIndex < perkForms.Length
|
||||
Perk iPerk = perkForms[iClassIndex] as Perk
|
||||
If iPerk && PlREF.HasPerk(iPerk)
|
||||
PointsSpentInClass += 1
|
||||
EndIf
|
||||
iClassIndex += 1
|
||||
EndWhile
|
||||
|
||||
Return PointsSpentInClass
|
||||
|
||||
EndFunction
|
||||
|
||||
Int[] Function GetPerkDistribution()
|
||||
Int[] PerkDistribution = Utility.CreateIntArray(PerkTree_Trees.Length, 0)
|
||||
|
||||
Int Index = 0
|
||||
While Index < PerkTree_Trees.Length
|
||||
If PerkTree_Trees[Index]
|
||||
PerkDistribution[Index] = GetPointsInClass(PerkTree_Trees[Index])
|
||||
PerkDistribution[Index] = _00E_Func_GetPointsInClass.Run(PerkTree_Trees[Index])
|
||||
EndIf
|
||||
Index += 1
|
||||
EndWhile
|
20
source/scripts/_00e_func_getpointsinclass.psc
Normal file
20
source/scripts/_00e_func_getpointsinclass.psc
Normal file
@ -0,0 +1,20 @@
|
||||
Scriptname _00E_Func_GetPointsInClass Hidden
|
||||
|
||||
int Function Run(Formlist akClassPerkformlist) Global
|
||||
|
||||
Actor PlayerREF = Game.GetForm(0x14) as Actor
|
||||
Form[] perkForms = akClassPerkformlist.ToArray()
|
||||
int PointsSpentInClass
|
||||
|
||||
int iClassIndex = 0
|
||||
While iClassIndex < perkForms.Length
|
||||
Perk iPerk = perkForms[iClassIndex] as Perk
|
||||
If iPerk && PlayerREF.HasPerk(iPerk)
|
||||
PointsSpentInClass += 1
|
||||
EndIf
|
||||
iClassIndex += 1
|
||||
EndWhile
|
||||
|
||||
Return PointsSpentInClass
|
||||
|
||||
EndFunction
|
@ -227,4 +227,4 @@ ActorValueInfo AiLockpicking ; Vanilla - Lockpicking
|
||||
ActorValueInfo AiSmithing ; Vanilla - Smithing
|
||||
ActorValueInfo AiSpeechcraft ; Vanilla - Speechcraft
|
||||
|
||||
_00E_Game_SkillmenuSC Property AffinityAlias Auto
|
||||
_00E_AffinityControl Property AffinityAlias Auto
|
||||
|
@ -1041,7 +1041,7 @@ bool Function RequirementsMetMemoryBook(int iTier, Perk Perk01, Perk Perk02, Per
|
||||
ClassFormList03 = ManipulationPerks
|
||||
EndIf
|
||||
|
||||
int iTotalPointsInRequiredClass = (_00E_Game_SkillmenuSC.GetPointsInClass(ClassFormList01) + _00E_Game_SkillmenuSC.GetPointsInClass(ClassFormList02) + _00E_Game_SkillmenuSC.GetPointsInClass(ClassFormList03))
|
||||
int iTotalPointsInRequiredClass = (_00E_Func_GetPointsInClass.Run(ClassFormList01) + _00E_Func_GetPointsInClass.Run(ClassFormList02) + _00E_Func_GetPointsInClass.Run(ClassFormList03))
|
||||
if iTotalPointsInRequiredClass >= iRequiredPoints
|
||||
Return True
|
||||
Else
|
||||
|
Loading…
Reference in New Issue
Block a user