Moved global class index to a global variable
This commit is contained in:
parent
a1290dbd3b
commit
acef06a364
BIN
Affinity conditions fix.esp
Normal file
BIN
Affinity conditions fix.esp
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
Scriptname _00E_AffinityControl extends ReferenceAlias Hidden Conditional
|
Scriptname _00E_AffinityControl extends ReferenceAlias Conditional
|
||||||
|
|
||||||
; ATTENTION
|
; ATTENTION
|
||||||
; this script contains a new affinity system that requires FS. Therefore, many elements in this script are redundant, as
|
; this script contains a new affinity system that requires FS. Therefore, many elements in this script are redundant, as
|
||||||
@ -192,7 +192,7 @@ Function UpdateClassIndices(Int[] PerkDistribution)
|
|||||||
EndWhile
|
EndWhile
|
||||||
|
|
||||||
UpdateMajorSchool()
|
UpdateMajorSchool()
|
||||||
iMajorClassIndex = MajorClassIndex
|
_00E_MajorClassIndex.SetValue(MajorClassIndex)
|
||||||
|
|
||||||
; Update minor class/perk tree
|
; Update minor class/perk tree
|
||||||
If MinorClassIndex > 0 && (MinorClassIndex == MajorClassIndex || PerkDistribution[MinorClassIndex] == 0)
|
If MinorClassIndex > 0 && (MinorClassIndex == MajorClassIndex || PerkDistribution[MinorClassIndex] == 0)
|
||||||
@ -207,7 +207,7 @@ Function UpdateClassIndices(Int[] PerkDistribution)
|
|||||||
Index += 1
|
Index += 1
|
||||||
EndWhile
|
EndWhile
|
||||||
|
|
||||||
iMinorClassIndex = MinorClassIndex
|
_00E_MinorClassIndex.SetValue(MinorClassIndex)
|
||||||
|
|
||||||
EndFunction
|
EndFunction
|
||||||
|
|
||||||
@ -490,9 +490,6 @@ EndFunction
|
|||||||
; PROPERTIES
|
; PROPERTIES
|
||||||
;=====================================================================================
|
;=====================================================================================
|
||||||
|
|
||||||
int Property iMajorClassIndex Auto Conditional Hidden
|
|
||||||
int Property iMinorClassIndex Auto Conditional Hidden
|
|
||||||
|
|
||||||
int Property MajorClassIndex Auto Hidden
|
int Property MajorClassIndex Auto Hidden
|
||||||
int Property MinorClassIndex Auto Hidden
|
int Property MinorClassIndex Auto Hidden
|
||||||
int Property MajorSchool Auto
|
int Property MajorSchool Auto
|
||||||
@ -669,3 +666,6 @@ Int Affinity_ScourgeOfTheWildsIndex
|
|||||||
Int Affinity_SoulcallerIndex
|
Int Affinity_SoulcallerIndex
|
||||||
|
|
||||||
Bool BlockClassUpdates
|
Bool BlockClassUpdates
|
||||||
|
|
||||||
|
GlobalVariable Property _00E_MajorClassIndex Auto
|
||||||
|
GlobalVariable Property _00E_MinorClassIndex Auto
|
||||||
|
@ -8,32 +8,34 @@ Function ReduceMainSkills()
|
|||||||
|
|
||||||
String sActorValueToReduce01
|
String sActorValueToReduce01
|
||||||
String sActorValueToReduce02
|
String sActorValueToReduce02
|
||||||
|
|
||||||
|
int iClassIndex = _00E_MajorClassIndex.GetValueInt()
|
||||||
|
|
||||||
If AffinityControl.iMajorClassIndex == 1
|
If iClassIndex == 1
|
||||||
sActorValueToReduce01 = "Block"
|
sActorValueToReduce01 = "Block"
|
||||||
sActorValueToReduce02 = "HeavyArmor"
|
sActorValueToReduce02 = "HeavyArmor"
|
||||||
ElseIf AffinityControl.iMajorClassIndex == 2
|
ElseIf iClassIndex == 2
|
||||||
sActorValueToReduce01 = "OneHanded"
|
sActorValueToReduce01 = "OneHanded"
|
||||||
sActorValueToReduce02 = "LightArmor"
|
sActorValueToReduce02 = "LightArmor"
|
||||||
ElseIf AffinityControl.iMajorClassIndex == 3
|
ElseIf iClassIndex == 3
|
||||||
sActorValueToReduce01 = "Destruction"
|
sActorValueToReduce01 = "Destruction"
|
||||||
sActorValueToReduce02 = "Restoration"
|
sActorValueToReduce02 = "Restoration"
|
||||||
ElseIf AffinityControl.iMajorClassIndex == 4
|
ElseIf iClassIndex == 4
|
||||||
sActorValueToReduce01 = "Sneak"
|
sActorValueToReduce01 = "Sneak"
|
||||||
sActorValueToReduce02 = "OneHanded"
|
sActorValueToReduce02 = "OneHanded"
|
||||||
ElseIf AffinityControl.iMajorClassIndex == 5
|
ElseIf iClassIndex == 5
|
||||||
sActorValueToReduce01 = "Conjuration"
|
sActorValueToReduce01 = "Conjuration"
|
||||||
sActorValueToReduce02 = "Illusion"
|
sActorValueToReduce02 = "Illusion"
|
||||||
ElseIf AffinityControl.iMajorClassIndex == 6
|
ElseIf iClassIndex == 6
|
||||||
sActorValueToReduce01 = "Restoration"
|
sActorValueToReduce01 = "Restoration"
|
||||||
sActorValueToReduce02 = "Alteration"
|
sActorValueToReduce02 = "Alteration"
|
||||||
ElseIf AffinityControl.iMajorClassIndex == 7
|
ElseIf iClassIndex == 7
|
||||||
sActorValueToReduce01 = "TwoHanded"
|
sActorValueToReduce01 = "TwoHanded"
|
||||||
sActorValueToReduce02 = "HeavyArmor"
|
sActorValueToReduce02 = "HeavyArmor"
|
||||||
ElseIf AffinityControl.iMajorClassIndex == 8
|
ElseIf iClassIndex == 8
|
||||||
sActorValueToReduce01 = "Marksman"
|
sActorValueToReduce01 = "Marksman"
|
||||||
sActorValueToReduce02 = "LightArmor"
|
sActorValueToReduce02 = "LightArmor"
|
||||||
ElseIf AffinityControl.iMajorClassIndex == 9
|
ElseIf iClassIndex == 9
|
||||||
sActorValueToReduce01 = "LightArmor"
|
sActorValueToReduce01 = "LightArmor"
|
||||||
sActorValueToReduce02 = "Alchemy"
|
sActorValueToReduce02 = "Alchemy"
|
||||||
Else
|
Else
|
||||||
@ -57,10 +59,10 @@ EndFunction
|
|||||||
; PROPERTIES
|
; PROPERTIES
|
||||||
;=====================================================================================
|
;=====================================================================================
|
||||||
|
|
||||||
_00E_AffinityControl Property AffinityControl Auto
|
|
||||||
|
|
||||||
Actor Property PlayerREF Auto
|
Actor Property PlayerREF Auto
|
||||||
|
|
||||||
GlobalVariable Property _00E_IsInJail Auto
|
GlobalVariable Property _00E_IsInJail Auto
|
||||||
|
|
||||||
Message Property _00E_CrimeQuest_ReduceSkillMessage Auto
|
Message Property _00E_CrimeQuest_ReduceSkillMessage Auto
|
||||||
|
|
||||||
|
GlobalVariable Property _00E_MajorClassIndex Auto
|
||||||
|
Loading…
Reference in New Issue
Block a user