[INI] CovertnessValue & CovertnessWeight

Post Reply
Franzy
Posts: 69
Joined: Thu Apr 06, 2017 9:05 am

[INI] CovertnessValue & CovertnessWeight

Post by Franzy »

I've been delving into ini-files, specifically XComLW_InfiltrationSettings.ini. Every piece of equipment has two values assigned to define its impact on infiltration time, for example
+ItemCategoryCovertness=(CategoryName="ammo", CovertnessValue=100f, CovertnessWeight=0.2f)
+ItemCategoryCovertness=(CategoryName="utility", CovertnessValue=100f, CovertnessWeight=0.2f)
+ItemCategoryCovertness=(CategoryName="heal", CovertnessValue=95f, CovertnessWeight=0.2f)
+WeaponCategoryCovertness=(CategoryName="cannon", CovertnessValue=168f, CovertnessWeight=1.0f)
+WeaponCategoryCovertness=(CategoryName="sniperrifle", CovertnessValue=110f, CovertnessWeight=1.0f)

So I was wondering what CovertnessValue and CovertnessWeight are and how they interact with each other. My guess is total covertness is defined as sum of each piece of equipment's (value*weight) divided by the summ of weights. Am I right?
Antifringe
Posts: 226
Joined: Tue Jan 24, 2017 9:52 pm

Re: [INI] CovertnessValue & CovertnessWeight

Post by Antifringe »

Funny, because I started looking at those recently myself.

So, covertnessweight and covertnesssvalue get multiplied together to give you a final "covertness score." It may seem weird to not just have a single number for this, but it makes sense from a design standpoint. Here are the covertnessvalues for certain classes of object:

Primary Weapons: 1
Armor: 2
Items: 0.2

The covertnessweight varies from item to item, but it's clear that they used 100 as the "average in class" value and went from there. So an average object always has a weight of 100, without having to worry about what kind of item it is exactly, and the covertnessvalue kicks in later to makes sure that armors, weapons, and items have the correct general balance.

The gear modifier to your infiltration time is determined by the average of each soldiers total value*weight. I found that a score of 360 (a ranger with a rifle and 3 grenades gets this score, for example) gives you a modifier of 0. Going up adds to this, going down subtracts. The effect is non-linear and I haven't figured out the exact formula yet.

Note that the timer is affected by the average. If you take a single ranger with 3 items, you get an equipment mod of zero. If you take five similar rangers, you also get an equipment mod of zero. So the time isn't determined by the total weight brought at all.

With only one solider, the effects of minor equipment changes are huge. If you strip that ranger of his grenades, his equipment modifier goes all the way down to -13. That's 4.5 hours per grenade! When I first saw that, I thought "Holy crap, I am adding several days to the timer by taking grenades on all of my soldiers!" But like I said, it's the average that matters. With five rangers, each grenade counted for less than an hour, and I only got back to the -13 hour mod when all grenades were removed from all soldiers.

The squad size modifier is complicated. Multipliers below one seem to multiply against the base time (6 days for most missions) only, but size multipliers above one seem to multiply against the entire timer (eg base + equipment mods). So for five men or less (e.g. when the size multiplier is one or less), each grenade carried by all of your soldiers costs about 4.5 hours, and this doesn't get discounted. But at size six and above, equipment starts to cost more per unit weight.

Suppressors multiply your soldier's total value by some number (.85 for normal, .75 for elite, IIRC). They are very good. My Ranger with full gear went from 0 to -7 with an elite suppressor, and all the way down to -17 if she also left the grenades behind. But keep in mind that equipment time mod is determined by the average soldier, so if you are only using a suppressor on one guy out of a size six squad, you'll barely notice any effect. If you put it on all of them, the effect will be huge.

I also found that there is no inherent effect for class. A shinobi using a rifle and three items has a theoretical score of 360, which is the same as a fully laden ranger, and sure enough, they both get the same 0 hour modifier if measured (in practice, shinobis will have lower scores because they default to the lighter SMG and also because some of their perk give a suppressor-like multiplier). Gunners and grenadiers are harder to infiltrate because the cannon and the launcher are heavy. They end up getting almost the same score, and I couldn't measure any difference between in game (they have a time mod of +9 hours with full gear, and +4 hours if fully stripped).

A neat thing I discovered: grenadiers don't take additional infiltration penalties for the grenade in their grenade only slot. They effectively get it for free, as far as infiltration is concerned (it still counts against their mobility, of course).
Last edited by Antifringe on Thu May 18, 2017 8:47 pm, edited 1 time in total.
Antifringe
Posts: 226
Joined: Tue Jan 24, 2017 9:52 pm

Re: [INI] CovertnessValue & CovertnessWeight

Post by Antifringe »

Some take aways:

Fiddling with you soldiers' gear doesn't make much of a difference for larger squads unless you fiddle with everyone's gear.

The lowest modifier you can get without perks is -17 hours (no items, SMG weapon, non-Gunner, non-Grenadier, elite suppressor). You'll only get this number in game if ALL of your soldiers are kitted out like this. Easy for one man missions, more daunting for ten man platoons.

Suppressors belong on gunners and grenadiers, where they save you the most covertness weight. They are actually less effective on shinobis, since they usually carry SMGs and frequently have other bonus from their perks (you'll probably still want supressors to lower you detection radius, but if all you care about is infiltration time, your shinobis should generally get last priority).
Tuhalu
Posts: 433
Joined: Wed Feb 01, 2017 9:02 pm

Re: [INI] CovertnessValue & CovertnessWeight

Post by Tuhalu »

Antifringe wrote:Some take aways:

Fiddling with you soldiers' gear doesn't make much of a difference for larger squads unless you fiddle with everyone's gear.

The lowest modifier you can get without perks is -17 hours (no items, SMG weapon, non-Gunner, non-Grenadier, elite suppressor). You'll only get this number in game if ALL of your soldiers are kitted out like this. Easy for one man missions, more daunting for ten man platoons.

Suppressors belong on gunners and grenadiers, where they save you the most covertness weight. They are actually less effective on shinobis, since they usually carry SMGs and frequently have other bonus from their perks (you'll probably still want supressors to lower you detection radius, but if all you care about is infiltration time, your shinobis should generally get last priority).
You're forgetting about some things:
  • The Chameleon Suit: Like an empty item slot it has 0 CovertnessValue, but instead of 0.2 weight it has 0.75 weight. This will cause a reduction in hours above what you get for an empty slot.
  • Light Armor (Spider Suit, Wraith Suit): Has 96 CovertnessValue (instead of 100), giving you a small reduction in hours.
  • Psi-Amp: These have a significantly lower CovertnessValue than normal (as equipment, not as a weapon), making Psi Ops sneakier than other classes by default.
Put all 3 of those together and you'll have super stealthy soldiers even beyond what -17 hours does. Of course, the Psi-Amp is competing with Shinobi perks, but we are only talking about Equipment based modifiers here.
Antifringe
Posts: 226
Joined: Tue Jan 24, 2017 9:52 pm

Re: [INI] CovertnessValue & CovertnessWeight

Post by Antifringe »

Since we're getting into details, there are a few other weird trends.

SMGs actually get stealthier (in terms of infiltration) with increasing tech tier. No other primary weapon does this. This makes updating your SMGs a priority, even if you don't intend to actually fire them.

PsiAmps also get better covernessvalues with tech. No other secondary weapon does this.

The Gunner's combat knife is actually the most covert non-psionic secondary weapon, but this is offset by the cannon's numbers, resulting in a final score comparable to a grenadier (although a grenadier has the option of using an SMG and the gunner does not).

You know what, I'll just post the data
Spoiler: show
;-----------------------------------------------------
;----------- BEGIN ABILITY COVERTNESS DEFS -----------
;-----------------------------------------------------

+AbilityCovertness=(AbilityName="Infiltrator", SquadMultiplier=0.85) ; Officer ability
+AbilityCovertness=(AbilityName="Tradecraft", IndividualMultiplier=0.80); Shinobi ability
+AbilityCovertness=(AbilityName="Ghostwalker", IndividualMultiplier=0.98); Shinobi ability
+AbilityCovertness=(AbilityName="Covert", IndividualMultiplier=0.97); Shinobi ability

;------------------------------------------------------------
;----------- BEGIN ITEM CATEGORY COVERTNESS DEFS ------------
;------------------------------------------------------------
; Used to define defaults for lots of items at once

EMPTY_UTILITY_SLOT_WEIGHT=0.2f;

+ItemCategoryCovertness=(CategoryName="weapon", CovertnessValue=100f, CovertnessWeight=1.0f)
+ItemCategoryCovertness=(CategoryName="armor", CovertnessValue=100f, CovertnessWeight=2.0f)

+ItemCategoryCovertness=(CategoryName="upgrade", CovertnessValue=0f, CovertnessWeight=0.0f)
+ItemCategoryCovertness=(CategoryName="combatsim", CovertnessValue=0f, CovertnessWeight=0.0f)

+ItemCategoryCovertness=(CategoryName="ammo", CovertnessValue=100f, CovertnessWeight=0.2f)
+ItemCategoryCovertness=(CategoryName="utility", CovertnessValue=100f, CovertnessWeight=0.2f)
+ItemCategoryCovertness=(CategoryName="heal", CovertnessValue=95f, CovertnessWeight=0.2f)
+ItemCategoryCovertness=(CategoryName="defense", CovertnessValue=100f, CovertnessWeight=0.2f)
+ItemCategoryCovertness=(CategoryName="plating", CovertnessValue=105f, CovertnessWeight=0.2f)
+ItemCategoryCovertness=(CategoryName="psidefense", CovertnessValue=100f, CovertnessWeight=0.2f)
+ItemCategoryCovertness=(CategoryName="psioffense", CovertnessValue=100f, CovertnessWeight=0.2f)
+ItemCategoryCovertness=(CategoryName="grenade", CovertnessValue=100f, CovertnessWeight=0.2f)
+ItemCategoryCovertness=(CategoryName="tech", CovertnessValue=100f, CovertnessWeight=0.2f)
+ItemCategoryCovertness=(CategoryName="skulljack", CovertnessValue=100f, CovertnessWeight=0.2f)

; shouldn't come up, but just in case
+ItemCategoryCovertness=(CategoryName="schematic", CovertnessValue=0f, CovertnessWeight=0f)
+ItemCategoryCovertness=(CategoryName="goldenpath", CovertnessValue=0f, CovertnessWeight=0f)
+ItemCategoryCovertness=(CategoryName="resource", CovertnessValue=0f, CovertnessWeight=0f)
+ItemCategoryCovertness=(CategoryName="mission", CovertnessValue=0f, CovertnessWeight=0f)
+ItemCategoryCovertness=(CategoryName="unlimited", CovertnessValue=0f, CovertnessWeight=0f)
+ItemCategoryCovertness=(CategoryName="quest", CovertnessValue=0f, CovertnessWeight=0f)

;------------------------------------------------------------
;--------- BEGIN WEAPON CATEGORY COVERTNESS DEFS ------------
;------------------------------------------------------------
; Used to define default for more specific weapon categories
; If this is defined it overrides more general ItemCategory covertness values

+WeaponCategoryCovertness=(CategoryName="cannon", CovertnessValue=168f, CovertnessWeight=1.0f)
+WeaponCategoryCovertness=(CategoryName="sniperrifle", CovertnessValue=110f, CovertnessWeight=1.0f)

+WeaponCategoryCovertness=(CategoryName="sword", CovertnessValue=100f, CovertnessWeight=0.5f)
+WeaponCategoryCovertness=(CategoryName="holotargeter", CovertnessValue=80f, CovertnessWeight=0.5f)
+WeaponCategoryCovertness=(CategoryName="gauntlet", CovertnessValue=100f, CovertnessWeight=0.5f)
+WeaponCategoryCovertness=(CategoryName="combatknife", CovertnessValue=50f, CovertnessWeight=0.5f)
+WeaponCategoryCovertness=(CategoryName="arcthrower", CovertnessValue=100f, CovertnessWeight=0.5f)
+WeaponCategoryCovertness=(CategoryName="grenade_launcher", CovertnessValue=185f, CovertnessWeight=0.5f)
+WeaponCategoryCovertness=(CategoryName="gremlin", CovertnessValue=100f, CovertnessWeight=0.5f)
+WeaponCategoryCovertness=(CategoryName="sparkbit", CovertnessValue=100f, CovertnessWeight=0.5f)
+WeaponCategoryCovertness=(CategoryName="sawedoffshotgun", CovertnessValue=100f, CovertnessWeight=0.5f)
+WeaponCategoryCovertness=(CategoryName="psiamp", CovertnessValue=100f, CovertnessWeight=0.5f)

+WeaponCategoryCovertness=(CategoryName="pistol", CovertnessValue=100f, CovertnessWeight=0.2f)

;-----------------------------------------------------
;----------- BEGIN GEAR COVERTNESS DEFS --------------
;-----------------------------------------------------
; Used to define covertness per individual item type
; If this is defined it overrides more general ItemCategory/WeaponCategory covertness values

+EquipmentCovertness=(ItemName="SMG_CV", CovertnessValue=80f, CovertnessWeight=1f)
+EquipmentCovertness=(ItemName="SMG_LS", CovertnessValue=76f, CovertnessWeight=1f)
+EquipmentCovertness=(ItemName="SMG_MG", CovertnessValue=72f, CovertnessWeight=1f)
+EquipmentCovertness=(ItemName="SMG_CG", CovertnessValue=68f, CovertnessWeight=1f)
+EquipmentCovertness=(ItemName="SMG_BM", CovertnessValue=60f, CovertnessWeight=1f)

+EquipmentCovertness=(Itemname="ChameleonSuit", CovertnessValue=0f, CovertnessWeight=0.75f)
+EquipmentCovertness=(Itemname="FreeKillUpgrade_Bsc", CovertnessValue=0f, CovertnessWeight=0.30f)
+EquipmentCovertness=(Itemname="FreeKillUpgrade_Adv", CovertnessValue=0f, CovertnessWeight=0.525f)
+EquipmentCovertness=(Itemname="FreeKillUpgrade_Sup", CovertnessValue=0f, CovertnessWeight=0.75f)

+EquipmentCovertness=(Itemname="LightPlatedArmor", CovertnessValue=96f, CovertnessWeight=2.0f)
+EquipmentCovertness=(Itemname="HeavyPlatedArmor", CovertnessValue=110f, CovertnessWeight=2.0f)
+EquipmentCovertness=(Itemname="LightPoweredArmor", CovertnessValue=92f, CovertnessWeight=2.0f)
+EquipmentCovertness=(Itemname="HeavyPoweredArmor", CovertnessValue=110f, CovertnessWeight=2.0f)

+EquipmentCovertness=(Itemname="SparkArmor", CovertnessValue=150f, CovertnessWeight=2.0f)
+EquipmentCovertness=(Itemname="PlatedSparkArmor", CovertnessValue=150f, CovertnessWeight=2.0f)
+EquipmentCovertness=(Itemname="PoweredSparkArmor", CovertnessValue=150f, CovertnessWeight=2.0f)

+EquipmentCovertness=(Itemname="PsiAmp_CV", CovertnessValue=50f, CovertnessWeight=0.5f)
+EquipmentCovertness=(Itemname="PsiAmp_MG", CovertnessValue=40f, CovertnessWeight=0.5f)
+EquipmentCovertness=(Itemname="PsiAmp_BM", CovertnessValue=30f, CovertnessWeight=0.5f)

LEADERSHIP_COVERTNESS_PER_MISSION=0.0075f
LEADERSHIP_COVERTNESS_CAP=0.25f
Antifringe
Posts: 226
Joined: Tue Jan 24, 2017 9:52 pm

Re: [INI] CovertnessValue & CovertnessWeight

Post by Antifringe »

Tuhalu wrote:
  • The Chameleon Suit: Like an empty item slot it has 0 CovertnessValue, but instead of 0.2 weight it has 0.75 weight. This will cause a reduction in hours above what you get for an empty slot.
Hang on, I just processed this. I had figured that 0*.2 and 0*.75 ended up being the same thing, because I thought (mistakenly, perhaps) that the score was the sum of the soldier's gear. But you're saying that it's more of a weighted average. That changes things. I'll have to do some tests, but that might clear up some trends that I couldn't understand before.
Tuhalu
Posts: 433
Joined: Wed Feb 01, 2017 9:02 pm

Re: [INI] CovertnessValue & CovertnessWeight

Post by Tuhalu »

Antifringe wrote:
Tuhalu wrote:
  • The Chameleon Suit: Like an empty item slot it has 0 CovertnessValue, but instead of 0.2 weight it has 0.75 weight. This will cause a reduction in hours above what you get for an empty slot.
Hang on, I just processed this. I had figured that 0*.2 and 0*.75 ended up being the same thing, because I thought (mistakenly, perhaps) that the score was the sum of the soldier's gear. But you're saying that it's more of a weighted average. That changes things. I'll have to do some tests, but that might clear up some trends that I couldn't understand before.
You take the sum of every covertnessValue*covertnessWeight, then you divide by the sum of covertnessWeight. 0*0.2 and 0*0.75 are both 0, but 0.75 is 0.55 covertnessWeight more than 0.2. So at the end you are dividing by a bigger sum of covertnessWeight to get the average.

eg 5/5 = 1, but 5/5.55 is ~0.901. This is quite significant :)
Antifringe
Posts: 226
Joined: Tue Jan 24, 2017 9:52 pm

Re: [INI] CovertnessValue & CovertnessWeight

Post by Antifringe »

I solved it. I can now calculate the time mod and it matches the in game results.

you take the weighted average of a soldier's gear:

(sum of values*weights)/(sum of weights)

For the default soldier with three grenades, this results in a score of 100, which is a nice clean number.

Every mission type has a base time. For 90% of the missions, this is 144 hours (6 days). Only things like towers and facilities have different base times.

The gear modifier is calculated by multiplying the base time either up or down by two thirds for every 100 points above or below the 100 point baseline your solider has. So a soldier with a score of 200 changes the timer to 144*1.67*(200-100)/100 = 240 hours, or a 4 day penalty.

A Ranger with no items has a score of 85.37 points (100*1+200*1+0.2*0+0.2*0+0.2*0)/(1+2+0.2+0.2+0.2).

This results is a multiplier of 1- (85.37-100)*.67 ~ .9

144 hours times .9 is about 130, which is 14 hours less than the default 144, which means that the displayed modifier should be -14 hours. Which it is. I can also correctly predict the +9 hour modifier for gunners and grenadiers from this formula. I am sometimes one hour off, which I can't explain and doesn't seem to be due to rounding, but this is definitely in "good enough" territory.

EDIT: So a good take away from this is that infiltration time actually is linear with covertness, i spite of what I said in the first post (I didn't have the correct formula when I said that). Every 10 points of covertness above or below 100 changes your time by 9.6 hours, before squad size multipliers kick in.
Franzy
Posts: 69
Joined: Thu Apr 06, 2017 9:05 am

Re: [INI] CovertnessValue & CovertnessWeight

Post by Franzy »

So my hunch *was* correct :) Anyway, any idea what this item is?...
+EquipmentCovertness=(Itemname="FreeKillUpgrade_Sup", CovertnessValue=0f, CovertnessWeight=0.75f)
Tuhalu
Posts: 433
Joined: Wed Feb 01, 2017 9:02 pm

Re: [INI] CovertnessValue & CovertnessWeight

Post by Tuhalu »

Franzy wrote:So my hunch *was* correct :) Anyway, any idea what this item is?...
+EquipmentCovertness=(Itemname="FreeKillUpgrade_Sup", CovertnessValue=0f, CovertnessWeight=0.75f)
That's a Superior Suppressor. The Vanilla XCOM2 version gave a percentage chance to instantly kill whatever you were shooting at, hence the "FreeKillUpgrade" in the name.
Post Reply