Author Topic: Infiltration mission looping  (Read 6113 times)

Offline Searmay

  • Sergeant
  • **
  • Posts: 35
    • View Profile
Infiltration mission looping
« on: July 21, 2016, 08:13:49 pm »
I am struggling to understand why infiltration missions are set to loop. I noticed this playing X-Piratez, but the cause is in the main game code, and is obviously intentded. But as far as I can recall this was not the original behaviour, and it's not mentioned in the Ufopaedia entry.

But in Savegame/AlienMission.cpp it's explicitly special-cased:
Code: [Select]
bool AlienMission::isOver() const
{
if (_rule.getObjective() == OBJECTIVE_INFILTRATION)
{
https://Infiltrations continue for ever.
return false;
}

And later in AlienMission::think
Code: [Select]
https:// Infiltrations loop for ever.
_nextWave = 0;

Why was this introduced? It doesn't seem at all sensible - even if it was in the original I'd have thought it was a bug.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Infiltration mission looping
« Reply #1 on: July 21, 2016, 08:51:53 pm »
I am struggling to understand why infiltration missions are set to loop. I noticed this playing X-Piratez, but the cause is in the main game code, and is obviously intentded. But as far as I can recall this was not the original behaviour, and it's not mentioned in the Ufopaedia entry.

But in Savegame/AlienMission.cpp it's explicitly special-cased:
Code: [Select]
bool AlienMission::isOver() const
{
if (_rule.getObjective() == OBJECTIVE_INFILTRATION)
{
https://Infiltrations continue for ever.
return false;
}

And later in AlienMission::think
Code: [Select]
https:// Infiltrations loop for ever.
_nextWave = 0;

Why was this introduced? It doesn't seem at all sensible - even if it was in the original I'd have thought it was a bug.

My guess is that the alienMission needs to remain 'active' so that the infiltrated country doesn't start giving again money towards XCom.

Offline Searmay

  • Sergeant
  • **
  • Posts: 35
    • View Profile
Re: Infiltration mission looping
« Reply #2 on: July 21, 2016, 09:18:02 pm »
I considered that, and it might account for the first part where a mission is never considered "over", but not resetting the wave to 0 for it to run again.

I think it's unlikely anyway - each country has a "pact" flag which the "last" UFO sets to true, and it's only at that point that the mission is associated with a particular country rather than a region.

Offline Starving Poet

  • Colonel
  • ****
  • Posts: 265
    • View Profile
Re: Infiltration mission looping
« Reply #3 on: July 21, 2016, 10:40:03 pm »
That's the original behavior - I find it extra vicious in TFTD where your barracudas have a hard time even keeping up with the first wave USOs of an infiltration mission.   The odds of delaying the current mission to prevent the battleship spawns is pretty much impossible until you have the Mantas.

And I don't think it is / was to prevent them from funding again.   If I'm not mistaken, funding changes are simply percentage multipliers based off score in that country.  Once it's set to 0, it will stay zero.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Infiltration mission looping
« Reply #4 on: July 22, 2016, 01:05:45 am »
infiltration missions happen on a per-region basis, and they infiltrate one country at a time. there can be multiple countries in a single region. when the aliens invade europe, they need to infiltrate each country one at a time.

And I don't think it is / was to prevent them from funding again.   If I'm not mistaken, funding changes are simply percentage multipliers based off score in that country.  Once it's set to 0, it will stay zero.

what's 20% of 0? ;)

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: Infiltration mission looping
« Reply #5 on: July 22, 2016, 01:15:25 am »
What we are seeing is that the infiltrations continue to occur despite all of the countries being flipped already, or under the alien's influence.  i.e. the whole continent is gone, but the Missions don't stop.

Offline Searmay

  • Sergeant
  • **
  • Posts: 35
    • View Profile
Re: Infiltration mission looping
« Reply #6 on: July 24, 2016, 03:03:08 pm »
infiltration missions happen on a per-region basis, and they infiltrate one country at a time.
Yes. My question is: why? All the other missions are one-offs that happen over roughly a month. Okay, except base supply. Why would this be systematically repeated for the whole region? Never mind that it keeps repeating even after all countries have signed pacts as ivandogovich notes.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Infiltration mission looping
« Reply #7 on: July 24, 2016, 08:24:20 pm »
Why? Because it did that in the original game :P Infiltration occurred this way, repeating every month until every country in the region had fallen.

It should stop once all the countries have fallen though, I think..

Offline Surrealistik

  • Colonel
  • ****
  • Posts: 486
    • View Profile
Re: Infiltration mission looping
« Reply #8 on: July 25, 2016, 03:23:20 am »
The recurring missions are great for farming.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Infiltration mission looping
« Reply #9 on: July 26, 2016, 03:33:17 am »
they also build bases periodically as a result