Jump to content

Script Editing


CarlBar

Recommended Posts

I am not sure of the correct syntax for using - and + on multiline elements. But, having the - or + on the continuation lines (the ones after the backslash) "looks wrong". Before you try adding anything, just try removing something first. Change it so that you don't have any pluses, and the only place you have minuses is just before the SoldierRank word, and try only deleting the top two ranks. Do the abilities go away?

Link to comment
Share on other sites

Ok when i did that i got some weirdness, abilities not removed appeared duplicated, and not all where removed. Screenshot included.

 

http://i.imgur.com/TPOf9ON.jpg

 

 

I'm going to go away and try somthing else while you mull on that. But thanks for telling me about the purposes of backslash there, never encountered code like that before, it's always been either it doesn't care about lines, or everything on one line has to be physically on that line.

 

the code that produced the above for clarity.

 

 

 

[Sharpshooter X2SoldierClassTemplate]
; squaddie
;SoldierRanks=(  aAbilityTree=( (AbilityName="PistolStandardShot",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon), \\
; (AbilityName="Squadsight") \\
;  ), \\
; aStatProgression=((StatType=eStat_Offense,StatAmount=10), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=1)),\\
; )
; corporal
-SoldierRanks=(  aAbilityTree=( (AbilityName="LongWatch", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon), \\
(AbilityName="ReturnFire", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon) \\
), \\   
aStatProgression=((StatType=eStat_Offense,StatAmount=4), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),\\
)
; sergeant
-SoldierRanks=(  aAbilityTree=( (AbilityName="Deadeye", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon), \\
(AbilityName="LightningHands", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon) \\
), \\
aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),\\
)
; lieutenant
;-SoldierRanks=( aAbilityTree=( (AbilityName="DeathFromAbove", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon), \\
;- (AbilityName="Quickdraw") \\
;- ), \\
;-    aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),\\
;- )
; captain
-SoldierRanks=( aAbilityTree=( (AbilityName="KillZone", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon), \\
(AbilityName="Faceoff", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon) \\
), \\
aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),\\
)
; major
;-SoldierRanks=( aAbilityTree=( (AbilityName="SteadyHands"), \\
;- (AbilityName="SharpshooterAim", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon) \\ 
;- ), \\
;-    aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),\\
;- )
; colonel
-SoldierRanks=( aAbilityTree=( (AbilityName="InTheZone", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon), \\
(AbilityName="FanFire", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon) \\
), \\
  aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),\\
)
 
; squaddie
;+SoldierRanks=(  aAbilityTree=( (AbilityName="PistolStandardShot",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon), \\
;+ (AbilityName="Squadsight") \\
;+  ), \\
;+ aStatProgression=((StatType=eStat_Offense,StatAmount=10), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=1)),\\
;+ )
; corporal
;+SoldierRanks=(  aAbilityTree=( (AbilityName="LongWatch", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon), \\
; (AbilityName="ReturnFireRebalance", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon) \\
;  ), \\   
; aStatProgression=((StatType=eStat_Offense,StatAmount=4), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),\\
; )
; sergeant
;+SoldierRanks=(  aAbilityTree=( (AbilityName="Deadeye", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon), \\
; (AbilityName="LightningHandsRebalance", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon) \\
;  ), \\
; aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),\\
; )
; lieutenant
;+SoldierRanks=( aAbilityTree=( (AbilityName="DeathFromAbove", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon), \\
;+ (AbilityName="Quickdraw") \\
;+ ), \\
;+    aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),\\
;+ )
; captain
;+SoldierRanks=( aAbilityTree=( (AbilityName="KillZone", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon), \\
; (AbilityName="FaceoffRebalance", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon) \\
; ), \\
; aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),\\
; )
; major
;+SoldierRanks=( aAbilityTree=( (AbilityName="SteadyHands"), \\
;+ (AbilityName="SharpshooterAim", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon) \\ 
;+ ), \\
;+    aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),\\
;+ )
; colonel
;+SoldierRanks=( aAbilityTree=( (AbilityName="InTheZone", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon), \\
; (AbilityName="FanFireRebalance", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon) \\
; ), \\
;    aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),\\
; )

 

 

 

EDIT: Attempting to compress the code onto one physical line by collecting it together and removing the backslashes didn't work either :sad:. The result was it acted like the code wasn't there.

Edited by CarlBar
Link to comment
Share on other sites

It seems like your issue might be that you've kept the default Sharpshooter level progression definition intact and just added your desired level progression after it. That may be trying to input multiple values into the template where it's only expecting one. Have you tried building your config file to have only your abilities (deleting the first squaddie through colonel definitions in your class template)? To be fair, while I'd like to do some of this as well, I'm not even this far into modding, so I'm just going from what I think sounds logical and could be completely off base.

Link to comment
Share on other sites

I've had a lot of trouble getting - to work with multiline arrays like the MissionSchedules or ConfigurableEncounters in missions.ini. If you use a ! instead of - it will wipe out every single definition of the array, so you are completely clearing them that's one way to go. But I can't reliably use - and i'm not sure why.

Edited by Quaro
Link to comment
Share on other sites

Got it. It's both painfully simple and silly annoying.

 

First go to your "my documents/XCOM2" folder and then navigate from there to the copy of the configs stored there. The DefaultClass file there has the relevant code in single line formatting, (i'll post the complete file below anyway for people to use in case i'm lucky in mine having not updated). A bit of experimentation, (and a degree of DOH!), led me to realise it reads rank data in the order it finds the lines as it does not have any info on the slot it occupies rank wise. Which means it's an "as is" setup. That is it reads the lines in order. First line becomes the class promotion, second is first tier, (so Corporal rank), ability choice, third is second tier, (so Sergeant rank) choice, and so on and so forth. I also suspect this explains why i was seeing duplicates before. If there are insufficient entries it goes back to the start of the sequence and repeats. But thats an educated guess based on what i saw.

 

Thus if you want to edit this you have to tell it to remove the line/s you want removed and every line below it whichever line your removing that is furthest up the list.

 

Here is the code that actually worked, (i haven't confirmed fan fire but i'm pretty sure it works since all the others did):

[Sharpshooter X2SoldierClassTemplate]
-SoldierRanks=(  aAbilityTree=(	(AbilityName="PistolStandardShot",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),             (AbilityName="Squadsight")             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=10), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=1)),       )
-SoldierRanks=(  aAbilityTree=(	(AbilityName="LongWatch", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="ReturnFire", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),     aStatProgression=((StatType=eStat_Offense,StatAmount=4), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
-SoldierRanks=(  aAbilityTree=(	(AbilityName="Deadeye", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="LightningHands", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
-SoldierRanks=( aAbilityTree=(	(AbilityName="DeathFromAbove", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="Quickdraw")            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
-SoldierRanks=( aAbilityTree=(	(AbilityName="KillZone", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="Faceoff", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),         aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
-SoldierRanks=( aAbilityTree=(	(AbilityName="SteadyHands"),             (AbilityName="SharpshooterAim", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)     ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
-SoldierRanks=( aAbilityTree=(	(AbilityName="InTheZone", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="FanFire", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )

+SoldierRanks=(  aAbilityTree=(	(AbilityName="PistolStandardShot",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),             (AbilityName="Squadsight")             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=10), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=1)),       )
+SoldierRanks=(  aAbilityTree=(	(AbilityName="LongWatch", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="ReturnFireRebalance", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),     aStatProgression=((StatType=eStat_Offense,StatAmount=4), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
+SoldierRanks=(  aAbilityTree=(	(AbilityName="Deadeye", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="LightningHandsRebalance", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
+SoldierRanks=( aAbilityTree=(	(AbilityName="DeathFromAbove", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="Quickdraw")            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
+SoldierRanks=( aAbilityTree=(	(AbilityName="KillZone", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="FaceoffRebalance", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),         aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
+SoldierRanks=( aAbilityTree=(	(AbilityName="SteadyHands"),             (AbilityName="SharpshooterAim", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)     ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
+SoldierRanks=( aAbilityTree=(	(AbilityName="InTheZone", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="FanFireRebalance", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )

Also here's the class file i promised:

 

 

 

[XComGame.X2SoldierClassTemplateManager]
DefaultSoldierClass=Rookie
NickNameRank=3
ExtraCrossClassAbilities=(AbilityName="LightningReflexes")
GlobalStatProgression=(StatType=eStat_Will,StatAmount=4,RandStatAmount=9,CapStatAmount=100)

[XComGame.X2SoldierClass_DefaultClasses]
SoldierClasses=Rookie
SoldierClasses=Ranger
SoldierClasses=Sharpshooter
SoldierClasses=Grenadier
SoldierClasses=Specialist
SoldierClasses=PsiOperative
SoldierClasses=MP_Ranger
SoldierClasses=MP_Sharpshooter
SoldierClasses=MP_Grenadier
SoldierClasses=MP_Specialist
SoldierClasses=MP_PsiOperative

[Rookie X2SoldierClassTemplate]
ClassPoints=1
IconImage=img:///UILibrary_Common.class_rookie
AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="rifle")
KillAssistsPerKill=4

[Ranger X2SoldierClassTemplate]
bMultiplayerOnly=0
ClassPoints=4
IconImage=img:///UILibrary_Common.class_ranger
NumInForcedDeck=1
NumInDeck=4
KillAssistsPerKill=4
SquaddieLoadout=SquaddieRanger
AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="shotgun")
AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="rifle")
AllowedWeapons=(SlotType=eInvSlot_SecondaryWeapon, WeaponType="sword")
SoldierRanks=(	aAbilityTree=(	(AbilityName="SwordSlice", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=1)),       )
SoldierRanks=(  aAbilityTree=(	(AbilityName="Phantom"),             (AbilityName="Blademaster", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),     aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=(  aAbilityTree=(	(AbilityName="Shadowstrike", ApplyToWeaponSlot=eInvSlot_Unknown),             (AbilityName="Shadowstep", ApplyToWeaponSlot=eInvSlot_Unknown)             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=(  aAbilityTree=(	(AbilityName="Stealth"),             (AbilityName="RunAndGun")             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=(  aAbilityTree=(	(AbilityName="Implacable"),		            (AbilityName="Bladestorm", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=(  aAbilityTree=(	(AbilityName="DeepCover"),             (AbilityName="Untouchable")             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(	(AbilityName="RapidFire", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),                                     (AbilityName="Reaper", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)                                 ),         aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )

[Sharpshooter X2SoldierClassTemplate]
bMultiplayerOnly=0
ClassPoints=5
IconImage=img:///UILibrary_Common.class_sharpshooter
NumInForcedDeck=1
NumInDeck=4
KillAssistsPerKill=5
SquaddieLoadout=SquaddieSharpshooter
AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="sniper_rifle")
AllowedWeapons=(SlotType=eInvSlot_SecondaryWeapon, WeaponType="pistol")
SoldierRanks=(  aAbilityTree=(	(AbilityName="PistolStandardShot",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),             (AbilityName="Squadsight")             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=10), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=1)),       )
SoldierRanks=(  aAbilityTree=(	(AbilityName="LongWatch", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="ReturnFire", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),     aStatProgression=((StatType=eStat_Offense,StatAmount=4), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=(  aAbilityTree=(	(AbilityName="Deadeye", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="LightningHands", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(	(AbilityName="DeathFromAbove", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="Quickdraw")            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(	(AbilityName="KillZone", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="Faceoff", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),         aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(	(AbilityName="SteadyHands"),             (AbilityName="SharpshooterAim", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)     ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(	(AbilityName="InTheZone", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="FanFire", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )

[Grenadier X2SoldierClassTemplate]
bMultiplayerOnly=0
ClassPoints=6
IconImage=img:///UILibrary_Common.class_grenadier
NumInForcedDeck=1
NumInDeck=4
KillAssistsPerKill=5
SquaddieLoadout=SquaddieGrenadier
AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="cannon")
AllowedWeapons=(SlotType=eInvSlot_SecondaryWeapon, WeaponType="grenade_launcher")
SoldierRanks=(  aAbilityTree=( (),	(AbilityName="LaunchGrenade",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=1)),       )
SoldierRanks=(  aAbilityTree=(	(AbilityName="BlastPadding",  ApplyToWeaponSlot=eInvSlot_Unknown),             (AbilityName="Shredder",  ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)            ),     aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=(  aAbilityTree=(	(AbilityName="Demolition", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="Suppression",  ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)            ),         aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(	(AbilityName="HeavyOrdnance",  ApplyToWeaponSlot=eInvSlot_Unknown),             (AbilityName="HoloTargeting",  ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)            ),     aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(	(AbilityName="VolatileMix",  ApplyToWeaponSlot=eInvSlot_Unknown),             (AbilityName="ChainShot",  ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)            ),     aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(	(AbilityName="Salvo",  ApplyToWeaponSlot=eInvSlot_Unknown),             (AbilityName="HailOfBullets",  ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)            ),     aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(	(AbilityName="SaturationFire",  ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="BulletShred", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )

[Specialist X2SoldierClassTemplate]
bMultiplayerOnly=0
ClassPoints=3
IconImage=img:///UILibrary_Common.class_specialist
NumInForcedDeck=1
NumInDeck=4
KillAssistsPerKill=3
SquaddieLoadout=SquaddieSpecialist
AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="rifle")
AllowedWeapons=(SlotType=eInvSlot_SecondaryWeapon, WeaponType="gremlin")
SoldierRanks=(  aAbilityTree=( (AbilityName="IntrusionProtocol", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),                                    (AbilityName="AidProtocol", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)              ),          aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=45), (StatType=eStat_CombatSims,StatAmount=1)),        )
SoldierRanks=(  aAbilityTree=( (AbilityName="MedicalProtocol",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),             (AbilityName="CombatProtocol",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),         )
SoldierRanks=( aAbilityTree=( (AbilityName="RevivalProtocol",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),              (AbilityName="HaywireProtocol",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=( (AbilityName="FieldMedic",  ApplyToWeaponSlot=eInvSlot_Unknown),              (AbilityName="ScanningProtocol",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=( (AbilityName="CoveringFire",  ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),              (AbilityName="ThreatAssessment",  ApplyToWeaponSlot=eInvSlot_Unknown)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=( (AbilityName="EverVigilant",  ApplyToWeaponSlot=eInvSlot_Unknown),              (AbilityName="Sentinel",  ApplyToWeaponSlot=eInvSlot_Unknown)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=( (AbilityName="RestorativeMist",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),              (AbilityName="CapacitorDischarge",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )

[PsiOperative X2SoldierClassTemplate]
bMultiplayerOnly=0
ClassPoints=3
IconImage=img:///UILibrary_Common.class_psiop
NumInForcedDeck=0
NumInDeck=0
KillAssistsPerKill=3
PsiCreditsPerKill=3
SquaddieLoadout=SquaddiePsiOperative
AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="rifle")
AllowedWeapons=(SlotType=eInvSlot_SecondaryWeapon, WeaponType="psiamp")
SoldierRanks=(  aAbilityTree=(	(AbilityName="Soulfire",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),             (AbilityName="Stasis",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_PsiOffense,StatAmount=50), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=1)),        )
SoldierRanks=(  aAbilityTree=(  (AbilityName="Insanity",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),             (AbilityName="Inspire",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)                                  ),         aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_PsiOffense,StatAmount=4,RandStatAmount=9,CapStatAmount=100), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),        )
SoldierRanks=(  aAbilityTree=(  (AbilityName="SoulSteal",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),             (AbilityName="StasisShield",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)                                  ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_PsiOffense,StatAmount=4,RandStatAmount=9,CapStatAmount=100), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=(  aAbilityTree=(  (AbilityName="Solace",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),             (AbilityName="Sustain",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)                                  ),         aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_PsiOffense,StatAmount=4,RandStatAmount=9,CapStatAmount=100), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(  (AbilityName="Schism",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),               (AbilityName="Fortress",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)                                  ),         aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_PsiOffense,StatAmount=4,RandStatAmount=9,CapStatAmount=100), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=(  aAbilityTree=( (AbilityName="Fuse",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),               (AbilityName="Domination",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)                                  ),         aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_PsiOffense,StatAmount=4,RandStatAmount=9,CapStatAmount=100), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=( (AbilityName="NullLance",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),              (AbilityName="VoidRift",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)                                  ),           aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_PsiOffense,StatAmount=4,RandStatAmount=9,CapStatAmount=100), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )

[MP_Ranger X2SoldierClassTemplate]
bMultiplayerOnly=1
ClassPoints=4
IconImage=img:///UILibrary_Common.class_ranger
NumInForcedDeck=0
NumInDeck=0
KillAssistsPerKill=4
SquaddieLoadout=SquaddieRanger
AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="shotgun")
AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="rifle")
AllowedWeapons=(SlotType=eInvSlot_SecondaryWeapon, WeaponType="sword")
SoldierRanks=(	aAbilityTree=(	(AbilityName="SwordSlice", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=1)),       )
SoldierRanks=(  aAbilityTree=(	(AbilityName="Phantom"),             (AbilityName="Blademaster", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),     aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=(  aAbilityTree=(	(AbilityName="Shadowstrike", ApplyToWeaponSlot=eInvSlot_Unknown),             (AbilityName="Shadowstep", ApplyToWeaponSlot=eInvSlot_Unknown)             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=(  aAbilityTree=(	(AbilityName="Stealth"),             (AbilityName="RunAndGun")             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=(  aAbilityTree=(	(AbilityName="Implacable"),		            (AbilityName="Bladestorm", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=(  aAbilityTree=(	(AbilityName="DeepCover"),             (AbilityName="Untouchable")             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(	(AbilityName="RapidFire", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),                                     (AbilityName="Reaper", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)                                 ),         aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )

[MP_Sharpshooter X2SoldierClassTemplate]
bMultiplayerOnly=1
ClassPoints=5
IconImage=img:///UILibrary_Common.class_sharpshooter
NumInForcedDeck=0
NumInDeck=0
KillAssistsPerKill=5
SquaddieLoadout=SquaddieSharpshooter
AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="sniper_rifle")
AllowedWeapons=(SlotType=eInvSlot_SecondaryWeapon, WeaponType="pistol")
SoldierRanks=(  aAbilityTree=(	(AbilityName="PistolStandardShot",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),             (AbilityName="Squadsight")             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=10), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=1)),       )
SoldierRanks=(  aAbilityTree=(	(AbilityName="LongWatch", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="ReturnFire", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),     aStatProgression=((StatType=eStat_Offense,StatAmount=4), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=(  aAbilityTree=(	(AbilityName="Deadeye", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="LightningHands", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(	(AbilityName="DeathFromAbove", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="Quickdraw")            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(	(AbilityName="KillZone", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="Faceoff", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),         aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(	(AbilityName="SteadyHands"),             (AbilityName="SharpshooterAim", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)     ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(	(AbilityName="InTheZone", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="FanFire", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )

[MP_Grenadier X2SoldierClassTemplate]
bMultiplayerOnly=1
ClassPoints=6
IconImage=img:///UILibrary_Common.class_grenadier
NumInForcedDeck=0
NumInDeck=0
KillAssistsPerKill=5
SquaddieLoadout=SquaddieGrenadier
AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="cannon")
AllowedWeapons=(SlotType=eInvSlot_SecondaryWeapon, WeaponType="grenade_launcher")
SoldierRanks=(  aAbilityTree=( (),	(AbilityName="LaunchGrenade",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=1)),       )
SoldierRanks=(  aAbilityTree=(	(AbilityName="BlastPadding",  ApplyToWeaponSlot=eInvSlot_Unknown),             (AbilityName="Shredder",  ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)            ),     aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=(  aAbilityTree=(	(AbilityName="Demolition", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="Suppression",  ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)            ),         aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(	(AbilityName="HeavyOrdnance",  ApplyToWeaponSlot=eInvSlot_Unknown),             (AbilityName="HoloTargeting",  ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)            ),     aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(	(AbilityName="VolatileMix",  ApplyToWeaponSlot=eInvSlot_Unknown),             (AbilityName="ChainShot",  ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)            ),     aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(	(AbilityName="Salvo",  ApplyToWeaponSlot=eInvSlot_Unknown),             (AbilityName="HailOfBullets",  ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)            ),     aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(	(AbilityName="SaturationFire",  ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),             (AbilityName="BulletShred", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )

[MP_Specialist X2SoldierClassTemplate]
bMultiplayerOnly=1
ClassPoints=3
IconImage=img:///UILibrary_Common.class_specialist
NumInForcedDeck=0
NumInDeck=0
KillAssistsPerKill=3
SquaddieLoadout=SquaddieSpecialist
AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="rifle")
AllowedWeapons=(SlotType=eInvSlot_SecondaryWeapon, WeaponType="gremlin")
SoldierRanks=(  aAbilityTree=( (AbilityName="IntrusionProtocol", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),                                    (AbilityName="AidProtocol", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)              ),          aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=45), (StatType=eStat_CombatSims,StatAmount=1)),        )
SoldierRanks=(  aAbilityTree=( (AbilityName="MedicalProtocol",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),             (AbilityName="CombatProtocol",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),         )
SoldierRanks=( aAbilityTree=( (AbilityName="RevivalProtocol",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),              (AbilityName="HaywireProtocol",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=3), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=( (AbilityName="FieldMedic",  ApplyToWeaponSlot=eInvSlot_Unknown),              (AbilityName="ScanningProtocol",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=( (AbilityName="CoveringFire",  ApplyToWeaponSlot=eInvSlot_PrimaryWeapon),              (AbilityName="ThreatAssessment",  ApplyToWeaponSlot=eInvSlot_Unknown)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=( (AbilityName="EverVigilant",  ApplyToWeaponSlot=eInvSlot_Unknown),              (AbilityName="Sentinel",  ApplyToWeaponSlot=eInvSlot_Unknown)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=( (AbilityName="RestorativeMist",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),              (AbilityName="CapacitorDischarge",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)            ),           aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )

[MP_PsiOperative X2SoldierClassTemplate]
bMultiplayerOnly=1
ClassPoints=3
IconImage=img:///UILibrary_Common.class_psiop
NumInForcedDeck=0
NumInDeck=0
KillAssistsPerKill=3
PsiCreditsPerKill=3
SquaddieLoadout=SquaddiePsiOperative
AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="rifle")
AllowedWeapons=(SlotType=eInvSlot_SecondaryWeapon, WeaponType="psiamp")
SoldierRanks=(  aAbilityTree=(	(AbilityName="Soulfire",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),             (AbilityName="Stasis",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)             ),         aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_PsiOffense,StatAmount=50), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=1)),        )
SoldierRanks=(  aAbilityTree=(  (AbilityName="Insanity",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),             (AbilityName="Inspire",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)                                  ),         aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_PsiOffense,StatAmount=4,RandStatAmount=9,CapStatAmount=100), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),        )
SoldierRanks=(  aAbilityTree=(  (AbilityName="SoulSteal",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),             (AbilityName="StasisShield",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)                                  ),           aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_PsiOffense,StatAmount=4,RandStatAmount=9,CapStatAmount=100), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=(  aAbilityTree=(  (AbilityName="Solace",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),             (AbilityName="Sustain",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)                                  ),         aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_PsiOffense,StatAmount=4,RandStatAmount=9,CapStatAmount=100), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=(  (AbilityName="Schism",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),               (AbilityName="Fortress",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)                                  ),         aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_PsiOffense,StatAmount=4,RandStatAmount=9,CapStatAmount=100), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=(  aAbilityTree=( (AbilityName="Fuse",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),               (AbilityName="PsiOperativeMindControl",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)                                  ),         aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=0), (StatType=eStat_PsiOffense,StatAmount=4,RandStatAmount=9,CapStatAmount=100), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),       )
SoldierRanks=( aAbilityTree=( (AbilityName="NullLance",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon),              (AbilityName="VoidRift",  ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)                                  ),           aStatProgression=((StatType=eStat_Offense,StatAmount=1), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_PsiOffense,StatAmount=4,RandStatAmount=9,CapStatAmount=100), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)),          )

[IniVersion]
0=1455309410.000000
 

 

 

 

 

 

I am having a few issues still related to my new script code not quite doing what i want, but i want to try and fix that myself, (i think i know how to workaround it it even if i'm not sure why it's doing what it is), if i need help i'll come post again :smile:.

Edited by CarlBar
Link to comment
Share on other sites

That is great. It does seem that you want to wipe out all the SoldierRank lines in the section. So like Quaro suggested, instead of the long lines with - you could try one short line with ! like this:

 

[Sharpshooter X2SoldierClassTemplate]

!SoldierRanks

+SoldierRanks={ ... your + lines here }

 

This will also be a little safer, in case a new game update makes a tiny change in the existing lines, such as even adding a space. I believe that will make - have no effect since it is no longer an *exact* match to your text.

Link to comment
Share on other sites

Ok i do need the help. Sorry for the constant stream of bugging you. Having the dreaded man flu is not helping my brain work either :(.

 

I've now got my new abilities in game. The full new script file is below:

 

 

 

//---------------------------------------------------------------------------------------//  FILE:    X2Ability_SharpshooterAbilitySetRebalance.uc
//  AUTHOR:  Joshua Bouscher
//  DATE:    15 Jul 2014
//  PURPOSE: Defines abilities used by the Sharpshooter class.
//           
//---------------------------------------------------------------------------------------
//  Copyright (c) 2016 Firaxis Games, Inc. All rights reserved.
//---------------------------------------------------------------------------------------
class X2Ability_SharpshooterAbilitySetRebalance extends X2Ability
config(GameData_SoldierSkills);


var config int FACEOFF_COOLDOWN;
var config int FANFIRE_COOLDOWN;




static function array<X2DataTemplate> CreateTemplates()
{
local array<X2DataTemplate> Templates;


Templates.AddItem(ReturnFireRebalance());
Templates.AddItem(FanFireRebalance());
Templates.AddItem(LightningHandsRebalance());
Templates.AddItem(FaceoffRebalance());


return Templates;
}


static function X2AbilityTemplate ReturnFireRebalance()
{
local X2AbilityTemplate Template;
local X2AbilityTargetStyle                  TargetStyle;
local X2AbilityTrigger Trigger;
local X2Effect_ReturnFireRebalance FireEffect;


`CREATE_X2ABILITY_TEMPLATE(Template, 'ReturnFireRebalance');
Template.IconImage = "img:///UILibrary_PerkIcons.UIPerk_returnfire";


Template.AbilitySourceName = 'eAbilitySource_Perk';
Template.eAbilityIconBehaviorHUD = EAbilityIconBehavior_NeverShow;
Template.Hostility = eHostility_Neutral;


Template.AbilityToHitCalc = default.DeadEye;


TargetStyle = new class'X2AbilityTarget_Self';
Template.AbilityTargetStyle = TargetStyle;


Trigger = new class'X2AbilityTrigger_UnitPostBeginPlay';
Template.AbilityTriggers.AddItem(Trigger);


FireEffect = new class'X2Effect_ReturnFireRebalance';
FireEffect.BuildPersistentEffect(1, true, false, false, eGameRule_PlayerTurnBegin);
FireEffect.SetDisplayInfo(ePerkBuff_Passive, Template.LocFriendlyName, Template.GetMyLongDescription(), Template.IconImage,,,Template.AbilitySourceName);
Template.AddTargetEffect(FireEffect);


Template.BuildNewGameStateFn = TypicalAbility_BuildGameState;
//  NOTE: No visualization on purpose!


Template.bCrossClassEligible = false;       //  this can only work with pistols, which only sharpshooters have


return Template;
}


static function X2AbilityTemplate FanFireRebalance()
{
local X2AbilityTemplate                 Template; 
local X2AbilityCost_Ammo                AmmoCost;
local X2Effect_ApplyWeaponDamage        WeaponDamageEffect;
local X2AbilityMultiTarget_BurstFire    BurstFireMultiTarget;
local X2AbilityCooldown                 Cooldown;
local X2AbilityToHitCalc_StandardAim    ToHitCalc;


// Macro to do localisation and stuffs
`CREATE_X2ABILITY_TEMPLATE(Template, 'FanFireRebalance');


// Icon Properties
Template.IconImage = "img:///UILibrary_PerkIcons.UIPerk_fanfire";
Template.ShotHUDPriority = class'UIUtilities_Tactical'.const.CLASS_LIEUTENANT_PRIORITY;
Template.eAbilityIconBehaviorHUD = eAbilityIconBehavior_AlwaysShow;
Template.DisplayTargetHitChance = true;
Template.AbilitySourceName = 'eAbilitySource_Perk';                                       // color of the icon
Template.AbilityConfirmSound = "TacticalUI_ActivateAbility";


// Activated by a button press; additionally, tells the AI this is an activatable
Template.AbilityTriggers.AddItem(default.PlayerInputTrigger);


// *** VALIDITY CHECKS *** //
Template.AddShooterEffectExclusions();


// Targeting Details
// Can only shoot visible enemies
Template.AbilityTargetConditions.AddItem(default.GameplayVisibilityCondition);
// Can't target dead; Can't target friendlies
Template.AbilityTargetConditions.AddItem(default.LivingHostileTargetProperty);
// Can't shoot while dead
Template.AbilityShooterConditions.AddItem(default.LivingShooterProperty);
// Only at single targets that are in range.
Template.AbilityTargetStyle = default.SimpleSingleTarget;


Cooldown = new class'X2AbilityCooldown';
Cooldown.iNumTurns = default.FANFIRE_COOLDOWN;
Template.AbilityCooldown = Cooldown;


// Ammo
AmmoCost = new class'X2AbilityCost_Ammo'; 
AmmoCost.iAmmo = 1;
Template.AbilityCosts.AddItem(AmmoCost);
Template.bAllowAmmoEffects = true; //  


// Weapon Upgrade Compatibility
Template.bAllowFreeFireWeaponUpgrade = true;                                            // Flag that permits action to become 'free action' via 'Hair Trigger' or similar upgrade / effects


// Damage Effect
WeaponDamageEffect = new class'X2Effect_ApplyWeaponDamage';
Template.AddTargetEffect(WeaponDamageEffect);
Template.AddMultiTargetEffect(WeaponDamageEffect);


ToHitCalc = new class'X2AbilityToHitCalc_StandardAim';
Template.AbilityToHitCalc = ToHitCalc;
Template.AbilityToHitOwnerOnMissCalc = ToHitCalc;


BurstFireMultiTarget = new class'X2AbilityMultiTarget_BurstFire';
BurstFireMultiTarget.NumExtraShots = 2;
Template.AbilityMultiTargetStyle = BurstFireMultiTarget;


// Targeting Method
Template.TargetingMethod = class'X2TargetingMethod_OverTheShoulder';
Template.CinescriptCameraType = "StandardGunFiring";


// Voice events
Template.ActivationSpeech = 'FanFire';


// MAKE IT LIVE!
Template.BuildNewGameStateFn = TypicalAbility_BuildGameState;
Template.BuildVisualizationFn = TypicalAbility_BuildVisualization; 


return Template; 
}


static function X2AbilityTemplate LightningHandsRebalance()
{
local X2AbilityTemplate                 Template;
local X2AbilityCost_Ammo                AmmoCost;
local X2Effect_ApplyWeaponDamage        WeaponDamageEffect;
local array<name>                       SkipExclusions;
local X2AbilityCooldown Cooldown;


`CREATE_X2ABILITY_TEMPLATE(Template, 'LightningHandsRebalance');


// Icon Properties
Template.IconImage = "img:///UILibrary_PerkIcons.UIPerk_lightninghands";
Template.ShotHUDPriority = class'UIUtilities_Tactical'.const.CLASS_MAJOR_PRIORITY;
Template.eAbilityIconBehaviorHUD = eAbilityIconBehavior_AlwaysShow;
Template.DisplayTargetHitChance = true;
Template.AbilitySourceName = 'eAbilitySource_Perk';
Template.AbilityConfirmSound = "TacticalUI_ActivateAbility";


// Activated by a button press; additionally, tells the AI this is an activatable
Template.AbilityTriggers.AddItem(default.PlayerInputTrigger);


Cooldown = new class'X2AbilityCooldown';
Cooldown.iNumTurns = 1;
Template.AbilityCooldown = Cooldown;


// *** VALIDITY CHECKS *** //
//  Normal effect restrictions (except disoriented)
SkipExclusions.AddItem(class'X2AbilityTemplateManager'.default.DisorientedName);
Template.AddShooterEffectExclusions(SkipExclusions);


// Targeting Details
// Can only shoot visible enemies
Template.AbilityTargetConditions.AddItem(default.GameplayVisibilityCondition);
// Can't target dead; Can't target friendlies
Template.AbilityTargetConditions.AddItem(default.LivingHostileTargetProperty);
// Can't shoot while dead
Template.AbilityShooterConditions.AddItem(default.LivingShooterProperty);
// Only at single targets that are in range.
Template.AbilityTargetStyle = default.SimpleSingleTarget;


// Ammo
AmmoCost = new class'X2AbilityCost_Ammo';
AmmoCost.iAmmo = 1;
Template.AbilityCosts.AddItem(AmmoCost);
Template.bAllowAmmoEffects = true; //  


Template.AbilityCosts.AddItem(default.FreeActionCost);


// Damage Effect
WeaponDamageEffect = new class'X2Effect_ApplyWeaponDamage';
Template.AddTargetEffect(WeaponDamageEffect);


// Hit Calculation (Different weapons now have different calculations for range)
Template.AbilityToHitCalc = default.SimpleStandardAim;
Template.AbilityToHitOwnerOnMissCalc = default.SimpleStandardAim;


// Targeting Method
Template.TargetingMethod = class'X2TargetingMethod_OverTheShoulder';
Template.bUsesFiringCamera = true;
Template.CinescriptCameraType = "StandardGunFiring";


// MAKE IT LIVE!
Template.BuildNewGameStateFn = TypicalAbility_BuildGameState;
Template.BuildVisualizationFn = TypicalAbility_BuildVisualization;
return Template;
}


static function X2AbilityTemplate FaceoffRebalance()
{
local X2AbilityTemplate                 Template;
local X2AbilityCooldown                 Cooldown;
local X2AbilityToHitCalc_StandardAim    ToHitCalc;


`CREATE_X2ABILITY_TEMPLATE(Template, 'FaceoffRebalance');


Template.IconImage = "img:///UILibrary_PerkIcons.UIPerk_faceoff";
Template.AbilitySourceName = 'eAbilitySource_Perk';
Template.eAbilityIconBehaviorHUD = eAbilityIconBehavior_AlwaysShow;
Template.Hostility = eHostility_Offensive;
Template.ShotHUDPriority = class'UIUtilities_Tactical'.const.CLASS_COLONEL_PRIORITY;
Template.AbilityConfirmSound = "TacticalUI_ActivateAbility";


Cooldown = new class'X2AbilityCooldown';
Cooldown.iNumTurns = default.FACEOFF_COOLDOWN;
Template.AbilityCooldown = Cooldown;


ToHitCalc = new class'X2AbilityToHitCalc_StandardAim';
ToHitCalc.bOnlyMultiHitWithSuccess = false;
Template.AbilityToHitCalc = ToHitCalc;


Template.AbilityTargetStyle = default.SimpleSingleTarget;
Template.AbilityMultiTargetStyle = new class'X2AbilityMultiTarget_AllAllies';
Template.AbilityTriggers.AddItem(default.PlayerInputTrigger);


Template.AbilityShooterConditions.AddItem(default.LivingShooterProperty);
Template.AddShooterEffectExclusions();


Template.AbilityTargetConditions.AddItem(default.GameplayVisibilityCondition);
Template.AbilityTargetConditions.AddItem(default.LivingHostileTargetProperty);


Template.AddTargetEffect(new class'X2Effect_ApplyWeaponDamage');
Template.AddMultiTargetEffect(new class'X2Effect_ApplyWeaponDamage');


Template.bAllowAmmoEffects = true;


Template.BuildNewGameStateFn = TypicalAbility_BuildGameState;
Template.BuildVisualizationFn = Faceoff_BuildVisualization;


return Template;
}


function Faceoff_BuildVisualization(XComGameState VisualizeGameState, out array<VisualizationTrack> OutVisualizationTracks)
{
local X2AbilityTemplate             AbilityTemplate;
local XComGameStateContext_Ability  Context;
local AbilityInputContext           AbilityContext;
local StateObjectReference          ShootingUnitRef; 
local X2Action_Fire                 FireAction;
local X2Action_Fire_Faceoff         FireFaceoffAction;
local XComGameState_BaseObject      TargetStateObject;//Container for state objects within VisualizeGameState 


local Actor                     TargetVisualizer, ShooterVisualizer;
local X2VisualizerInterface     TargetVisualizerInterface;
local int                       EffectIndex, TargetIndex;


local VisualizationTrack        EmptyTrack;
local VisualizationTrack        BuildTrack;
local VisualizationTrack        SourceTrack;
local XComGameStateHistory      History;


local X2Action_PlaySoundAndFlyOver SoundAndFlyover;
local name         ApplyResult;


local X2Action_StartCinescriptCamera CinescriptStartAction;
local X2Action_EndCinescriptCamera   CinescriptEndAction;
local X2Camera_Cinescript            CinescriptCamera;
local string                         PreviousCinescriptCameraType;
local X2Effect                       TargetEffect;




History = `XCOMHISTORY;
Context = XComGameStateContext_Ability(VisualizeGameState.GetContext());
AbilityContext = Context.InputContext;
AbilityTemplate = class'XComGameState_Ability'.static.GetMyTemplateManager().FindAbilityTemplate(AbilityContext.AbilityTemplateName);
ShootingUnitRef = Context.InputContext.SourceObject;


ShooterVisualizer = History.GetVisualizer(ShootingUnitRef.ObjectID);


SourceTrack = EmptyTrack;
SourceTrack.StateObject_OldState = History.GetGameStateForObjectID(ShootingUnitRef.ObjectID, eReturnType_Reference, VisualizeGameState.HistoryIndex - 1);
SourceTrack.StateObject_NewState = VisualizeGameState.GetGameStateForObjectID(ShootingUnitRef.ObjectID);
if (SourceTrack.StateObject_NewState == none)
SourceTrack.StateObject_NewState = SourceTrack.StateObject_OldState;
SourceTrack.TrackActor = ShooterVisualizer;


if (AbilityTemplate.ActivationSpeech != '')     //  allows us to change the template without modifying this function later
{
SoundAndFlyOver = X2Action_PlaySoundAndFlyOver(class'X2Action_PlaySoundAndFlyover'.static.AddToVisualizationTrack(SourceTrack, Context));
SoundAndFlyOver.SetSoundAndFlyOverParameters(None, "", AbilityTemplate.ActivationSpeech, eColor_Good);
}




// Add a Camera Action to the Shooter's track.  Minor hack: To create a CinescriptCamera the AbilityTemplate 
// must have a camera type.  So manually set one here, use it, then restore.
PreviousCinescriptCameraType = AbilityTemplate.CinescriptCameraType;
AbilityTemplate.CinescriptCameraType = "StandardGunFiring";
CinescriptCamera = class'X2Camera_Cinescript'.static.CreateCinescriptCameraForAbility(Context);
CinescriptStartAction = X2Action_StartCinescriptCamera( class'X2Action_StartCinescriptCamera'.static.AddToVisualizationTrack(SourceTrack, Context ) );
CinescriptStartAction.CinescriptCamera = CinescriptCamera;
AbilityTemplate.CinescriptCameraType = PreviousCinescriptCameraType;




class'X2Action_ExitCover'.static.AddToVisualizationTrack(SourceTrack, Context);


//  Fire at the primary target first
FireAction = X2Action_Fire(class'X2Action_Fire'.static.AddToVisualizationTrack(SourceTrack, Context));
FireAction.SetFireParameters(Context.IsResultContextHit(), , false);
//  Setup target response
TargetVisualizer = History.GetVisualizer(AbilityContext.PrimaryTarget.ObjectID);
TargetVisualizerInterface = X2VisualizerInterface(TargetVisualizer);
BuildTrack = EmptyTrack;
BuildTrack.TrackActor = TargetVisualizer;
TargetStateObject = VisualizeGameState.GetGameStateForObjectID(AbilityContext.PrimaryTarget.ObjectID);
if( TargetStateObject != none )
{
History.GetCurrentAndPreviousGameStatesForObjectID(AbilityContext.PrimaryTarget.ObjectID, 
BuildTrack.StateObject_OldState, BuildTrack.StateObject_NewState,
eReturnType_Reference,
VisualizeGameState.HistoryIndex);
`assert(BuildTrack.StateObject_NewState == TargetStateObject);
}
else
{
//If TargetStateObject is none, it means that the visualize game state does not contain an entry for the primary target. Use the history version
//and show no change.
BuildTrack.StateObject_OldState = History.GetGameStateForObjectID(AbilityContext.PrimaryTarget.ObjectID);
BuildTrack.StateObject_NewState = BuildTrack.StateObject_OldState;
}
class'X2Action_WaitForAbilityEffect'.static.AddToVisualizationTrack(BuildTrack, Context);
for (EffectIndex = 0; EffectIndex < AbilityTemplate.AbilityTargetEffects.Length; ++EffectIndex)
{
ApplyResult = Context.FindTargetEffectApplyResult(AbilityTemplate.AbilityTargetEffects[EffectIndex]);


// Target effect visualization
AbilityTemplate.AbilityTargetEffects[EffectIndex].AddX2ActionsForVisualization(VisualizeGameState, BuildTrack, ApplyResult);


// Source effect visualization
AbilityTemplate.AbilityTargetEffects[EffectIndex].AddX2ActionsForVisualizationSource(VisualizeGameState, SourceTrack, ApplyResult);
}
if( TargetVisualizerInterface != none )
{
//Allow the visualizer to do any custom processing based on the new game state. For example, units will create a death action when they reach 0 HP.
TargetVisualizerInterface.BuildAbilityEffectsVisualization(VisualizeGameState, BuildTrack);
}
OutVisualizationTracks.AddItem(BuildTrack);


//  Now configure a fire action for each multi target
for (TargetIndex = 0; TargetIndex < AbilityContext.MultiTargets.Length; ++TargetIndex)
{
// Add an action to pop the previous CinescriptCamera off the camera stack.
CinescriptEndAction = X2Action_EndCinescriptCamera( class'X2Action_EndCinescriptCamera'.static.AddToVisualizationTrack( SourceTrack, Context ) );
CinescriptEndAction.CinescriptCamera = CinescriptCamera;
CinescriptEndAction.bForceEndImmediately = true;


// Add an action to push a new CinescriptCamera onto the camera stack.
AbilityTemplate.CinescriptCameraType = "StandardGunFiring";
CinescriptCamera = class'X2Camera_Cinescript'.static.CreateCinescriptCameraForAbility(Context);
CinescriptCamera.TargetObjectIdOverride = AbilityContext.MultiTargets[TargetIndex].ObjectID;
CinescriptStartAction = X2Action_StartCinescriptCamera( class'X2Action_StartCinescriptCamera'.static.AddToVisualizationTrack(SourceTrack, Context ) );
CinescriptStartAction.CinescriptCamera = CinescriptCamera;
AbilityTemplate.CinescriptCameraType = PreviousCinescriptCameraType;


// Add a custom Fire action to the shooter track.
TargetVisualizer = History.GetVisualizer(AbilityContext.MultiTargets[TargetIndex].ObjectID);
FireFaceoffAction = X2Action_Fire_Faceoff(class'X2Action_Fire_Faceoff'.static.AddToVisualizationTrack(SourceTrack, Context));
FireFaceoffAction.SetFireParameters(Context.IsResultContextMultiHit(TargetIndex), AbilityContext.MultiTargets[TargetIndex].ObjectID, false);
FireFaceoffAction.vTargetLocation = TargetVisualizer.Location;




//  Setup target response
TargetVisualizerInterface = X2VisualizerInterface(TargetVisualizer);
BuildTrack = EmptyTrack;
BuildTrack.TrackActor = TargetVisualizer;
TargetStateObject = VisualizeGameState.GetGameStateForObjectID(AbilityContext.MultiTargets[TargetIndex].ObjectID);
if( TargetStateObject != none )
{
History.GetCurrentAndPreviousGameStatesForObjectID(AbilityContext.MultiTargets[TargetIndex].ObjectID, 
BuildTrack.StateObject_OldState, BuildTrack.StateObject_NewState,
eReturnType_Reference,
VisualizeGameState.HistoryIndex);
`assert(BuildTrack.StateObject_NewState == TargetStateObject);
}
else
{
//If TargetStateObject is none, it means that the visualize game state does not contain an entry for the primary target. Use the history version
//and show no change.
BuildTrack.StateObject_OldState = History.GetGameStateForObjectID(AbilityContext.MultiTargets[TargetIndex].ObjectID);
BuildTrack.StateObject_NewState = BuildTrack.StateObject_OldState;
}


// Add WaitForAbilityEffect. To avoid time-outs when there are many targets, set a custom timeout
class'X2Action_WaitForAbilityEffect'.static.AddToVisualizationTrack(BuildTrack, Context);
BuildTrack.TrackActions[BuildTrack.TrackActions.Length - 1].SetCustomTimeoutSeconds((10 + (10 * TargetIndex )));


for (EffectIndex = 0; EffectIndex < AbilityTemplate.AbilityMultiTargetEffects.Length; ++EffectIndex)
{
TargetEffect = AbilityTemplate.AbilityMultiTargetEffects[EffectIndex];
ApplyResult = Context.FindMultiTargetEffectApplyResult(TargetEffect, TargetIndex);


// Target effect visualization
AbilityTemplate.AbilityMultiTargetEffects[EffectIndex].AddX2ActionsForVisualization(VisualizeGameState, BuildTrack, ApplyResult);


// If the last Effect applied was weapon damage, then a weapon damage Action was added to the track.
// Find that weapon damage action, and extend its timeout so that we won't timeout if there are many
// targets to visualize before this one.
if ( X2Effect_ApplyWeaponDamage(TargetEffect) != none )
{
if ( X2Action_ApplyWeaponDamageToUnit(BuildTrack.TrackActions[BuildTrack.TrackActions.Length - 1]) != none)
{
BuildTrack.TrackActions[BuildTrack.TrackActions.Length - 1].SetCustomTimeoutSeconds((10 + (10 * TargetIndex )));
}
}


// Source effect visualization
AbilityTemplate.AbilityMultiTargetEffects[EffectIndex].AddX2ActionsForVisualizationSource(VisualizeGameState, SourceTrack, ApplyResult);
}
if( TargetVisualizerInterface != none )
{
//Allow the visualizer to do any custom processing based on the new game state. For example, units will create a death action when they reach 0 HP.
TargetVisualizerInterface.BuildAbilityEffectsVisualization(VisualizeGameState, BuildTrack);
}
OutVisualizationTracks.AddItem(BuildTrack);
}
class'X2Action_EnterCover'.static.AddToVisualizationTrack(SourceTrack, Context);


// Add an action to pop the last CinescriptCamera off the camera stack.
CinescriptEndAction = X2Action_EndCinescriptCamera( class'X2Action_EndCinescriptCamera'.static.AddToVisualizationTrack( SourceTrack, Context ) );
CinescriptEndAction.CinescriptCamera = CinescriptCamera;


OutVisualizationTracks.AddItem(SourceTrack);}

 

 

 

The abilities are in game but there are two issues, one minor one major.

 

The minor one is that all the localisation text is gone, no ability names, no ability descriptions and the fire weapon button is blank too when using them in mission.

 

Digging through it seems what i thought was the line in the script file referencing the appropriate section of the localisation file actually isn't, so what line sets it?

 

 

The Major one is cooldown related. Both an fire and Face off have had their action point cost code changed to match that of lightning hands, (so basically it's gone). So long as i leave their cooldown code unchanged this functions as expected. However the cooldown code does not, the cooldown becomes instant, (i.e. you can use it any number of times in the same turn). If i manually set the cooldown in the file instead of referencing the config variable it instead allows faceoff to be used after dashing, (which it can't be done if it references the config). Am i missing somthing in the lightning hands code, or just doing somthing wrong referencing the config?

 

 

 

Since it's obviously not that what line/s set the relevant references, (i've edited localisations before so i know in general terms how they work, but i don't know what acts as the referance)

Edited by CarlBar
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...