OpenXcom Forum

OpenXcom => Open Feedback => Topic started by: Searmay on July 21, 2016, 08:13:49 pm

Title: Infiltration mission looping
Post by: Searmay 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 (https://www.ufopaedia.org/index.php/Alien_Infiltration).

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.
Title: Re: Infiltration mission looping
Post by: Hobbes 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 (https://www.ufopaedia.org/index.php/Alien_Infiltration).

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.
Title: Re: Infiltration mission looping
Post by: Searmay 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.
Title: Re: Infiltration mission looping
Post by: Starving Poet 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.
Title: Re: Infiltration mission looping
Post by: Warboy1982 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? ;)
Title: Re: Infiltration mission looping
Post by: ivandogovich 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.
Title: Re: Infiltration mission looping
Post by: Searmay 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.
Title: Re: Infiltration mission looping
Post by: Arthanor 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..
Title: Re: Infiltration mission looping
Post by: Surrealistik on July 25, 2016, 03:23:20 am
The recurring missions are great for farming.
Title: Re: Infiltration mission looping
Post by: Warboy1982 on July 26, 2016, 03:33:17 am
they also build bases periodically as a result