Hyperplexed Posted May 19, 2016 Share Posted May 19, 2016 (edited) I dont imagine anyone will require something like this, but this was a problem that I had, and found a simple solution, so I'll just leave it here... The problem is, because the Alien Hunters DLC UPKs are cooked without editor supprt, we cannot for example, create a new part for the Alien Hunters armors, because those parts have set in the torso the required animations that need to those armors specific abilities, without them, the pawn will revert to a defaultish T-Pose (one of the arms doesnt, but thats because of the IK). Athough we can't access the assets directly, we can do so, in runtime, and here's how I did it: First part, content.INI setup: ;Placeholders to look for Alien Hunter suits Animations +BodyPartTemplateConfig=(PartType="Torso", TemplateName="AlienArchonSuitAnimations", ArchetypeName="DLC_2_IcarusSuit_GD.ARC_IcarusSuit_M", SpecializedType=true) +BodyPartTemplateConfig=(PartType="Torso", TemplateName="AlienBerserkerSuitAnimations", ArchetypeName="DLC_2_RageSuit_GD.ARC_RageSuit_M", SpecializedType=true) +BodyPartTemplateConfig=(PartType="Torso", TemplateName="AlienViperSuitAnimations", ArchetypeName="DLC_2_SerpentSuit_GD.ARC_SerpentSuit_M", SpecializedType=true) The keyhere is to use SpecializedType=true so they don't show up on the customization screens. And now the function (which you will need to adapt for your needs...) that allows for any Torso Archetype to be setup as one of the Alien Hunters armors: simulated function FindAlienHunterAnim(PawnContentRequest ContentRequest) { local name ArmorTemplate; local XComTorsoContent SuitContent; local array<AnimSet> SuitAnims; local int i; ArmorTemplate = ContentRequest.Template.ArmorTemplate; if (ArmorTemplate == 'LightAlienArmor') SuitContent = XComTorsoContent(`CONTENT.RequestGameArchetype(class'X2BodyPartTemplateManager'.static.GetBodyPartTemplateManager().FindUberTemplate("Torso", 'AlienViperSuitAnimations').ArchetypeName)); else if (ArmorTemplate == 'MediumAlienArmor') SuitContent = XComTorsoContent(`CONTENT.RequestGameArchetype(class'X2BodyPartTemplateManager'.static.GetBodyPartTemplateManager().FindUberTemplate("Torso", 'AlienArchonSuitAnimations').ArchetypeName)); else if (ArmorTemplate == 'HeavyAlienArmor') SuitContent = XComTorsoContent(`CONTENT.RequestGameArchetype(class'X2BodyPartTemplateManager'.static.GetBodyPartTemplateManager().FindUberTemplate("Torso", 'AlienBerserkerSuitAnimations').ArchetypeName)); if (SuitContent != none) { SuitAnims = SuitContent.UnitPawnAnimSets; for (i = 0; i < SuitAnims.Length; ++i) { X_TorsoContent.UnitPawnAnimSets.AddItem(SuitAnims[i]); `log(" -------------------------------------------------------------------------------- "); `log(" ----- ALIEN HUNTER SUIT:" @SuitAnims[i] $ " ----- "); `log(" -------------------------------------------------------------------------------- "); } } } Bear in mind that I wrote the function specifically for my mod, which is using X_TorsoContent instead of TorsoContent, because it extends XComHumanPawn. However, you don't need to do this, you should be able to rely on Screen Listeners, and run UpdateAnimations() after running a similar function. I'm only doing it because my work is almost 100% HumanPawn-centric. If you want to create new armor parts that use these abilities and/or animations, all you should need is 2-3 Screen Listeners to get the Pawn TorsoContent first, before running this. Edited May 19, 2016 by Hyperplexed Link to comment Share on other sites More sharing options...
Recommended Posts