Jump to content

Changing Armor Models to Kevlar


Ogachi

Recommended Posts

I've been messing about in the defaultcontent.ini for some time in efforts to make the base models of all armors look like the base Kevlar armor. I have found how to change armor Deco kits and even make it so GM soldiers wear base armor, but still no dice one what I'm trying to accomplish. Here's what I've tried so far:

 

First I had the idea to do the same process that I did for the GM soldiers to turn their armor into base armor. I changed the UnitPackageInfo

Ex.

UnitPackageInfo=(PawnType=ePawnType_Male_2_Carapace,ArchetypeName="Soldier_MaleCarapace.ARC_MaleCarapace")

INTO

UnitPackageInfo=(PawnType=ePawnType_Male_2_Carapace,ArchetypeName="Soldier_MaleKevlar.ARC_MaleKevlar")

 

This only accomplished making all my soldiers invisible, so I scrapped the idea.

 

I also tried changing the Deco's as follows:

Ex.

ArmorDeco=(Armor=eItem_ArmorSkeleton,ArmorKit=eKit_Deco_Skeleton0)

INTO

ArmorDeco=(Armor=eItem_ArmorSkeleton,ArmorKit=eKit_Deco_Kevlar0)

 

This worked n that the decos for Skeleton became the Kevlar decos, but this did not change the base model as intended.

 

I tried changing the Armor Kits, but this only achieved the result listed in the Deco above.

Ex.

ArmorKits=(Armor=eItem_ArmorSkeleton,Weapon=eItem_AssaultRifle,ArmorKit=eKit_AssaultRifle_Skeleton)

INTO

ArmorKits=(Armor=eItem_ArmorSkeleton,Weapon=eItem_AssaultRifle,ArmorKit=eKit_AssaultRifle_Kevlar)

 

Finally and last, I tried to change the ArmorKitsPackageInfo and no dice.

Ex.

ArmorKitPackageInfo=(KitType=eKit_AssaultRifle_Skeleton,ArchetypeName="Kit_AssaultRifle_II_Light.ARC_Kit_AssaultRifle_II_Light")

INTO
ArmorKitPackageInfo=(KitType=eKit_AssaultRifle_Kevlar,ArchetypeName="Kit_AssaultRifle_I_Light.ARC_Kit_AssaultRifle_I_Light")

 

So, I'm out of ideas. Again, just to clarify, I am -not- trying to change the armor deco models. I am trying to change the base, default model of the armor into the base, default model of the Kevlar armor.

 

Anyone got any ideas or help?

Link to comment
Share on other sites

  • 7 months later...

Hello there Ogachi. I asked the same question as you, in troubleshooting section. Then I stated to search the forums to find my answer and found it!

 

http://forums.nexusmods.com/index.php?/topic/1210765-enemy-within-discovery-thread/page-11

 

As you can see, Amineri posted it. We have to change XGBattleDesc.BuildSoldierContent yet I don't have the knowledge to do it.

kContent.iPawn = MapSoldierToPawn(kTransfer.kChar.kInventory.iArmor, kTransfer.kSoldier.kAppearance.iGender, class'XComPerkManager'.static.HasAnyGeneMod(kTransfer.kChar.aUpgrades));

What we need to change, how will we do it? Will it effect every armor or do we have to specify each armor? I have absolutely no idea.

 

All I wanted is to change Psi armor into Titan :tongue:

Link to comment
Share on other sites

  • 2 weeks later...

Bumping to say it would be awesome if I could figure out how to make all the armor variants in long war appear identical (ie tac vest uses tac armor model, kestrel aurora and phalanx use the carapace model...) If I could do that then I wouldn't even need the military texture pack to make me happy.

Link to comment
Share on other sites

  • 1 month later...

I did some research on the topic because I personally hate the Skeleton Armor (Corsair in LW) on females due to the long-neck disease (the armor model was probably scaled incorrectly as it appears smaller than other armors, thus leading to bad visuals).

Changing UnitPackageInfo is, in fact, a right way to go. It correctly does the trick for all non-tactical game purposes and the armor is correctly replaced in the barracks. However, as original poster had noticed, soldiers in swapped armor vanish from tactical missions.

This happens due to hardcoded class assignment function: XGCharacter_Soldier.GetPawnClass(). It describes bindings between PawnType (those "ePawnType_Male_2_Carapace" etc. you see in DefaultContent.ini) and the armor classes. Now, here's the thing: ALL ARMORS BELONG TO DIFFERENT CLASSES in XCOM (with the exception of sleeveless variants, which has the same class as non-sleeveless ones), so when you try to bind a different archetype to a PawnType in the .ini, the tactical game gets correct archetype name (the one that you changed), but a wrong class. Hence, it can't find the archetype, hence it can't create an actor, hence the soldier simply doesn't appear in tactical missions.

So to correctly change how your armors look, you need to mod XComGame.upk and change the aforemented function to return correct armor classes. For example, Skeleton Armor has 'XComMaleLevelIILight' (or 'Female', respectively) class, and when you change the .ini binding for it, you also must change this class to a corresponding one.

Fortunately, the function is simple enough to change it (it's basically a big switch(pawnType){} operator). For example, I made the following little mod for personal usage:

 

 

MOD_NAME=No Skeleton Armor
AUTHOR=just_dont
DESCRIPTION=Makes Skeleton Armor (ugly long neck on females) change its class to Ghost Armor, so that you can swap it in DefaultContent.ini

UPK_FILE=XComGame.upk

OBJECT=XGCharacter_Soldier.GetPawnClass:AUTO
[BEFORE_CODE]
0F 01 EB B7 00 00 20 D0 5F 00 00
[AFTER_CODE]
0F 01 EB B7 00 00 20 CA 5F 00 00
[BEFORE_CODE]
0F 01 EB B7 00 00 20 30 56 00 00
[AFTER_CODE]
0F 01 EB B7 00 00 20 2A 56 00 00

And DefaultContent.ini changes, basically completely removing Skeleton Armor from appearing in the game:

UnitPackageInfo=(PawnType=ePawnType_Male_2_Skeleton,ArchetypeName="Soldier_MaleSkeleton.ARC_MaleSkeleton")
UnitPackageInfo=(PawnType=ePawnType_Male_2_Skeleton_GM,ArchetypeName="Soldier_MaleSkeleton_GM.ARC_MaleSkeleton_GM")
UnitPackageInfo=(PawnType=ePawnType_Female_2_Skeleton,ArchetypeName="Soldier_FemaleSkeleton.ARC_FemaleSkeleton")
UnitPackageInfo=(PawnType=ePawnType_Female_2_Skeleton_GM,ArchetypeName="Soldier_FemaleSkeleton_GM.ARC_FemaleSkeleton_GM")

to

UnitPackageInfo=(PawnType=ePawnType_Male_2_Skeleton,ArchetypeName="Soldier_MaleGhost.ARC_MaleGhost")
UnitPackageInfo=(PawnType=ePawnType_Male_2_Skeleton_GM,ArchetypeName="Soldier_MaleGhost_GM.ARC_MaleGhost_GM")
UnitPackageInfo=(PawnType=ePawnType_Female_2_Skeleton,ArchetypeName="Soldier_FemaleGhost.ARC_FemaleGhost")
UnitPackageInfo=(PawnType=ePawnType_Female_2_Skeleton_GM,ArchetypeName="Soldier_FemaleGhost_GM.ARC_FemaleGhost_GM")

and

ArmorDeco=(Armor=eItem_ArmorSkeleton,ArmorKit=eKit_Deco_Skeleton0) / corsair
ArmorDeco=(Armor=eItem_BEGIN_ARMOR,ArmorKit=eKit_Deco_Skeleton0)  ; light skeleton / Banshee

to

ArmorDeco=(Armor=eItem_ArmorSkeleton,ArmorKit=eKit_Deco_Ghost0) / corsair
ArmorDeco=(Armor=eItem_BEGIN_ARMOR,ArmorKit=eKit_Deco_Ghost0)  ; light skeleton / Banshee

 

 

 

I don't have any intentions to make it into a "proper" mod, but you can use the same approach to edit appearances as you like.

 

PS: You can change sleeveless armor ("_GM" entries in .ini) to its corresponding normal variant without any HEX-editing, and it'll work.

PPS: This post is applicable to Long War mod. I don't know if the same approach would work on unmodded EW.

Edited by just_dont_do_it
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...