My goal is pretty simple: figure out what files need to be modified in order to allow SPARK the ability to train AWC abilities. I've logged my explorative progress so far. If anyone wants to hop in and contribute, sniff around in some files, etc, please do so and let us all know what you find!
AWC Trees
As part of another project (expanding the number of AWC abilities a soldier can train), I went fishing through XComLW_AWCPack.ini and removed this line:
Code: Select all
+ClassCannotGetAWCTraining="Spark"
Code: Select all
;EDITED - Added restrictions for SPARK class
+AWCRestrictions=(AWCAbility="BiggestBooms_LW", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="Blademaster", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="Bladestorm", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="Bombard_LW", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="DeepCover", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="Evasive", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="FieldMedic", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="Flashbanger", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="FullKit", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="HardTarget", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="HEATWarheads", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="HeavyFrags", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="LowProfile", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="Phantom", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="RapidDeployment", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="RapidReaction", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="Sapper", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="Sentinel_LW", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="Shadowstep", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="Shadowstrike_LW", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="SharpshooterAim", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="SmokeGrenade", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="Stealth", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="SwordSlice_LW", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="VolatileMix", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="WilltoSurvive", RestrictedAbility="RobotImmunities")
+AWCRestrictions=(AWCAbility="ReturnFire", RestrictedAbility="RobotImmunities") ;This doesn't work yet.
+AWCRestrictions=(AWCAbility="Quickdraw", RestrictedAbility="RobotImmunities") ;This doesn't work yet.
+AWCRestrictions=(AWCAbility="ClutchShot", RestrictedAbility="RobotImmunities") ;This doesn't work yet.
+AWCRestrictions=(AWCAbility="LightningHands", RestrictedAbility="RobotImmunities") ;This doesn't work yet.
+AWCRestrictions=(AWCAbility="Gunslinger", RestrictedAbility="RobotImmunities") ;This doesn't work yet.
+AWCRestrictions=(AWCAbility="Faceoff", RestrictedAbility="RobotImmunities") ;This doesn't work yet.
+AWCRestrictions=(AWCAbility="FanFire", RestrictedAbility="RobotImmunities") ;This doesn't work yet.
It should be noted that, although I restricted SPARK's ability to use any pistol perks (because, no utility slots to hold a pistol), this did literally nothing; SPARK still generated the full pistol-perk tree, for whatever reason. I'm unsure as to why.
Training the Perks
Unfortunately, enabling an AWC tree to be generated is not all it takes. At this point, SPARK is generating an AWC tree, but there's no button in the armory above their tree to train the abilities; if you go to the AWC itself and search the drop-down for your SPARK units, they don't appear. So there's something else going on behind the scenes that's disabling SPARK's ability to train AWC abilities.
I've gone digging through a LOT of files to try and figure out what's going on, and several times I've THOUGHT I've found the "Oh this is what they did to stop SPARK from training," only to discover that there was another catch in some other file trying to do the same thing, in a different way. Here's some examples:
XComClassData.ini
Code: Select all
[Spark X2SoldierClassTemplate]
bMultiplayerOnly=0
ClassPoints=4
IconImage="img:///UILibrary_DLC3Images.class_spark"
NumInForcedDeck=0
NumInDeck=0
KillAssistsPerKill=4
SquaddieLoadout="SquaddieSpark"
;+AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="sparkrifle")
;+AllowedWeapons=(SlotType=eInvSlot_SecondaryWeapon, WeaponType="sparkbit")
+AllowedWeapons=(SlotType=eInvSlot_HeavyWeapon, WeaponType="heavy")
+AllowedArmors="spark"
bAllowAWCAbilities=0
X2StrategyElement_AWC_TrainingStaffSlot_LW.uc
Code: Select all
static function bool IsUnitValidForAWCTrainingSlot(XComGameState_StaffSlot SlotState, StaffUnitInfo UnitInfo)
{
local XComGameState_Unit Unit;
local bool HasEligibleRegularRank;
Unit = XComGameState_Unit(`XCOMHISTORY.GetGameStateForObjectID(UnitInfo.UnitRef.ObjectID));
HasEligibleRegularRank = Unit.GetRank() >= class'LWAWCUtilities'.default.RequiredRankForAWCTraining[1];
if (Unit.IsASoldier()
&& !Unit.IsInjured()
&& !Unit.IsTraining()
&& !Unit.IsPsiTraining()
&& !Unit.IsPsiAbilityTraining()
&& !Unit.CanRankUpSoldier()
&& HasEligibleRegularRank
&& Unit.GetStatus() != eStatus_OnMission // don't use DLC helpers here since sparks can't train as officers
&& Unit.GetSoldierClassTemplate() != none && Unit.GetSoldierClassTemplate().DataName != 'Spark')
{
return true;
}
return false;
}
EDIT: So I actually found, in another file, a similar function that checked if the unit was on a mission, using the DLC helper referenced in this file above. So I substituted out the line with the function call 'Unit.GetStatus() !=' for the following:
Code: Select all
&& !class'LWDLCHelpers'.static.IsUnitOnMission(Unit)
UIPersonnel_AWC_LW.uc
Code: Select all
for(i = 0; i < HQState.Crew.Length; i++)
{
Unit = XComGameState_Unit(`XCOMHISTORY.GetGameStateForObjectID(HQState.Crew[i].ObjectID));
SlotUnitInfo.UnitRef = Unit.GetReference();
if(Unit.IsAlive())
{
// Cheap way to disable Sparks from AWC training
if (Unit.IsASoldier() && !Unit.HasSoldierAbility('Overdrive', true))
{
//Check StaffSlot Validation function, defined in AWC StaffSlot Template
if (SlotState.ValidUnitForSlot(SlotUnitInfo))
{
if (m_arrNeededTabs.Find(eUIPersonnel_Soldiers) != INDEX_NONE)
{
m_arrSoldiers.AddItem(Unit.GetReference());
Also, I noticed the comment about StaffSlot validation 'defined in AWC StaffSlot Template,' but doing a search-for-text of every file in the workshop directory, I found that I couldn't find the file where the function, 'ValidUnitForSlot()' was defined. Hrmm...