Jump to content

Storms over former XCOM members | Controlling abductions


Drakous79

Recommended Posts

^

^

auch..

I didn't notice that it was suppose to be in the "XComStrategyGame.upk"

 

And, yeah. you're right. It seems the hex code are changed.

I can't find it. I'm using notepad ++ right now.

I'll try to use UE Explorer next. Already read some of it but haven't tried it yet.

 

Thanks for replying.

And I'll stay tuned for your update.

 

Good luck with your mod.

Link to comment
Share on other sites

  • Replies 99
  • Created
  • Last Reply

Top Posters In This Topic

Patch 5 - 07 C0 00 19 00 88 43 00 00 0A 00 76 24 00 00 00 1B 24 11 00 00 00 00 00 00 16

EW - 07 C0 00 19 00 13 51 00 00 0A 00 41 2B 00 00 00 1B 33 14 00 00 00 00 00 00 16

 

Change 07 to 06 :)

Link to comment
Share on other sites

It is very nice of you Drakous, you saved me a bit of trouble here (but it looks like I might still need to update code for increased number of abductions). Anyway, thanks for keeping up this mod alive (definitely was a game changer for me here, even before all other awesome discoveries, which were also made in this very thread).

Link to comment
Share on other sites

The code changed a bit for EU Patch 5 and EW.

function int GetNumAbductionSites()
{
    return 3;
}

XCOM EU Patch 5 - 4B 42 00 00 AB 1F 00 00 00 00 00 00 4A 42 00 00 00 00 00 00 00 00 00 00 4B 42 00 00 00 00 00 00 9F 01 00 00 26 2E 00 00 0E 00 00 00 0A 00 00 00 04 2C 03

 

XCOM EW - B2 4F 00 00 94 25 00 00 00 00 00 00 B1 4F 00 00 00 00 00 00 00 00 00 00 B2 4F 00 00 00 00 00 00 A7 01 00 00 79 2F 00 00 0E 00 00 00 0A 00 00 00 04 2C 03

 

03 is number of abduction sites.

 

 

And to get more buttons at abduction selection (UIMissionControl_AbductionSelection):

 

XCOM EU Patch 5 - 07 30 00 81 19 01 42 FB FF FF 0B 00 97 FF FF FF 00 1C 69 FD FF FF 4A 16 16 0F 01 88 0D 00 00 25 0F 00 90 0D 00 00 25 07 97 02 96 00 90 0D 00 00 2C 03

XCOM EW - 0F 01 01 10 00 00 35 2F 10 00 00 3B 10 00 00 00 00 19 1B 71 12 00 00 00 00 00 00 4A 16 09 00 46 45 00 00 00 01 46 45 00 00 0F 00 09 10 00 00 25 07 A4 02 96 00 09 10 00 00 2C 03

 

03 is number of buttons.

Edited by Drakous79
Link to comment
Share on other sites

Updated the first and the second post with hex codes relevant for EU P5 and EW.

Edited by Drakous79
Link to comment
Share on other sites

  • 3 weeks later...

Have you looked at all into the mechanic where the "blitz" causes auto-fail on the abductions not taken?

 

There was an idea in the Long War forums about being able to go take on each abduction in sequence. Since Long War adds the fatigue mechanic this would prevent the player from taking the same team on all abduction missions, which is probably about as close as we're going to get to having multiple Skyrangers :).

 

I was poking around at it's not at all clear to me but in XGStrategyAI.AddAbductionObjectives it appears that the abduction objectives are somehow linked:

    if(I < arrTargetCities.Length)
    {
        kTargetCity = CITY(arrTargetCities[I]);
        arrLinkedObjectives.AddItem(AIAddNewObjective(5, iStartDate, kTargetCity.GetCoords(), kTargetCity.GetCountry(), arrTargetCities[I]));
        ++ I;
        // [Loop Continue]
        goto J0x42;
    }
    foreach arrLinkedObjectives(kObjective,)
    {
        kObjective.m_arrSimultaneousObjs = arrLinkedObjectives;        
    } 

I'm wondering if this were re-written to simple add each objective individually perhaps completing one abduction wouldn't cause the others to be automatically failed.

Link to comment
Share on other sites

Amineri, haven't looked into the mechanic.

 

 

Doing all abductions is cool idea, but getting all rewards may cause some inbalance. Could it be better with randomized rewards (like SW High Stakes)?

 

 

Places arrSimultaneousObjs is used - as I understand the code:

  • XGStrategyAI.AddAbductionObjectives - The array is filled with contents of arrLinkedObjectives array, which is filled by XGStrategyAI.AIAddNewObjective function. Number of added objectives depends on number of target cities.
  • XGStrategyAI.OnObjectiveEnded - Calls XGStrategyAI.CheckForAbductionBlitz, if the last mission was successful and its objective was eObjective_Abduct.
  • XGStrategyAI.ClearFromAbductionList - Targets, that left XCOM or are planned for terror mission are cleared from abduction list. There's a loop going through m_arrObjectives array and if all conditions are met, a target is pushed into arrRemove array. Another loop goes through arrRemove array, and eventually removes the target from m_arrSimultaneousObjs array. This loop calls XGStrategyAI.CheckForAbductionBlitz too.

Imagine a situation, when are abductions already planned and you accuse wrong country of harboring EXALT base and it leaves. Or if the game fails LATE_UFO_CHANCE roll in XGStrategyAI.AddLateMission and randomly selects terror mission to a country already planned for abduction. In such cases, the game uses ClearFromAbductionList.

 

At this point I think m_arrSimultaneousObjs array is just a helper for not working SW The Blitz. Its description says: "The aliens will target a larger number of cities every time they launch an abduction attack.". Sounds good, though I was unable to locate a code responsible for incrementing the number of abduction sites after each abduction wave.

  • XGStrategyAI.CheckForAbductionBlitz - Loops through arrAbductions array passed from m_arrSimultaneousObjs and sets bytes in arrTargetCities in case the last mission was successful. There's also the second loop which sets m_bAbductionLaunched = true. In the end is LaunchBlitz called, if there are more than 0 target cities.

Why to set city bytes or m_bAbductionLaunched? Could it be good to prevent a city from being abduction target numerous times?

 

 

Okay. Let's move on. I tracked part of abduction chain - XGStrategy.PostCombat >>> XGGeoscape.RemoveMission >>> XGStrategyAI.ApplyMissionPanic.

Function worth checking (or rewriting) is XGStraegy.PostCombat - see spoiler.

 

 

 

if(kMission.AllObjects('XGMission_FundingCouncil') && bSuccess)
{
<sniped switch>
    if(kMission.m_iMissionType == 2)
    {
        if(RewardIsValid(kMission.m_kReward))
        {
            kMission.m_kReward.iCountry = kMission.GetCountry();
            kMission.m_kReward.iCity = kMission.GetCity().m_iID;
            kSkyranger.CargoInfo.m_kReward = kMission.m_kReward;
        }
        if(!bSuccess)
        {
            kMission.GetContinent().m_kMonthly.iAbductionsFailed += 1;
        }
        I = GEOSCAPE().m_arrMissions.Length - 1;
        if(I >= 0) // [Loop If]
        {
            if(GEOSCAPE().m_arrMissions[I] == kMission)
            {
                eCont = byte(GEOSCAPE().m_arrMissions[I].GetContinent().GetID());
                GEOSCAPE().RemoveMission(kMission, bSuccess, false, kMission.m_kDesc.m_bIsFirstMission, arrContinents.Find(eCont) != -1);
                arrContinents.AddItem(eCont);
            }
            -- I;
            // [Loop Continue]
        }
        I = GEOSCAPE().m_arrMissions.Length - 1;
// This is the second loop. Try skipping this loop - buffer offset 0x00000DA0, hex 06 28 15 
        if(I >= 0) // [Loop If]
        {
            if(GEOSCAPE().m_arrMissions[I].m_iMissionType == 2)
            {
                eCont = byte(GEOSCAPE().m_arrMissions[I].GetContinent().GetID());
                GEOSCAPE().RemoveMission(GEOSCAPE().m_arrMissions[I], false, false, false, arrContinents.Find(eCont) != -1);
                arrContinents.AddItem(eCont);
            }
            -- I;
            // [Loop Continue]
        }
    }
<snip>
}

 

 

 

What has Funding Council to do with abductions? Where's code for failure?

 

Now good news. Remaining abductions aren't removed, if is the second loop entirely skipped. I've done all 3 abductions and most things like panic distribution and rewards worked. What failed was number of failed abduction missions in Council Report.

if(!bSuccess)
{
    kMission.GetContinent().m_kMonthly.iAbductionsFailed += 1;
}

Maybe it can be repaired by moving this conditional somewhere else.

 

Food for thoughts :smile:

Edited by Drakous79
Link to comment
Share on other sites

All of this is so incredible.

 

I really like the idea of this happening "2 of 3 large scouts shot down ... only 1 spawned abductor ignored ... 1 abduction site!" I believe this was a feature in Warspace I remember missing a UFO due to damages mounting and 1 abduction site still spawned. Made the strategy game so much more interesting.

 

And the idea of 3 abduction choices still happening if you don't have the available resources to shoot them all down. This adds so much variety and strategy for the player to micromanage. Weighing up abduction rewards vs extra panic in a country (adding more difficulty to panic management seems to be needed).

 

This is so much better than having every abduction available just to poorly simulate 2 or more skyrangers on top of dumbing down the reward options and added panic scenarios.

Link to comment
Share on other sites

 

 

Doing all abductions is cool idea, but getting all rewards may cause some inbalance. Could it be better with randomized rewards (like SW High Stakes)?

 

Definitely such a change by itself would just make the game easier. I'm more thinking of it as one component of a bigger set of changes. One such way to balance it would be to change the rewards, but also keep in mind that panic has to be balanced, as vanilla is roughly balanced around the concept of panic going down in 1 of 3 blitz targets and going up in the other 2.

 

If all three are beatable in sequence then there's nearly no panic pressure in vanilla. (as is demonstrated once satellites go up). Also it increases the rate of xp gain for soldiers as well as the collection of artifacts.

 

So definitely quite a few things to consider!

 

 

 

Now good news. Remaining abductions aren't removed, if is the second loop entirely skipped. I've done all 3 abductions and most things like panic distribution and rewards worked. What failed was number of failed abduction missions in Council Report.

 

That definitely is good news. The Council Report doesn't have any in-game effect other than to make the player feel bad or get a warm fuzzy, and it can likely be patched up.

 

For Long War I'm liking the idea of having just 1 Abduction mission per blitz early in the game, and increasing it to 2 and then 3 later in the game to put more pressure on both the interceptor fleet (trying to shoot down scouts and/or abductors) as well as the barracks (particularly when combined with the fatigue mechanic).

 

Since in Long War you can't send the same soldiers on the different abductions in a blitz (because of this fatigue system) it could mean some difficult choices about squad compositions in the later game.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...