Kregano Posted July 22, 2017 Share Posted July 22, 2017 Already asked this on r/XCOM2mods but didn't get any help, so I'll ask this here: I'm preparing for WOTC to break some/all of my mods, so I figured it was a good time to tackle a problem I never licked. So, in two of my mods, the Grenadier and Ranger skill trees are reshuffled to accommodate new abilities, with each having a base game ability moved into the squaddie tier of skills. If you start a new game, you get those skills, but if you don't, you cannot get them. Now, I've taken a look at some of the AWC mods to see what they did, and their solutions are okay for the stock game, but obviously won't work for WOTC, since the AWC won't exist there, and would be horrifically complicated to divorce from AWC dependence. I tried using the game's own GetEarnedSoldierAbilities() function, but for whatever reason, it gives me this error: D:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\Src\ConeofFire\Classes\X2DownloadableContentInfo_ConeofFire.uc(40) : Error, Bad or missing expression for token: GetSoldierClassTemplate, in '=' Aside from relabeling this function as a static function and adding a bracket or two, it's the same as the code in the XCOMGameState (IIRC) file I pulled it out of, so I'm not sure what's going on here. Anybody got any ideas A) on how to fix it, or B) a better way to do what I'm trying to do? The function, for reference: static function array<SoldierClassAbilityType> GetEarnedSoldierAbilities() { local X2SoldierClassTemplate ClassTemplate; local array<SoldierClassAbilityType> EarnedAbilities, AbilityTree; local SoldierClassAbilityType Ability; local int i; ClassTemplate = GetSoldierClassTemplate(); if (ClassTemplate != none) { for (i = 0; i < m_SoldierProgressionAbilties.Length; ++i) { if (ClassTemplate.GetMaxConfiguredRank() <= m_SoldierProgressionAbilties[i].iRank) continue; AbilityTree = ClassTemplate.GetAbilityTree(m_SoldierProgressionAbilties[i].iRank); if (AbilityTree.Length <= m_SoldierProgressionAbilties[i].iBranch) continue; Ability = AbilityTree[m_SoldierProgressionAbilties[i].iBranch]; EarnedAbilities.AddItem(Ability); } } } Link to comment Share on other sites More sharing options...
Recommended Posts