Jump to content

Very confused with UPK modding


Recommended Posts

I have the UPKUTILS and Patcher. I know how to install mods but can't figure out how to create pseudocode. 

I dropped XcomstrategyGame.upk on the DecompressLZO and then open it in UE-Explorer. I can see the object I want to edit, but don't know how to get that translated for PatcherGUI. 

Maybe I am mistaken but in XGStratgeyAI there is a function which I believe controls the research hit/taxation on conquered alien base. I know you can modify the bonus research in the .Ini file but this is for the purpose of an ongoing game where completion is not the intent. More a means to extend the longevity of what will essentially be an endless campaign. I can get the Aliens down to 15 bonus AR naturally without tampering, but I would like to get them to around 0 as I know without bases the growth for that becomes virtually non-existent. 

Basically just want to toggle this to -30 for one base assault. I've been reading all the threads about the UPK and UE-explorer but I can't figure out how to translate the code from the UPK to something the patcher understands. I tried dropping the decompressed UPK on HextoPsuedoCode but it does nothing. Sorry I have chronic ADD so it's possible I'm just being really dumb here lol. Appreciate any help.    

function CostTest()
{
    local TAlienSquad kSquad;

    Country(m_iAlienMonth).m_bSecretPact = false;
    World().m_iNumCountriesLost -= 1;
    STAT_AddStat(20, -1);
    // End:0xE0
    if(Country(m_iAlienMonth).HasSatelliteCoverage())
    {
        Continent(Country(m_iAlienMonth).GetContinent()).SetSatelliteCoverage(m_iAlienMonth, true);
    }
    Country(m_iAlienMonth).BeginPaying();
    // End:0x19A
    if(Country(m_iAlienMonth).GetEntity() != none)
    {
        Country(m_iAlienMonth).HideEntity(true);
        Country(m_iAlienMonth).GetEntity().Destroy();
    }
    GEOSCAPE().Alert(GEOSCAPE().MakeAlert(24, 1));
    STAT_AddStat(2, -15);
    //return;    
}

Link to comment
Share on other sites

PS. In my other campaign I managed to get them to 0 bonus AR in the second year and this worked well as I could play the game for the next year or so without them exceeding 650 AR. I think it was 600 at the end of the 2nd year. Trying to replicate this in my current game. Kind of got shafted with terror missions this run and so they got an early advantage. 

Failing all this I suppose I could just edit the baseline bonus AR in the ini to be -15 which is what I need to zero their bonus AR. I just thought this would be a more organic solution. I don't really feel bad about that as they kept hitting me with double terror missions in the span of 2 days. I figure that was mostly dodgy strategy rng so why not tax them 15 bonus AR lol. 

 

Link to comment
Share on other sites

Well that was a pretty silly idea to begin with. It wasn't all that much effort to farm a few extra alien bases to get them back into the negatives. I'm glad I did it this way instead of cheesing it. I have enough Meld to create an army of Mecs lol. 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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