AWC perk allocation bug hotfix solution.

Post Reply
cerebrawl
Posts: 137
Joined: Mon Jan 30, 2017 10:41 am

AWC perk allocation bug hotfix solution.

Post by cerebrawl »

Figured I might as well post this here.

The RestrictedClass function is broken, it restricts the ability from all classes, not just the one it should be targeting, this means a lot of perks which are listed in the XComLW_AWCPack.ini will never be given to any soldier, because the broken function restricts them from everyone.

Here's the easy hotfix:
Do search and replace of all
RestrictedClass="LWS_Sharpshooter" with RestrictedAbility="Squadsight"
RestrictedClass="LWS_Grenadier" with RestrictedAbility="LaunchGrenade"
RestrictedClass="LWS_Shinobi" with RestrictedAbility="Slash_LW"
RestrictedClass="LWS_Ranger" with RestrictedAbility="PointBlank"
RestrictedClass="LWS_Assault" with RestrictedAbility="ArcthrowerStun"
RestrictedClass="LWS_Specialist" with RestrictedAbility="AidProtocol"
RestrictedClass="LWS_Technical" with RestrictedAbility="HeavyArmaments"
RestrictedClass="LWS_Gunner" with RestrictedAbility="KnifeFighter"
RestrictedClass="LWS_PsiOperative" with RestrictedAbility="Soulfire"

This way the intended restrictions work, so you don't get sword abilities on your sharpshooter or whatnot, but it opens up for a lot more abilities that were listed but nobody could get. Like lightning reflexes, because it was affected by RestrictedClass="LWS_Shinobi", which blocks it for everyone. There's about 25 perks affected.
Last edited by cerebrawl on Tue Jan 31, 2017 9:09 pm, edited 1 time in total.
User avatar
JLtheking
Posts: 105
Joined: Sat Jan 21, 2017 12:11 pm

Re: AWC perk allocation bug hotfix solution.

Post by JLtheking »

This is good. Thanks a lot!
Crushing Doom
Posts: 8
Joined: Tue Jan 24, 2017 11:50 am

Re: AWC perk allocation bug hotfix solution.

Post by Crushing Doom »

Wait, which lines are we replacing in the INI? Or do we just add that code?
cerebrawl
Posts: 137
Joined: Mon Jan 30, 2017 10:41 am

Re: AWC perk allocation bug hotfix solution.

Post by cerebrawl »

Crushing Doom wrote:Wait, which lines are we replacing in the INI? Or do we just add that code?
Do a search and replace of all instances of the bit on the left, with the bit on the right.
In notepad++ it looks like this:
Image
wadeanthony
Posts: 28
Joined: Wed Jan 18, 2017 5:34 am

Re: AWC perk allocation bug hotfix solution.

Post by wadeanthony »

Is this a fix or was it intended to be this way?
please delete my account, I know long use it.
cerebrawl
Posts: 137
Joined: Mon Jan 30, 2017 10:41 am

Re: AWC perk allocation bug hotfix solution.

Post by cerebrawl »

wadeanthony wrote:Is this a fix or was it intended to be this way?
It's a workaround bugfix because the RestrictedClass function is broken and stops all classes from getting the perk, instead of just one class.

This gets you the intended restrictions, and not the draconian bans. ;)
3dahs
Posts: 34
Joined: Tue Jan 31, 2017 2:02 pm

Re: AWC perk allocation bug hotfix solution.

Post by 3dahs »

If I make these changes and they come out with a new patch will it mess up my game? Would love to see one of the LW2 devs post this on the 1.2 workaround patch notes. Or at least confirm this is how they will fix it.

Anyway, thanks for the find! :D
cerebrawl
Posts: 137
Joined: Mon Jan 30, 2017 10:41 am

Re: AWC perk allocation bug hotfix solution.

Post by cerebrawl »

3dahs wrote:If I make these changes and they come out with a new patch will it mess up my game? Would love to see one of the LW2 devs post this on the 1.2 workaround patch notes. Or at least confirm this is how they will fix it.

Anyway, thanks for the find! :D
New patch will overwrite the changes, and it won't even mess up your save. If they change the perk lists/availabilities, then it will only affect soldiers you promote up from rookie, everyone who is a squadie or higher are locked in to the perks they were allocated before.

And you're welcome. :)
Post Reply