Armor Initialization Modding - XCOM:EU 2012

From Nexus Mods Wiki
Jump to: navigation, search


Overview

While investigating issues with implementing the Armor Property "eAP_Grapple" via the DefaultGameCore.ini settings - XCOM:EU 2012, I noticed that the XCOM:EU Force's Armors did NOT use a standard initialization; that is there was no real standardization of which "eSlots" were being initialized for the equip-able armors.

There are those that will say: "This is a good thing"; if they feel that changing this might offend them, they are welcome to go elsewhere (while ignoring the rest of this article).

For those that are still here, this article will go into the details on what needs to be understood to knowingly modify the XCOM:EU Force's Armors to a standard initialization scheme.

While Item loadouts - XCOM:EU 2012 does touch on parts of the below details, it focuses more on XCOM:EW 2013 (and came before this article was written).

  • That is to say: this article (focusing on XCOM:EU 2012, with more recent discoveries) supersedes whatever contradictions may be raised by the (above) referenced article (focusing on XCOM:EW 2013).

Game Version Compatibility

Investigated and tested using Steam's:

XCOM: Enemy Unknown - Patch 6, Date: 2013-Nov-25, EXE Version: 1.0.0.4963, Changelist: 398179

Known Issues

DEFINITELY NOT COMPATIBLE with XCOM: Enemy Within (XCOM:EW 2013).

Issues with implementing the Armor Property "eAP_Grapple" via the DefaultGameCore.ini settings - XCOM:EU 2012 led to this investigation.

By design the Armor Property "eAP_Grapple" should cause the Weapon "eItem_Grapple" to be equipped to the "eSlot_Grapple" (on the left-forearm) of an Armor, and enable the proper functioning thereof.

Heretofore:
While the Weapon "eItem_Grapple" would appear on the left-forearm of an Armor with the "eAP_Grapple" property, it would not have a control in the Tactical Game (i.e. on a mission). Using the ABILITIY "eAbility_Grapple" on an Armor would turn on the Tactical Game control, but "eItem_Grapple" would malfunction:
  • On use the firing of the Primary Weapon animation is played then the Grapple animation plays, but ends before the Soldier climbs onto the targeted tile.
  • with the result that the Soldier ends up one tile short (and below) the tile targeted by the Grapple action.
    • In open terrain the soldier can walk away from this;
    • But in Urban or Ship terrain the soldier is stuck (unless there are other grapple targets within range).


A critical clue to what the actual problem is - when using the ABILITIY "eAbility_Grapple" on an Armor - was that the Tactical Game control for the "Grapple" would be in the wrong place within the sequence of Tactical Game controls.

  • That is the "Grapple" control came after all of the "eSmallItems" controls (rather than before them - as it should), and just before any Psi controls.

Programs and Tools

For the purposes of this article there are three tools from Modding Tools - XCOM:EU 2012 that I would recommend; tool links (below) will be to specific points on the referenced page.
Please see:

  • UE Explorer
    • I used UE Explorer (version 1.2.7.1) to view decompiled code from the XComGame.upk file.
  • UPK Utils
    • I used PatcherGUI (version 7.3) to install (and uninstall - as needed) the "test code" for this mod.
    • Only needs to be extracted from it's download file to work (no lengthy installation process).
    • 'Take Notes' on where the "PatcherGUI.exe" file is extracted to (or create your own shortcut to it).
      • For modders there are two "Readme.txt" files in with the "PatcherGUI.exe" file:
        • "PatcherGUIReadme.txt" - written for those that are more interested in 'applying mods';
        • and "PatchUPK_Readme.txt" - written for those that are also interested in 'writing mods'.
    • Also - worthy of mention here:
      • Tools Menu: "Disable hash check" - modifies "XComGame.exe".
      • Tools Menu: "Enable ini loading" - modifies "XComGame.exe".
      • Tools Menu: "Disable phoning home" - modifies "Windows network settings".
      • Button (on right side): "Show log" - may be used to quickly locate the most recent uninstall.txt (for a PatcherGUI installed mod).
      • Button (on right side): "Apply" - why we use PatchGUI: to apply a modifying txt file.
  • Notepad++
    • For those that want that little bit more than what Microsoft Windows' "Notepad.exe" offers.

Compiled Code : Source & Scripts


Unmodified decompiled "Object" code (i.e. Source Code 'equivalent') found in - XComGame.upk using UE Explorer (or scripted-text found in XComGame.int using notepad-or-equivalent) :

XGInventory

simulated function DualWieldHandling(XGInventorySlot kEquipInventorySlot, XGInventoryItem kItem)
{
    local XGInventorySlot kLeftBackSlot, kRightBackSlot;
    local XGInventoryItem kItem1, kItem2;

    // End:0x283
    if(((kEquipInventorySlot == (GetSlot(2))) && kItem.m_kSlot == (GetSlot(1))) || ((kEquipInventorySlot == (GetSlot(0))) && GetSlot(0).GetPrimaryItem() != none) && GetSlot(1).GetPrimaryItem() == none)
    {
        kLeftBackSlot = GetSlot(1);
        kRightBackSlot = GetSlot(0);
        kItem1 = kLeftBackSlot.GetPrimaryItem();
        kItem2 = kRightBackSlot.GetPrimaryItem();
        kRightBackSlot.UnequipItem();
        kLeftBackSlot.UnequipItem();
        // End:0x1FE
        if(kItem2 != none)
        {
            kItem2.m_kReservedSlot = kLeftBackSlot;
            kLeftBackSlot.EquipItem(kItem2);
            PresRemoveItem(kItem2);
            PresAddItem(kItem2);
        }
        // End:0x283
        if(kItem1 != none)
        {
            kItem1.m_kReservedSlot = kRightBackSlot;
            kRightBackSlot.EquipItem(kItem1);
            PresRemoveItem(kItem1);
            PresAddItem(kItem1);
        }
    }
    //return;    
}
Default Values
m_SocketNames=Inven_R_Back
m_SocketNames[1]=Inven_L_Back
m_SocketNames[2]=Inven_R_Hand
m_SocketNames[3]=Inven_L_Hand
m_SocketNames[4]=Inven_Grapple
m_SocketNames[5]=Inven_R_Leg
m_SocketNames[6]=Inven_L_Leg
m_SocketNames[7]=Inven_L_Belt
m_SocketNames[8]=Inven_L_Boot
m_SocketNames[9]=Inven_R_Boot
m_SocketNames[10]=Inven_R_Chest
m_SocketNames[11]=Inven_L_Chest
m_SocketNames[12]=Inven_R_Forearm
m_SocketNames[13]=Inven_RightSling
m_SocketNames[14]=Inven_RearBackPack
m_SocketNames[15]=Inven_PsiSource
m_SocketNames[16]=Inven_Head
m_SocketNames[17]=Inven_C_Chest
m_SocketNames[18]=Claw_R
m_SocketNames[19]=Claw_L
m_SocketNames[20]=HeatRay
bTickIsDisabled=true

XGInventoryNativeBase

Constants
const LARGE_WEAPON_SIZE = 4;
enum ELocation
{
    eSlot_RightBack,
    eSlot_LeftBack,
    eSlot_RightHand,
    eSlot_LeftHand,
    eSlot_Grapple,
    eSlot_RightThigh,
    eSlot_LeftThigh,
    eSlot_LeftBelt,
    eSlot_LeftBoot,
    eSlot_RightBoot,
    eSlot_RightChest,
    eSlot_LeftChest,
    eSlot_RightForearm,
    eSlot_RightSling,
    eSlot_RearBackPack,
    eSlot_PsiSource,
    eSlot_Head,
    eSlot_CenterChest,
    eSlot_Claw_R,
    eSlot_Claw_L,
    eSlot_ChestCannon,
    eSlot_None,
    eSlot_MAX
};
native simulated function XGInventorySlot GetSlot(XGInventoryNativeBase.ELocation eSlot);
Parameters
XGInventoryNativeBase.ELocation eSlot
out XGInventorySlot ReturnValue

XGInventorySlotNativeBase

native simulated function SetSlotLocation(XGInventoryNativeBase.ELocation eLoc);
native simulated function SetSize(int iSize);
native simulated function SetEnabled(bool bEnabled);

XGArmors

File: XComGame.upk as viewed in UE Explorer

function Init()
{
    local XGInventorySlot kSlot;

    // End:0x33
    if(m_kInventory == none)
    {
        m_kInventory = Spawn(class'XGInventory');
    }
    kSlot = GetInventory().GetSlot(13);
    kSlot.SetSlotLocation(13);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(14);
    kSlot.SetSlotLocation(14);
    kSlot.SetSize(5);
    kSlot.SetEnabled(true);
    //return;    
}
Default Values
m_eLevel=EArmorLevel.eLevel_Invalid
m_eClass=EArmorClass.eClass_Invalid
m_bCanTakeLowCover=true
m_bCanTakeHighCover=true

File: XComGame.int

[XGArmor]
m_strType="Armor"

XGArmor_LevelIIILight

File: XComGame.upk as viewed in UE Explorer

function Init()
{
    local XGInventorySlot kSlot;

    super.Init();
    kSlot = GetInventory().GetSlot(2);
    kSlot.SetSlotLocation(2);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(0);
    kSlot.SetSlotLocation(0);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(1);
    kSlot.SetSlotLocation(1);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(5);
    kSlot.SetSlotLocation(5);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(6);
    kSlot.SetSlotLocation(6);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(11);
    kSlot.SetSlotLocation(11);
    kSlot.SetSize(2);
    kSlot.SetEnabled(false);
    kSlot = GetInventory().GetSlot(4);
    kSlot.SetSlotLocation(4);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(15);
    kSlot.SetSlotLocation(15);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    //return;
}
Default Values
m_eLevel=EArmorLevel.eLevel_III
m_eClass=EArmorClass.eClass_Light
m_eType=EItemType.eItem_ArmorGhost
m_strUIImage="CHH_Lv3_ICONS.CHH_Lv3LightMale_Armor_ICON"

File: XComGame.int

[XGArmor_LevelIIILight]
m_strName="Ghost Armor"
m_strNotes="The Ghost is capable of vanishing from sight."

XGArmor_LevelIIIMedium

File: XComGame.upk as viewed in UE Explorer

function Init()
{
    local XGInventorySlot kSlot;

    super.Init();
    kSlot = GetInventory().GetSlot(2);
    kSlot.SetSlotLocation(2);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(0);
    kSlot.SetSlotLocation(0);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(1);
    kSlot.SetSlotLocation(1);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(5);
    kSlot.SetSlotLocation(5);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(10);
    kSlot.SetSlotLocation(10);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(11);
    kSlot.SetSlotLocation(11);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(6);
    kSlot.SetSlotLocation(6);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(15);
    kSlot.SetSlotLocation(15);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    //return;    
}
Default Values
m_eLevel=EArmorLevel.eLevel_III
m_eClass=EArmorClass.eClass_Medium
m_eType=EItemType.eItem_ArmorTitan
m_strUIImage="CHH_Lv3_ICONS.CHH_Lv3MedMale_Armor_ICON"

File: XComGame.int

[XGArmor_LevelIIIMedium]
m_strName="Titan Armor"
m_strNotes="The Titan armor provides an excellent defense against alien weapons."

XGArmor_LevelIIIMediumAir

File: XComGame.upk as viewed in UE Explorer

function Init()
{
    local XGInventorySlot kSlot;

    super.Init();
    kSlot = GetInventory().GetSlot(2);
    kSlot.SetSlotLocation(2);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(0);
    kSlot.SetSlotLocation(0);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(1);
    kSlot.SetSlotLocation(1);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(5);
    kSlot.SetSlotLocation(5);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(10);
    kSlot.SetSlotLocation(10);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(11);
    kSlot.SetSlotLocation(11);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(6);
    kSlot.SetSlotLocation(6);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(15);
    kSlot.SetSlotLocation(15);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    //return;
}
Default Values
m_eLevel=EArmorLevel.eLevel_III
m_eClass=EArmorClass.eClass_Medium
m_eType=EItemType.eItem_ArmorArchangel
m_strUIImage="CHH_Lv3_ICONS.CHH_Lv3MedMale_Armor_ICON"

File: XComGame.int

[XGArmor_LevelIIIMediumAir]
m_strName="Archangel Armor"
m_strNotes="The Archangel is capable of flight."

XGArmor_LevelIIIHeavy

File: XComGame.upk as viewed in UE Explorer

Nothing found.

File: XComGame.int

[XGArmor_LevelIIIHeavy]
m_strName="Golem Armor"
m_strNotes="The Golem is impervious to damage."

XGArmor_LevelIILight

File: XComGame.upk as viewed in UE Explorer

function Init()
{
    local XGInventorySlot kSlot;

    super.Init();
    kSlot = GetInventory().GetSlot(2);
    kSlot.SetSlotLocation(2);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(0);
    kSlot.SetSlotLocation(0);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(1);
    kSlot.SetSlotLocation(1);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(5);
    kSlot.SetSlotLocation(5);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(10);
    kSlot.SetSlotLocation(10);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(11);
    kSlot.SetSlotLocation(11);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(6);
    kSlot.SetSlotLocation(6);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(4);
    kSlot.SetSlotLocation(4);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(15);
    kSlot.SetSlotLocation(15);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    //return;
}
Default Values
m_eLevel=EArmorLevel.eLevel_II
m_eClass=EArmorClass.eClass_Light
m_eType=EItemType.eItem_ArmorSkeleton
m_strUIImage="CHH_Lv2_ICONS.CHH_Lv2LightMale_Armor_ICON"

File: XComGame.int

XGArmor_LevelIIMedium

File: XComGame.upk as viewed in UE Explorer

function Init()
{
    local XGInventorySlot kSlot;

    super.Init();
    kSlot = GetInventory().GetSlot(2);
    kSlot.SetSlotLocation(2);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(0);
    kSlot.SetSlotLocation(0);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(1);
    kSlot.SetSlotLocation(1);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(5);
    kSlot.SetSlotLocation(5);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(10);
    kSlot.SetSlotLocation(10);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(11);
    kSlot.SetSlotLocation(11);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(6);
    kSlot.SetSlotLocation(6);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(15);
    kSlot.SetSlotLocation(15);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    //return;
}
Default Values
m_eLevel=EArmorLevel.eLevel_II
m_eClass=EArmorClass.eClass_Medium
m_eType=EItemType.eItem_ArmorCarapace
m_strUIImage="CHH_Lv2_ICONS.CHH_Lv2MedMale_Armor_ICON"

File: XComGame.int

[XGArmor_LevelIIMedium]
m_strName="Carapace Armor"
m_strNotes="The Carapace Armor is both stronger and lighter than our conventional armor, allowing soldiers to carry more gear even as they withstand greater damage."

XGArmor_LevelIIHeavy

File: XComGame.upk as viewed in UE Explorer

Nothing found.

File: XComGame.int

[XGArmor_LevelIIHeavy]
m_strName="Heavy Carapace Armor"
m_strNotes="The Heavy Carapace Armor allows a soldier to withstand heavy damage while wielding two weapons at once.  Inventory and mobility, however, are severly restricted."

XGArmor_LevelILight

File: XComGame.upk as viewed in UE Explorer

function Init()
{
    local XGInventorySlot kSlot;

    super.Init();
    kSlot = GetInventory().GetSlot(2);
    kSlot.SetSlotLocation(2);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(0);
    kSlot.SetSlotLocation(0);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(5);
    kSlot.SetSlotLocation(5);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(11);
    kSlot.SetSlotLocation(11);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    //return;
}
Default Values
m_eLevel=EArmorLevel.eLevel_I
m_eClass=EArmorClass.eClass_Light
m_strUIImage="CHH_Lv2_ICONS.CHH_Lv2LightMale_Armor_ICON"

XGArmor_LevelIMedium

File: XComGame.upk as viewed in UE Explorer

function Init()
{
    local XGInventorySlot kSlot;

    super.Init();
    kSlot = GetInventory().GetSlot(2);
    kSlot.SetSlotLocation(2);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(0);
    kSlot.SetSlotLocation(0);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(1);
    kSlot.SetSlotLocation(1);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(5);
    kSlot.SetSlotLocation(5);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(6);
    kSlot.SetSlotLocation(6);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(11);
    kSlot.SetSlotLocation(11);
    kSlot.SetSize(2);
    kSlot.SetEnabled(false);
    kSlot = GetInventory().GetSlot(15);
    kSlot.SetSlotLocation(15);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    //return;
}
Default Values
m_eLevel=EArmorLevel.eLevel_I
m_eClass=EArmorClass.eClass_Medium
m_eType=EItemType.eItem_ArmorKevlar
m_strUIImage="CHH_Lv1_ICONS.CHH_Lv1MedMale_Armor_ICON"

File: XComGame.int

[XGArmor_LevelIMedium]
m_strName="Kevlar Body Armor"

XGArmor_Psionic

File: XComGame.upk as viewed in UE Explorer

function Init()
{
    local XGInventorySlot kSlot;

    super.Init();
    kSlot = GetInventory().GetSlot(2);
    kSlot.SetSlotLocation(2);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(0);
    kSlot.SetSlotLocation(0);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(1);
    kSlot.SetSlotLocation(1);
    kSlot.SetSize(4);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(5);
    kSlot.SetSlotLocation(5);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(6);
    kSlot.SetSlotLocation(6);
    kSlot.SetSize(2);
    kSlot.SetEnabled(true);
    kSlot = GetInventory().GetSlot(11);
    kSlot.SetSlotLocation(11);
    kSlot.SetSize(2);
    kSlot.SetEnabled(false);
    kSlot = GetInventory().GetSlot(15);
    kSlot.SetSlotLocation(15);
    kSlot.SetSize(1);
    kSlot.SetEnabled(true);
    //return;
}
Default Values
m_eLevel=EArmorLevel.eLevel_III
m_eClass=EArmorClass.eClass_Light
m_eType=EItemType.eItem_ArmorPsi
m_strUIImage="CHH_Lv3_ICONS.CHH_PsionicMale_Armor_ICON"

File: XComGame.int

[XGArmor_Psionic]
m_strName="Psionic"
m_strNotes="Bring powers of the mind to the battlefield."

XGLoadoutMgr

XGLoadoutMgr.TLoadout

Variables
class<XGArmor> Armor
class<XGInventoryItem> Items[21]
array< class<XGInventoryItem> > Backpack
Default Values
Armor=none
Items=none
Items[1]=none
Items[2]=none
Items[3]=none
Items[4]=none
Items[5]=none
Items[6]=none
Items[7]=none
Items[8]=none
Items[9]=none
Items[10]=none
Items[11]=none
Items[12]=none
Items[13]=none
Items[14]=none
Items[15]=none
Items[16]=none
Items[17]=none
Items[18]=none
Items[19]=none
Items[20]=none
Backpack=none

XGLoadoutMgr.ConvertTInventoryToSoldierLoadout

XGTacticalGameCore

XGTacticalGameCore.BuildArmors

simulated function BuildArmors()
{
    local TConfigArmor A;

    // End:0x1D7
    foreach default.Armors(A,)
    {
        BuildArmor(A.iType, A.iHPBonus, A.iDefenseBonus, A.iFlightFuel, A.iWillBonus, A.iLargeItems, A.iSmallItems, A.iMobilityBonus, A.ABILITIES[0], A.ABILITIES[1], A.ABILITIES[2], A.Properties[0], A.Properties[1], A.Properties[2], A.Properties[3]);        
    }    
    //return;    
}

XGTacticalGameCore.BuildArmor

simulated function BuildArmor(int iType, int iHPBonus, int iDefenseBonus, int iFlightFuel, int iWillBonus, int iLargeItems, int iSmallItems, int iMobilityBonus, optional XGTacticalGameCoreData.EAbility eAbility1, optional XGTacticalGameCoreData.EAbility eAbility2, optional XGTacticalGameCoreData.EAbility eAbility3, optional XGTacticalGameCoreData.EArmorProperty eProperty1, optional XGTacticalGameCoreData.EArmorProperty eProperty2, optional XGTacticalGameCoreData.EArmorProperty eProperty3, optional XGTacticalGameCoreData.EArmorProperty eProperty4)
{
    local TArmor kArmor;

    kArmor.strName = GetLocalizedItemName(byte(iType));
    kArmor.iType = iType;
    kArmor.iHPBonus = iHPBonus;
    kArmor.iDefenseBonus = iDefenseBonus;
    kArmor.iFlightFuel = iFlightFuel;
    kArmor.iWillBonus = iWillBonus;
    kArmor.iLargeItems = iLargeItems;
    kArmor.iSmallItems = iSmallItems;
    kArmor.iMobilityBonus = iMobilityBonus;
    ++ kArmor.aAbilities[eAbility1];
    ++ kArmor.aAbilities[eAbility2];
    ++ kArmor.aAbilities[eAbility3];
    ++ kArmor.aProperties[eProperty1];
    ++ kArmor.aProperties[eProperty2];
    ++ kArmor.aProperties[eProperty3];
    ++ kArmor.aProperties[eProperty4];
    class'XComMCP'.static.RegisterItemType(kArmor.strName, iType);
    m_arrArmors[iType] = kArmor;
    //return;    
}

XGTacticalGameCoreData

XGTacticalGameCoreData.EAbility

Please see wiki article: XGTacticalGameCoreData.EAbility

XGTacticalGameCoreData.EArmorProperty

The following properties appear on Armors: as the "eAP_" prefix (denoting eArmorProperties) suggests.

From: XGTacticalGameCoreData.EArmorProperty (File=XComGame.upk \ XGTacticalGameCoreData \ Enumerations \ EArmorProperty).


XGTacticalGameCoreData.EWeaponProperty

The following properties appear on Weapons: as the "eWP_" prefix (denoting eWeaponProperties) suggests.

From: XGTacticalGameCoreData.EWeaponProperty (File=XComGame.upk \ XGTacticalGameCoreData \ Enumerations \ EWeaponProperty).


XGTacticalGameCoreNativeBase

XGTacticalGameCoreNativeBase.TArmor

Variables
string strName
int iType
int aAbilities[EAbility]
int aProperties[EArmorProperty]
int iHPBonus
int iDefenseBonus
int iFlightFuel
int iWillBonus
int iLargeItems
int iSmallItems
int iMobilityBonus
Default Values
strName=""
iType=0
aAbilities=0
aAbilities[1]=0
aAbilities[2]=0
aAbilities[3]=0
aAbilities[4]=0
aAbilities[5]=0
aAbilities[6]=0
aAbilities[7]=0
aAbilities[8]=0
aAbilities[9]=0
aAbilities[10]=0
aAbilities[11]=0
aAbilities[12]=0
aAbilities[13]=0
aAbilities[14]=0
aAbilities[15]=0
aAbilities[16]=0
aAbilities[17]=0
aAbilities[18]=0
aAbilities[19]=0
aAbilities[20]=0
aAbilities[21]=0
aAbilities[22]=0
aAbilities[23]=0
aAbilities[24]=0
aAbilities[25]=0
aAbilities[26]=0
aAbilities[27]=0
aAbilities[28]=0
aAbilities[29]=0
aAbilities[30]=0
aAbilities[31]=0
aAbilities[32]=0
aAbilities[33]=0
aAbilities[34]=0
aAbilities[35]=0
aAbilities[36]=0
aAbilities[37]=0
aAbilities[38]=0
aAbilities[39]=0
aAbilities[40]=0
aAbilities[41]=0
aAbilities[42]=0
aAbilities[43]=0
aAbilities[44]=0
aAbilities[45]=0
aAbilities[46]=0
aAbilities[47]=0
aAbilities[48]=0
aAbilities[49]=0
aAbilities[50]=0
aAbilities[51]=0
aAbilities[52]=0
aAbilities[53]=0
aAbilities[54]=0
aAbilities[55]=0
aAbilities[56]=0
aAbilities[57]=0
aAbilities[58]=0
aAbilities[59]=0
aAbilities[60]=0
aAbilities[61]=0
aAbilities[62]=0
aAbilities[63]=0
aAbilities[64]=0
aAbilities[65]=0
aAbilities[66]=0
aAbilities[67]=0
aAbilities[68]=0
aAbilities[69]=0
aAbilities[70]=0
aAbilities[71]=0
aAbilities[72]=0
aAbilities[73]=0
aAbilities[74]=0
aAbilities[75]=0
aAbilities[76]=0
aAbilities[77]=0
aAbilities[78]=0
aAbilities[79]=0
aAbilities[80]=0
aAbilities[81]=0
aAbilities[82]=0
aAbilities[83]=0
aAbilities[84]=0
aAbilities[85]=0
aAbilities[86]=0
aAbilities[87]=0
aAbilities[88]=0
aProperties=0
aProperties[1]=0
aProperties[2]=0
aProperties[3]=0
aProperties[4]=0
aProperties[5]=0
aProperties[6]=0
aProperties[7]=0
aProperties[8]=0
iHPBonus=0
iDefenseBonus=0
iFlightFuel=0
iWillBonus=0
iLargeItems=0
iSmallItems=0
iMobilityBonus=0

XGTacticalGameCoreNativeBase.TInventory

Default Values
iArmor=0
iPistol=0
arrLargeItems=0
arrLargeItems[1]=0
arrLargeItems[2]=0
arrLargeItems[3]=0
arrLargeItems[4]=0
arrLargeItems[5]=0
arrLargeItems[6]=0
arrLargeItems[7]=0
arrLargeItems[8]=0
arrLargeItems[9]=0
arrLargeItems[10]=0
arrLargeItems[11]=0
arrLargeItems[12]=0
arrLargeItems[13]=0
arrLargeItems[14]=0
arrLargeItems[15]=0
iNumLargeItems=0
arrSmallItems=0
arrSmallItems[1]=0
arrSmallItems[2]=0
arrSmallItems[3]=0
arrSmallItems[4]=0
arrSmallItems[5]=0
arrSmallItems[6]=0
arrSmallItems[7]=0
arrSmallItems[8]=0
arrSmallItems[9]=0
arrSmallItems[10]=0
arrSmallItems[11]=0
arrSmallItems[12]=0
arrSmallItems[13]=0
arrSmallItems[14]=0
arrSmallItems[15]=0
iNumSmallItems=0
arrCustomItems=0
arrCustomItems[1]=0
arrCustomItems[2]=0
arrCustomItems[3]=0
arrCustomItems[4]=0
arrCustomItems[5]=0
arrCustomItems[6]=0
arrCustomItems[7]=0
arrCustomItems[8]=0
arrCustomItems[9]=0
arrCustomItems[10]=0
arrCustomItems[11]=0
arrCustomItems[12]=0
arrCustomItems[13]=0
arrCustomItems[14]=0
arrCustomItems[15]=0
iNumCustomItems=0

Details


File Changes





Localization Changes

None should be required.


References

Referred to by this article:


That refer to this article:



For your convenience, here are the current subject Category Names and their primary locations.

  • Category:XCOM
    • Category:Game Files & Modding - XCOM:EU 2012
    • Category:XCOM Modding
      • Category:Enum Values XCOM Modding
      • Category:Functions XCOM Modding
        • Category:XGTacticalGameCoreData
    • Category:XCOM Mods

Remove the above list once your article is complete. The actual category links appear below. Just remove those that do not apply: