Jump to content

Need help with a mod to customize the "Heroes"


thestoryteller01

Recommended Posts

I wanted to use the cheat heroes as sqaud leaders for an Ironman Long War game (just the chars without their special armor and weapons) but I strongly disliked the idea of an an all-male all-white elite, so I decided to tinker around.

 

After a good start I thought it would probably be worth a mod offering a few bunches of customized heroes but I am stuck atm.

 

Giving them different names/nicknames was the easiest part and I also found a simple way to give all heroes (except for Chris Kluwe) heads of my choice through the DefaultContent.ini. Since the heads are racially tied they come with the appropriate skin colour 1 which is automatically used for bare arms/hands (no idea why though).

 

I also found a brutal backdoor to get rid of Walker's Fedora but I can't seem to find a way to change the hairstyles/helmets not to mention gender.

 

if anyone who has allready looked into this could give me some advice I'd be grateful.

Link to comment
Share on other sites

I think you can define everything in XComStrategyGame.upk, class XGCustomizeUI, function CreateEasterEggCharacter:

function CreateEasterEggCharacter(XGCustomizeUI.EEasterEggCharacter eChar)
{
    local TInventory kLoadout;

    m_kSoldier.m_eEasterEggChar = eChar;
    m_kSoldier.m_kSoldier.kAppearance.iArmorDeco = -1;
    m_kSoldier.m_kSoldier.kAppearance.iArmorTint = -1;
    switch(eChar)
    {
        case 1:
            m_kSoldier.m_kSoldier.strNickName = SuperSoldierNickNames[0];
            m_kSoldier.m_kSoldier.kAppearance.iGender = 1;
            m_kSoldier.m_kSoldier.kAppearance.iRace = 0;
            m_kSoldier.m_kSoldier.kAppearance.iHead = 107;
            m_kSoldier.m_kSoldier.kAppearance.iHaircut = -1;
            m_kSoldier.m_kSoldier.kAppearance.iFacialHair = -1;
            m_kSoldier.m_kSoldier.kAppearance.iSkinColor = 3;
            m_kSoldier.m_kSoldier.iCountry = 0;
            m_kSoldier.m_kSoldier.kAppearance.iFlag = 0;
            m_kSoldier.m_kSoldier.kAppearance.iLanguage = 0;
            m_kSoldier.m_kSoldier.kAppearance.iVoice = BARRACKS().m_kCharGen.GetNextMaleVoice(0, false);
            m_kSoldier.ClearPerks();
            m_kSoldier.m_kSoldier.iRank = 7;
            m_kSoldier.SetSoldierClass(3);
            m_kSoldier.GivePerk(44);
            m_kSoldier.GivePerk(31);
            m_kSoldier.GivePerk(91);
            m_kSoldier.GivePerk(56);
            m_kSoldier.GivePerk(52);
            m_kSoldier.GivePerk(53);
            m_kSoldier.GivePerk(55);
            m_kSoldier.m_kChar.bHasPsiGift = true;
            m_kSoldier.m_bPsiTested = true;
            m_kSoldier.m_kSoldier.iPsiRank = 3;
            m_kSoldier.GivePerk(68);
            m_kSoldier.GivePerk(70);
            m_kSoldier.GivePerk(72);
            m_kSoldier.GivePerk(73);
            m_kSoldier.m_kChar.aStats[0] = 20;
            m_kSoldier.m_kChar.aStats[7] = 200;
            m_kSoldier.m_kChar.aStats[1] = 100;
            m_kSoldier.m_kChar.aStats[13] = 0;
            STORAGE().ReleaseLoadout(m_kSoldier);
            STORAGE().AddItem(65);
            STORAGE().AddItem(15);
            STORAGE().AddItem(13);
            kLoadout.iArmor = 65;
            kLoadout.iPistol = 13;
            TACTICAL().TInventoryLargeItemsSetItem(kLoadout, 0, 15);
            LOCKERS().ApplySoldierLoadout(m_kSoldier, kLoadout);
            break;
<snip>
Link to comment
Share on other sites

Thanks for the information!

 

So instead of editing an existing easter egg soldier I could also use one as ablueprint, create a new one with a "case 7" entry within the .upk and add it into the XcomStrategyGame.int, like p.e.

 

SuperSoldierFirstNames[7]=Ellen
SuperSoldierLastNames[7]=Ripley
SuperSoldierNickNames[7]=Survivior

 

Would that work?

Link to comment
Share on other sites

I think so. Also you would need to add more entries to:

enum EEasterEggCharacter
{
    eEEC_None,
    eEEC_Sid,
    eEEC_Ken,
    eEEC_Otto,
    eEEC_Joe,
    eEEC_Carter,
    eEEC_Chris,
    eEEC_MAX
};

in XGCustomizeUI class and update function GetEasterEggChar().

Edited by Drakous79
Link to comment
Share on other sites

I allready looked into the tutorials on editing a .upk file and honestly I'm not sure I'm up for hex-editing O_o

Link to comment
Share on other sites

  • Recently Browsing   0 members

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