Jump to content

R&D Unlocking Hidden/Unused Perks


Amineri

Recommended Posts

While looking through the enum EPerkType list, I noticed that there a lot more than the 48 perks available to the XCOM soldiers. Some of them are alien abilities, and some are other "situational" things, such as ePerk_AutopsyRequired.

 

For a more comprehensive set of compiled information, see the wiki page at: http://wiki.tesnexus.com/index.php/XCOM:EU_Perks

 

However, there appear to be other perks that don't seem to be alien abilities, or have another purpose. Some of them even have code that tests for them. For example:

Quote

 

 

if(m_kUnit.GetCharacter().HasUpgrade(30))

{

// End:0xdd3 Loop:False

if(m_kUnit.m_iFireActionsPerformed == 1 && (!m_kUnit.IsTurnEndingAbility(m_kUnit.GetUsedAbility())))

{

// End:0xdb1 Loop:False

if(!m_kUnit.PrimaryWeaponHasAmmoForShot(XGAbility_GameCore(m_kUnit.FindAbility(33, none))))

{

super.EndTurnCheck();

return;

}

m_kUnit.BuildAbilities();

return;

}

}

 

is doing something (I haven't totally puzzled it out yet) based on ePerk_ReadyForAnything (30), which is NOT one of the base 48 perks available to XCOM soldiers.

 

I'm wondering how many of these perks have code, and could be turned on. This could provide more variety in perks, particular if abilities such as Smoke Grenades and Battle Scanners are removed from perks and equipped as items instead.

 

The perks to investigate are:

4 -- ePerk_TooCloseForComfort - Aim penalty for close proximity is halved

12 -- ePerk_ButtonUp

20 -- ePerk_HEATRockets ((this appears to be separate from ePerk_HEATAmmo, which is #91))

28 -- ePerk_Blitz

29 -- ePerk_FirstBlood - like Rocketeer, but limited to 1 extra rocket use

30 -- ePerk_ReadyForAnything

38 -- ePerk_FlameOn

42 -- ePerk_Vengeance

45 -- ePerk_TheBlueWire

50 -- ePerk_ModernFoxhole

 

Alien Perks:

82 = 0x52 -- ePerk_Bombard (WORKS -- with hex change to enable for XCOM units)

 

I'm going to poke around at them, maybe hex edit some in and see if they have any game-effect, but there's a bunch, so I may not get to all of them. Hence my tossing it out there so other people can play, too :smile:

Edited by Amineri
Link to comment
Share on other sites

  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

The perk ePerk_Bombard ="Throw or launch grenades over exceptionally long distances." is a perk granted only to aliens in the vanilla game, but might be grant-able to XCOM soldiers to "beef up their throwing arm" :)

 

ePerk_Bombard : 82 = 0x52

 

--------------------------------------

 

ePerk_FirstBlood ="Rocketeer"

 

Apparently it is set up this way (how it reads in the Localisation file, anyhow).

 

I have no ideas what ePerk_Rocketeer : 93 = 0x5D does

 

------------------------------------

 

The perk ePerk_Repair ="Repairs robotic units." is normally only given to alien-controlled Drones.

 

However, it might be grantable to XCOM soldiers to make an "engineer" class that can repair SHIVs without the need for the Foundry-upgraded ARC Thrower.

 

ePerk_Repair : 103 = 0x67

Link to comment
Share on other sites

Apparently, ePerk_Rocketeer ="Allows <XGAbility:RocketeerExtraRockets/> additional standard rocket to be fired per battle."

 

So it's some sort of "improved Rocketeer"

 

Both perks have the same string name:

 

m_strPenaltyTitle[ePerk_Rocketeer]="Rocketeer"

m_strPassiveTitle[ePerk_FirstBlood]="Rocketeer"

 

But m_strPassiveTxt[ePerk_FirstBlood]="Allows a second use of Fire Rocket in each mission."

 

The existing Rocketeer perk follows the wording of ePerk_Rocketeer, so ePerkFirstBlood is "extra"

Link to comment
Share on other sites

ePerk_TooCloseForComfort ="Aim penalty for close proximity is halved."

what a dumb perk... hehe no wonder they discarded it

 

regarding item-perks... I did remove Smoke Grenade, BattleScanner and Fire Rocket from skill trees, but I got to give each unit those perks via GivePerk(44), etc, otherwise no matter the items got the ability and the units got charges, it wouldn't work unless they got the perk as well.

 

As for rocketeer I've only seen it used in UpdateItemCharges function (and it must be the same for grenadier, field medic and smoke & mirrors), since those functions only grant additional charges.

 

My current attempt is to make flashbang grenades use the shredder rocket ability and thus check if animation is given by the object or by the ability that triggers it. Since you're so proeficient cracking code you may want to give a hand at this. I recall seeing somewhere checking if certain ability was used (ability 66 I think it was) then it does 4 damage, so in case it works I'm expecting this to be hard coded in a function (as well as shredder duration and increased damage) so that would limit the shredder rocket ability to only flashbang grenades, but that's ok for me.

 

If you'd allow me yet another petition, I'd like to ask you that if browsing through this functions you find where certain perks are applied I'd appreciate if you'd let me know where you've found them. You know, perk values like headshot extra damage (+2) and extra crit change (+30) are defined in constants, but the game doesn't read them. Surprising, right? :p So that's it, I'm not asking you to search this for me, I'll eventualy do it myself, as I want to make some adjustment (sprinter +2 tiles instead of 3, Close&Personal range 6 or 7 tiles not 1 or 2, tactical sense +3% def up to +15% for 5 enemies, and such) but just take note as I'm sure you already do.

Link to comment
Share on other sites

You give them the perk as a side-effect of equipping the item? Or do you give the perk to everyone, but it's only usable if there are charges set via the item check in SetCharges?

 

If it is the former, point me at the code you use to do this. It sounds as though it could be mutated into granting OTHER perks based on items equipped. In particular it would be nice to give the SHIV the Bombard perk if a Grenade Launcher is equipped.

 

Also, have you tested whether Grenadier works with Smoke Grenades, Flash Bangs and Battle Scanners as well?

Link to comment
Share on other sites

I give every unit those perks on purpouse once they get a class. Then equipping items or not doing only affects in the amount of charges.

XGStrategySoldier.SetClass

 

function SetClass(XComGame.XGTacticalGameCoreData.ESoldierClass eNewClass)
{
    local TInventory kNewLoadout;

    m_kSoldier.kClass.eType = eNewClass;
    kNewLoadout = m_kChar.kInventory;
    m_kChar.eClass = eNewClass;
    m_kSoldier.kClass.strName = class'XGLocalizedData'.default.SoldierClassNames[eNewClass];
    GivePerk(44);
    GivePerk(8);
    GivePerk(22);                
    switch(eNewClass)
    {
        // End:0x1C5
        case 1:
            GivePerk(16);
            m_kSoldier.kClass.eWeaponType = 7;
            TACTICAL().TInventoryLargeItemsSetItem(kNewLoadout, 0, 6);
            // End:0x1C2
            if(IsInjured())
            {
                TACTICAL().TInventoryLargeItemsSetItem(m_kInjuredLoadout, 0, 6);
            }
            // End:0x417
            break;
        // End:0x264
        case 3:
            m_kSoldier.kClass.eWeaponType = 4;
            TACTICAL().TInventoryLargeItemsSetItem(kNewLoadout, 0, 3);
            // End:0x261
            if(IsInjured())
            {
                TACTICAL().TInventoryLargeItemsSetItem(m_kInjuredLoadout, 0, 3);
            }
            // End:0x417
            break;
        // End:0x303
        case 2:
            m_kSoldier.kClass.eWeaponType = 8;
            TACTICAL().TInventoryLargeItemsSetItem(kNewLoadout, 0, 5);
            // End:0x300
            if(IsInjured())
            {
                TACTICAL().TInventoryLargeItemsSetItem(m_kInjuredLoadout, 0, 5);
            }
            // End:0x417
            break;
        // End:0x3AE
        case 4:
            m_kSoldier.kClass.eWeaponType = 6;
            GivePerk(18);
            TACTICAL().TInventoryLargeItemsSetItem(kNewLoadout, 0, 4);
            // End:0x3AB
            if(IsInjured())
            {
                TACTICAL().TInventoryLargeItemsSetItem(m_kInjuredLoadout, 0, 4);
            }
            // End:0x417
            break;
        // End:0x414
        case 5:
            m_kSoldier.kClass.eWeaponType = 4;
            TACTICAL().TInventoryLargeItemsSetItem(kNewLoadout, 0, 3);
            // End:0x417
            break;
        // End:0xFFFF
        default:
            LOCKERS().ApplySoldierLoadout(self, kNewLoadout);
            //return;
    }    
}


Here I've removed the rocket launcher call (there was a second item for class 2) but it could be restored just grouping case 5 and support.

And item charges are set in XGUnit.UpdateItemCharges

function UpdateItemCharges()
{
    SetMediKitCharges(GetInventory().GetNumItems(76) * (1 + (GetCharacter().HasUpgrade(48) * 1)));
    SetRockets((GetInventory().GetNumItems(7) + GetInventory().GetNumItems(19)) * (1 + (GetCharacter().HasUpgrade(93) * 1)));
    SetShredderRockets(GetInventory().GetNumItems(87) * ((GetCharacter().HasUpgrade(24) * 1) + 1));                                                                                                                                
    SetFragGrenades(GetInventory().GetNumItems(85) * (1 + (GetCharacter().HasUpgrade(24) * 1)));
    SetAlienGrenades(GetInventory().GetNumItems(88) * (1 + (GetCharacter().HasUpgrade(24) * 1)));
    SetSmokeGrenadeCharges(GetInventory().GetNumItems(86) * (((GetCharacter().HasUpgrade(24) || GetCharacter().HasUpgrade(92)) * 1) + 1));    
    SetArcThrowerCharges(GetInventory().GetNumItems(80) * 2);
    SetGhostCharges(GetInventory().GetNumItems(78) * 5);
    SetBattleScannerCharges(GetInventory().GetNumItems(99) * 2);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    //return;    
}


I've made it so grenadier grants 2 of any grenade, while Smoke&Mirrors only grants extra smoke grenade, but that can be customized at will.

Edited by anUser
Link to comment
Share on other sites

I doubt it would work with this bombardier, since abilities seem to be permament, so either you grant all shivs the bombard ability and then make it require that item in order to count the charges of quipped grenades, but that seems a bit lame, or rather call RemovePerk() at the end of the mission, and GivePerk at the beginning, or inside that UpdateItemCharges, there's still some room left

Link to comment
Share on other sites

Somewhat off topic of this thread - but is it possible to change a perk that I've already selected? If someone could point me in a direction, I'd be very appreciative. TIA!

Nope, unfortunately soldiers retain the perks. It can effectively be done but it would involve a lot of hex edits to find the appropiate place to insert a call to RemovePerk function, and eventhough it'd be a headache to control which perk you remove from which soldier. Unless you can call that from the developer console, which I ignore, there's no easy way to do that.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...