4
Fork 0

Renamed _00E_Game_SkillmenuSC to _00E_AffinityControl

remove-levelsystem
Eddoursul 4 months ago
parent 162085c155
commit dee35927cb
  1. BIN
      Enderal - Forgotten Stories.esm
  2. BIN
      scripts/_00E_AffinityControl.pex
  3. BIN
      scripts/_00e_func_getpointsinclass.pex
  4. BIN
      scripts/_00e_heromenualias.pex
  5. BIN
      scripts/_00e_questfunctions.pex
  6. 23
      source/scripts/_00E_AffinityControl.psc
  7. 20
      source/scripts/_00e_func_getpointsinclass.psc
  8. 2
      source/scripts/_00e_heromenualias.psc
  9. 2
      source/scripts/_00e_questfunctions.psc

Binary file not shown.

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

@ -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…
Cancel
Save