LW 1.4 and Retaliations

Share strategy and tips here.
Post Reply
deducter
Posts: 43
Joined: Wed Jan 18, 2017 3:47 am

LW 1.4 and Retaliations

Post by deducter »

Is anyone familiar with exactly how retaliations work in LW 1.4? In 1.2, assuming no faceless, you could always have 4 rebels working in a haven and never suffer from retaliation. But now, is there any sort of threshold for either the job-specific retaliation or full haven retaliations? Or could you have either retaliation even if you have just one rebel working a job?

Also, hiding supposedly has an effect on lowering vigilance. What exactly is this effect?
Dwarfling
Posts: 524
Joined: Wed Jan 25, 2017 12:16 pm

Re: LW 1.4 and Retaliations

Post by Dwarfling »

The rebel limit doesn't work anymore, I had a Recruit retal happen in a region with 4 rebels on recruit and no faceless (Strenght 5 I believe). What I think happens is that all the rebels working on an ADVENT region have a chance of being detected (depends on Alert and Strenght). When a rebel gets detected, it adds a point into a Retaliation bucket for the job the rebel was doing and a point into a Full Retaliation bucket. When a bucket gets full, the retaliation just happens, and it hits one of you "busier" regions, which I guess it's a balance of Strenght, Vigilance and number of rebels working. Then the bucket for that retaliation empties and the process starts again, althought you get a "free of retal" cooldown in the region.

Oh and the retaliations got harder, so you really don't want them happening if you can help it, except Intel Raid. Haven't done a Supply Convoy or Terror yet, but Recruit retal, besides scaling RNFs, has you wait another extra 4 turns to evac your soldiers after you evac the recruiters. Haven Defense has escaling RNFs up the wazoo and less time to find your rebels, plus the Faceless menace. Intel Raid remains the same with the addition of a RNF pod, tho it's still a dice roll on whether your rebels can stay alive.

Strategically speaking ( 8-) ), it means you should set a haven in a region with high Strenght into full hiding and hope the strenght moves away, which does happen because hiding actually does something (reduces vigilance). Working there comes at a risk.
deducter
Posts: 43
Joined: Wed Jan 18, 2017 3:47 am

Re: LW 1.4 and Retaliations

Post by deducter »

Thank for confirming that now even one rebel working could potentially spawn a retaliation, although the odds are lower to hit that particular region as long as you have other active regions with working rebels.

Do you know what the rules are with regards to retaliation cooldowns, both miniretals and full haven retals? Do they share the same cooldown or different ones? Are these global or regional cooldowns? Assume two regions.

Region A experiences a datatap retal. Is there a guaranteed period of time in which Region A cannot experience the same datatap retal again? What about a haven defense retal? If you have rebels working in region B, is there a guaranteed period of time in which region B is also safe from either the datatap retal, the full haven retal, or both?

Region A experiences a full haven retal. Similarly, is there a guranteed period in which Region A cannot experience either retal? What about region B?
trihero
Posts: 1099
Joined: Sun Jan 01, 2017 7:01 am

Re: LW 1.4 and Retaliations

Post by trihero »

Different cooldowns, I got hit back to back one day was a full retal into an intel raid the next day. The buckets fill independently for full/mini retal. I think the cooldown is 20 or so days for each type of retal; I've never been hit by the same retal type twice in a supply period.
Tuhalu
Posts: 433
Joined: Wed Feb 01, 2017 9:02 pm

Re: LW 1.4 and Retaliations

Post by Tuhalu »

The calculation for Vigilance is:

defaultTime + ((maxWorkingRebels - baselineWorkers) - emptySlots)/baselineWorkers * maxVigilanceDecayHours

defaultTime is 168 hours (7 days)
maxWorkingRebels is 13
baselineWorkers is 9
emptySlots is maxWorkingrebels - workingRebels
maxVigilanceDecayHours is 72 hours (3 days)

The practical effect is that you lose 1 vigilance in the region per 7 days at 9 rebels working. For every rebel more or less that number goes up or down by 8 hours. So with 13 working rebels it's 8 days and 8 hours, while at 0 working rebels it's 4 days.

You could also phrase that as hiding is worth 8 hours per rebel, as long as you don't count forced hiding (anything past 13 rebels).
Tuhalu
Posts: 433
Joined: Wed Feb 01, 2017 9:02 pm

Re: LW 1.4 and Retaliations

Post by Tuhalu »

Here is some information about how the game adds to the retaliation buckets.

Every rebel working on a job for a whole day (and therefore generating utility for you) has a chance to be detected. This chance increases based on difficulty, the number of faceless in the region, the amount of vigilance in the region, the amount of alert/advent strength in the region and the current force level.

The formula looks like:

Detection Chance = JOB_DETECTION_CHANCE + #ofFaceless * JOB_DETECTION_CHANCE_BONUS_PER_FACELESS + VigilanceLevel * JOB_DETECTION_CHANCE_BONUS_PER_VIGILANCE + AlertLevel * JOB_DETECTION_CHANCE_BONUS_PER_ALERT + ForceLevel * JOB_DETECTION_CHANCE_BONUS_PER_FORCE

Code: Select all

; This is the chance ADVENT detects a rebel doing a non-hiding job each day (by difficulty level). If successful, the buckets for retaliations get a little more full.
JOB_DETECTION_CHANCE[0]=40
JOB_DETECTION_CHANCE[1]=50
JOB_DETECTION_CHANCE[2]=55
JOB_DETECTION_CHANCE[3]=60

; These are regional modifiers to the detection chance for each roll
JOB_DETECTION_CHANCE_BONUS_PER_FACELESS[0]=5
JOB_DETECTION_CHANCE_BONUS_PER_FACELESS[1]=8
JOB_DETECTION_CHANCE_BONUS_PER_FACELESS[2]=10
JOB_DETECTION_CHANCE_BONUS_PER_FACELESS[3]=10

JOB_DETECTION_CHANCE_BONUS_PER_VIGILANCE[0]=1
JOB_DETECTION_CHANCE_BONUS_PER_VIGILANCE[1]=2
JOB_DETECTION_CHANCE_BONUS_PER_VIGILANCE[2]=2
JOB_DETECTION_CHANCE_BONUS_PER_VIGILANCE[3]=2

JOB_DETECTION_CHANCE_BONUS_PER_ALERT[0]=1
JOB_DETECTION_CHANCE_BONUS_PER_ALERT[1]=3
JOB_DETECTION_CHANCE_BONUS_PER_ALERT[2]=3
JOB_DETECTION_CHANCE_BONUS_PER_ALERT[3]=3

JOB_DETECTION_CHANCE_BONUS_PER_FORCE[0]=0
JOB_DETECTION_CHANCE_BONUS_PER_FORCE[1]=1
JOB_DETECTION_CHANCE_BONUS_PER_FORCE[2]=1
JOB_DETECTION_CHANCE_BONUS_PER_FORCE[3]=1
Each time the check succeeds, it adds 1 to the bucket for that job and the full retaliation bucket. These checks are even made for rebels in liberated regions!

Every bucket has a different size. Once this size is passed, a retaliation occurs (somewhere).

Code: Select all

; Minimum number of Rebel-Days on these jobs globally to trigger a raid
INTEL_RAID_BUCKET=325
SUPPLY_RAID_BUCKET=275
RECRUIT_RAID_BUCKET=250

COIN_BUCKET=500
However, when testing to see if you've filled the bucket, it applies modifiers first. The formula looks something like:

EffectiveDays = ActualDays * (CONTACTED_REGIONS_BASE_BUCKET_MOD^(contactedRegions-1))*(LIBERATED_REGIONS_BASE_BUCKET_MOD^(liberated regions))

Liberated regions count as both contacted regions and liberated regions, so liberated regions help reduce retaliation rates more than contacted regions.

Code: Select all

[LW_Overhaul.X2LWActivityCondition_FullOutpostJobBuckets]
CONTACTED_REGIONS_BASE_BUCKET_MOD=0.85			; this lowers the accumulated rebel job-days to throttle back retaliation rate as resistance spreads. Formula is ActualDays * (this number ^ (contacted regions - 1))
LIBERATED_REGIONS_BASE_BUCKET_MOD=0.85			; this further lowers the accumulated rebel job-days to throttle back retaliation rate. a Formula is ActualDays * (this number ^ liberated regions)
So if you want to reduce retaliations, you have two paths.

1/ You can reduce the number of Rebels working on a Job to reduce the speed at which that bucket fills and/or reduce the overall number of working rebels to reduce the speed at which the full retaliation bucket fills.
2/ You can contact more regions and liberate more regions so that it takes longer to fill the buckets. Each additional region contacted makes the pool take about 17.6% longer to fill than before. A liberated region makes it take 38.4% longer to fill.
Last edited by Tuhalu on Wed May 24, 2017 8:57 am, edited 1 time in total.
deducter
Posts: 43
Joined: Wed Jan 18, 2017 3:47 am

Re: LW 1.4 and Retaliations

Post by deducter »

Thanks Tuhalu, both your posts are extremely enlightening. Having your rebels not work seems to have quite a significant effect on vigilance decay.

It's very interesting that having rebels work in high vigilance and high alert regions will really fill up the retal bucket fast. This makes expanding and having your rebels work in low alert/vigilance regions even more important. Hiding rebels in high alert/vigilance regions should help significantly decrease the rate of getting retals.

Are there any minimum alert/vigilance requirements for a retal to happen? For instance, I've never seen a datatap retal on a region with less than 3 alert, and never seen a haven retal in a region less than 4 alert, but that could simply be due to small sample size.
Tuhalu
Posts: 433
Joined: Wed Feb 01, 2017 9:02 pm

Re: LW 1.4 and Retaliations

Post by Tuhalu »

I believe retaliations are biased towards regions with high activity, but I haven't found the math for that yet.

Also, I forgot about this info

Code: Select all

; Regional cooldown
COIN_MIN_COOLDOWN_HOURS=504								; 1ce per month per region
COIN_MAX_COOLDOWN_HOURS=504								
ATTEMPT_COUNTERINSURGENCY_MIN_REBELS=5					; Min Population of Haven (so missions aren't bare of civvies to rescue)
ATTEMPT_COUNTERINSURGENCY_MIN_WORKING_REBELS = 3		; Min Population of Haven assigned jobs (allows hiding job to avoid retals)
COIN_BUCKET=500
Obviously the COIN_BUCKET is where I got the 500 days from. It looks like you can only have 1 of a certain type of retaliation in a single region in a month (the 21 day supply month!) due to the cooldown numbers.

Finally, it looks like you need at least 5 rebels in a region and at least 3 of them must be working for it to be a valid target for a retaliation.

So if you want to avoid retaliations in a region, it sounds like setting all but 2 rebels to hiding will do the job.

Edit: I missed this info. Looks like the mini-retaliations have a different bucket size than the regular retaliaitons.

Code: Select all

; Minimum number of Rebel-Days on these jobs globally to trigger a raid
INTEL_RAID_BUCKET=325
SUPPLY_RAID_BUCKET=275
RECRUIT_RAID_BUCKET=250
And here is some information about how many rebels will appear on min-retaliations, the minimum number that need to be on the job in a region to trigger it and the cooldown of each.

Code: Select all

; Rebel raid mission config
RAID_MISSION_MIN_REBELS=3
RAID_MISSION_MAX_REBELS=6
MIN_REBELS_TO_TRIGGER_INTEL_RAID=3			; Number of rebels on intel job to make this mission trigger
MIN_REBELS_TO_TRIGGER_SUPPLY_RAID=3			; Number of rebels on supply job to make this mission trigger
MIN_REBELS_TO_TRIGGER_RECRUIT_RAID=3		; Number of rebels on recruit job to make this mission trigger

INTEL_RAID_REGIONAL_COOLDOWN_HOURS_MIN=504
INTEL_RAID_REGIONAL_COOLDOWN_HOURS_MAX=672
SUPPLY_RAID_REGIONAL_COOLDOWN_HOURS_MIN=504
SUPPLY_RAID_REGIONAL_COOLDOWN_HOURS_MAX=672
RECRUIT_RAID_REGIONAL_COOLDOWN_HOURS_MIN=604
RECRUIT_RAID_REGIONAL_COOLDOWN_HOURS_MAX=672
PROHIBITED_JOB_DURATION = 21;			days
Icarus
Posts: 151
Joined: Thu Apr 06, 2017 12:26 pm

Re: LW 1.4 and Retaliations

Post by Icarus »

So what exactly am I to do with a very high strength region? I don't really want vigilance to decay as vigilance slows Avatar, and I want forces to stay there and not move to my other regions.

AND I don't want my rebels to just sit on their asses doing nothing, but I don't want them working for the enemy by rapidly filling the retal buckets.

Btw.: did I understand that right: a high strength region can fill the bucket faster and increase my chances on a retal in a DIFFERENT region?
Tuhalu
Posts: 433
Joined: Wed Feb 01, 2017 9:02 pm

Re: LW 1.4 and Retaliations

Post by Tuhalu »

It's more accurate to say a high strength/vigilance region fills the bucket faster on average.

Also, it has been suggested that advent tend to hit high activity regions more often.

The thing is, as the campaign progresses, you're getting effects from force level and faceless as well, which is going to push the chance of buckets filling towards 100% per rebel. At which point it doesn't matter much if the region is high strength or vigilance.
boblikesoup
Posts: 5
Joined: Tue May 30, 2017 11:45 am

Re: LW 1.4 and Retaliations

Post by boblikesoup »

I've been doing a lot of missions in regions with 6-12 rebels on intel without ever hiding on commander difficulty. It's 3.5 months in now, have 5 regions (last two were only in last month), and nowhere has ever gone above Advent Strength 2. Is this a bug? The game is so easy now. I've liberated one region and been doing a lot of Smash & Grabs (which as I recall don't increase Advent Strength).

To be honest I've read a lot about Vigilance, etc... and most of the mechanics go over my head. I wish there was some sort of in-game UI that let us know what's happening.
bilfdoffle
Long War 2 Crew
Posts: 30
Joined: Fri Jan 20, 2017 6:26 pm

Re: LW 1.4 and Retaliations

Post by bilfdoffle »

boblikesoup wrote:To be honest I've read a lot about Vigilance, etc... and most of the mechanics go over my head. I wish there was some sort of in-game UI that let us know what's happening.
There's a mod for that:
[LW2 Information Display] ( https://steamcommunity.com/sharedfiles/ ... =925598042 ),
Daergar
Posts: 93
Joined: Mon Dec 28, 2015 7:47 pm

Re: LW 1.4 and Retaliations

Post by Daergar »

boblikesoup wrote:I've been doing a lot of missions in regions with 6-12 rebels on intel without ever hiding on commander difficulty. It's 3.5 months in now, have 5 regions (last two were only in last month), and nowhere has ever gone above Advent Strength 2. Is this a bug? The game is so easy now. I've liberated one region and been doing a lot of Smash & Grabs (which as I recall don't increase Advent Strength).

To be honest I've read a lot about Vigilance, etc... and most of the mechanics go over my head. I wish there was some sort of in-game UI that let us know what's happening.
That sounds horribly weird, especially on commander? I'm doing a veteran run and pushing/rushing hard into research and doing almost every single mission that's not insanely short on time.

I'm going toe to toe easily with the xenos filth so far, ahead of the curve as was the goal, but advent strength in the first one to four regions as I was going at it? 6 or 7 across the board. I believe I caught a glimpse of strength 2 in the Avenger's rear-view mirror as it flickered by, but that's about it.
deducter
Posts: 43
Joined: Wed Jan 18, 2017 3:47 am

Re: LW 1.4 and Retaliations

Post by deducter »

I wonder if there's special strategic AI that makes ADVENT entrench to defend the Avatar project if things are going poorly for them. In my commander campaign, I have liberated two regions, and ran all sorts of missions in the regions around the liberated areas for perhaps 2 months, but I rarely see strength go up past 3 or 4. I haven't been stopping supply raids, but I have been fairly diligent about doing troop columns. Also, I must have detected something like 5-6 troop columns by August 15; these missions do not seem that hard to get.

By mid-August I have an alert level of Severe with about 20% Avatar progress reduction. In my 8 contacted regions (2 liberated) I counted 20ish out of 50 Advent legions, leaving the bulk of ADVENT forces in the remaining regions. I just contacted a region next to the black site and it has 7 strength! From a strategic perspective, it makes a lot of sense for the aliens to fortify all Avatar-related sites if they feel like the rebellion is starting to get out of hand. After all, this is their win condition.
Tuhalu
Posts: 433
Joined: Wed Feb 01, 2017 9:02 pm

Re: LW 1.4 and Retaliations

Post by Tuhalu »

deducter wrote:I wonder if there's special strategic AI that makes ADVENT entrench to defend the Avatar project if things are going poorly for them. In my commander campaign, I have liberated two regions, and ran all sorts of missions in the regions around the liberated areas for perhaps 2 months, but I rarely see strength go up past 3 or 4. I haven't been stopping supply raids, but I have been fairly diligent about doing troop columns. Also, I must have detected something like 5-6 troop columns by August 15; these missions do not seem that hard to get.

By mid-August I have an alert level of Severe with about 20% Avatar progress reduction. In my 8 contacted regions (2 liberated) I counted 20ish out of 50 Advent legions, leaving the bulk of ADVENT forces in the remaining regions. I just contacted a region next to the black site and it has 7 strength! From a strategic perspective, it makes a lot of sense for the aliens to fortify all Avatar-related sites if they feel like the rebellion is starting to get out of hand. After all, this is their win condition.
I'm not sure about the specific strategic AI that decides these things.

Anecdotally, I can also relate a number of campaign starts where ADVENT heavily reinforced regions with the Golden Path mission. You get a similar effect with ADVENT piling up in a region adjacent to a liberated region.
Antifringe
Posts: 226
Joined: Tue Jan 24, 2017 9:52 pm

Re: LW 1.4 and Retaliations

Post by Antifringe »

Look at X2LWActivityCreation_Reinforce.uc (it should be in your src folder). A lot of the AI that determines where to send troops is contained in there. Among other things, the AI likes to pile troops on Golden Path sites and likes to reinforce regions adjacent to Golden Path sites.

The comments are amusing:

Code: Select all

	foreach DestRegionState.LinkedRegions(OrigRegionRef)
	{
		OrigRegionState = XComGameState_WorldRegion(History.GetGameStateForObjectID(OrigRegionRef.ObjectID));
		//`LWTRACE ("Reinforcements Origin Testing of" @ OrigRegionState.GetMyTemplate().DisplayName);

		OrigRegionalAI = class'XComGameState_WorldRegion_LWStrategyAI'.static.GetRegionalAI(OrigRegionState, NewGameState);
		if (OrigRegionalAI == none)
		{
			`REDSCREEN ("FindBestReinforceOrigRegion: No Regional AI for" @ OrigRegionState.GetMyTemplate().DisplayName);
			continue;
		}

		// nothing to give
		if (OrigRegionalAI.bLiberated || (OrigRegionalAI.LocalAlertLevel - GetNumReinforceActivitiesOriginatingInRegion(OrigRegionRef) < 2))
			continue;

		foreach History.IterateByClassType(class'XComGameState_LWAlienActivity', ActivityState)
		{
			// No, you're reinforcing me, jerk!
			if (ActivityState.GetMyTemplateName() == 'Reinforce' && OrigRegionState.GetReference() == Activitystate.PrimaryRegion && DestRegionState.GetReference() == ActivityState.SecondaryRegions[0])
				continue;

			// Shut up; I'm invading
			if (ActivityState.GetMyTemplateName() == 'Invasion' && OrigRegionState.GetReference() == ActivityState.SecondaryRegions[0])
				continue;
		}

		// if the rebels are in range of a plot site, I'm staying right here
		foreach History.IterateByClassType(class'XComGameState_MissionSite', MissionState)
		{
			if (MissionState.GetMissionSource().DataName == 'MissionSource_Blacksite' || MissionState.GetMissionSource().DataName == 'MissionSource_Forge')
			{
				if (MissionState.Region == OrigRegionState.GetReference() && OrigRegionState.ResistanceLevel > eResLevel_Unlocked && OrigRegionalAI.LocalAlertLevel < 9)
					continue;
			}
			if (MissionState.GetMissionSource().DataName == 'MissionSource_PsiGate')
			{
				if (MissionState.Region == OrigRegionState.GetReference() && OrigRegionState.ResistanceLevel >= eResLevel_Unlocked && OrigRegionalAI.LocalAlertLevel < 16)
					continue;
			}
		}
		
		// Do I have any to spare
		CurrentDelta = OrigRegionalAI.LocalAlertLevel - GetDesiredAlertLevel (OrigRegionState) - GetNumReinforceActivitiesOriginatingInRegion(OrigRegionRef);
		
		// Is the situation dire that I should send someone anyway, I'll see what I can spare -- if it's not so bad here or I got a bunch
		If (CurrentDelta < 1 && (CurrentDelta >= -3 || OrigRegionalAI.LocalAlertLevel > 8))
		{
			DestRegionalAI = class'XComGameState_WorldRegion_LWStrategyAI'.static.GetRegionalAI(DestRegionState);
			// How bad is it in the destination
			if (DestRegionalAI.LocalAlertLevel - GetDesiredAlertLevel (DestRegionState) - GetNumReinforceActivitiesOriginatingInRegion(DestRegionState.GetReference()) <= -3)
			{
				// Set us beneath any origins who actually can spare some help but still leave reinfs possible
				CurrentDelta = 0.5;
			}
		}
		
		//`LWTRACE ("FindBestReinforceOrigRegion:" @ OrigRegionState.GetMyTemplate().DisplayName @ "Scores" @ string (Currentdelta) @ "wrt forces to spare");
		if(CurrentDelta > 0 && CurrentDelta > BiggestDelta)
		{
			BestOrigRegionState = OrigRegionState;
			BiggestDelta = CurrentDelta;
		}
	}
	
	return BestOrigRegionState;
}
This is only a partial quote, BTW. There's a lot more in there.
Icarus
Posts: 151
Joined: Thu Apr 06, 2017 12:26 pm

Re: LW 1.4 and Retaliations

Post by Icarus »

That implies there is a soft timer on critical missions using the strength, in that the story missions get progressively harder through legion piling the longer the campaign runs. Is that right?
Antifringe
Posts: 226
Joined: Tue Jan 24, 2017 9:52 pm

Re: LW 1.4 and Retaliations

Post by Antifringe »

Icarus wrote:That implies there is a soft timer on critical missions using the strength, in that the story missions get progressively harder through legion piling the longer the campaign runs. Is that right?
Not really. The AI distributes legions according to how many legions a region has versus what its vigilance is. It wants those numbers to be the same everywhere, but doesn't usually have the resources to make that happen. Things like the Golden Path areas and exposed HQs add a few points of "virtual vigilance" to those regions, but that's it.

In a broad sense, everything is on a soft timer, since ADVENT is generally making more legions than you can destroy and so everything gradually gets harder.
boblikesoup
Posts: 5
Joined: Tue May 30, 2017 11:45 am

Re: LW 1.4 and Retaliations

Post by boblikesoup »

Daergar wrote:
boblikesoup wrote:I've been doing a lot of missions in regions with 6-12 rebels on intel without ever hiding on commander difficulty. It's 3.5 months in now, have 5 regions (last two were only in last month), and nowhere has ever gone above Advent Strength 2. Is this a bug? The game is so easy now. I've liberated one region and been doing a lot of Smash & Grabs (which as I recall don't increase Advent Strength).

To be honest I've read a lot about Vigilance, etc... and most of the mechanics go over my head. I wish there was some sort of in-game UI that let us know what's happening.
That sounds horribly weird, especially on commander? I'm doing a veteran run and pushing/rushing hard into research and doing almost every single mission that's not insanely short on time.

I'm going toe to toe easily with the xenos filth so far, ahead of the curve as was the goal, but advent strength in the first one to four regions as I was going at it? 6 or 7 across the board. I believe I caught a glimpse of strength 2 in the Avenger's rear-view mirror as it flickered by, but that's about it.
I've been taking every mission with almost all intel in regions that are staying at Advent strength 1. Then a new zone I contact (2 away from black site) was strength 3 then quickly went up to 4 while I was just recruiting without missions.

Before the last patch all regions escalated to 6-7 pretty quickly.
Frei_Ninjesus
Posts: 35
Joined: Thu Mar 16, 2017 2:15 pm

Re: LW 1.4 and Retaliations

Post by Frei_Ninjesus »

It'd be really useful to have an in-game log for the strategic section that shows the dates of important events, such as when you liberated a region, when a dark event went active, when a rebel was recruited, etc. I think it'd be a good QOL to help with having an idea on when to expect retaliations or invasions. You could have that info by counting days or by setting up a spreadsheet I suppose but that would make it very tedious, at least for me.
Post Reply