One bum's code digging notes

Share strategy and tips here.
trihero
Posts: 1099
Joined: Sun Jan 01, 2017 7:01 am

One bum's code digging notes

Post by trihero »

I decided to start code diving to learn more about the game, and I'll just list some interesting notes I came across from looking at the 1.1 ini files

1. contrary to many people stating that "vigilance only goes down with time," vigilance can go down if advent wins a retaliation/raid. The takeaway here is if you give up a region, advent cares about it less.

VIGILANCE_DECREASE_ON_ADVENT_RAID_WIN=2
VIGILANCE_DECREASE_ON_ADVENT_RETAL_WIN=4

(vigilance goes down 1 per week, that is the "over time" effect)

2. alien facilities can actually transfer their red doom pips to the fortress in the middle of the ocean each time they create a new pip. Recall that doom pips in the ocean fortress can only be reduced a limited number of times (through the objectives), which implies you should do alien facility leads as soon as you get them before they can be transferred to the ocean fortress, contrary to vanilla where you would save them until the last second. This percentage is frighteningly high on legend (30%).

;chance to transfer a point of doom from regional facility to Alien HQ -- triggers when local doom timer triggers
;each chance to transfer is rolled independently (e.g. 3 10% chances is slightly less than 30%)
CHANCE_PER_LOCAL_DOOM_TRANSFER_TO_ALIEN_HQ[0]=10.0
CHANCE_PER_LOCAL_DOOM_TRANSFER_TO_ALIEN_HQ[1]=20.0
CHANCE_PER_LOCAL_DOOM_TRANSFER_TO_ALIEN_HQ[2]=25.0
CHANCE_PER_LOCAL_DOOM_TRANSFER_TO_ALIEN_HQ[3]=30.0

3. there's a minimum amount of rebels on jobs before it's possible for them to do a retaliation, thus this is the true benefit of "hiding"

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

The above are mini retals; strangely, the minimum is lower for regular retaliations (which are harder)

ATTEMPT_COUNTERINSURGENCY_MIN_REBELS = 5 ; Population of Haven (so missions aren't bare of civvies to rescue)
ATTEMPT_COUNTERINSURGENCY_MIN_WORKING_REBELS = 5 ; Population of Haven assigned jobs (allows hiding job to avoid retals)

So it should be impossible to get any retaliation missions in a given region if you only have 4 working rebels there, and you can go up to 5 of a given type of job without triggering the mini-retal specific raid. But if you do have 5 working rebels on a particular job (or spread across different jobs), you can get the normal retaliation even though you won't trigger the specific mini-retal raid.

4. here are some specifics (not all) on how faceless detection goes; as you can see it's actually the "basic rank" of the soldier that helps the most; officer ranks help a bit but each officer rank is worth roughly half or less as much as a "basic rank" of the soldier. Psionics class ranks are worth the most in terms of detecting faceless (at max, psi produces close to double intel income towards faceless than a non-psi class)

[LW_Overhaul.X2LWActivityDetectionCalc_Rendezvous]
; this is the amount of "Intel Income" toward detecting the Rendezvous activity a soldier generates
; regular rebels do not generate any income toward the Rendezvous activity
+LIAISON_MISSION_INCOME_PER_RANK[0]=0f
+LIAISON_MISSION_INCOME_PER_RANK[1]=5f
+LIAISON_MISSION_INCOME_PER_RANK[2]=10f
+LIAISON_MISSION_INCOME_PER_RANK[3]=15f
+LIAISON_MISSION_INCOME_PER_RANK[4]=20f
+LIAISON_MISSION_INCOME_PER_RANK[5]=22.5f
+LIAISON_MISSION_INCOME_PER_RANK[6]=25f
+LIAISON_MISSION_INCOME_PER_RANK[7]=26f
+LIAISON_MISSION_INCOME_PER_RANK[8]=27f

+LIAISON_MISSION_INCOME_PER_RANK_PSI[0]=0f
+LIAISON_MISSION_INCOME_PER_RANK_PSI[1]=6f
+LIAISON_MISSION_INCOME_PER_RANK_PSI[2]=12f
+LIAISON_MISSION_INCOME_PER_RANK_PSI[3]=20f
+LIAISON_MISSION_INCOME_PER_RANK_PSI[4]=25f
+LIAISON_MISSION_INCOME_PER_RANK_PSI[5]=30f
+LIAISON_MISSION_INCOME_PER_RANK_PSI[6]=35f
+LIAISON_MISSION_INCOME_PER_RANK_PSI[7]=40f
+LIAISON_MISSION_INCOME_PER_RANK_PSI[8]=45f

+LIAISON_MISSION_INCOME_BONUS_PER_RANK_OFFICER[0]=0f
+LIAISON_MISSION_INCOME_BONUS_PER_RANK_OFFICER[1]=2.5f
+LIAISON_MISSION_INCOME_BONUS_PER_RANK_OFFICER[2]=5f
+LIAISON_MISSION_INCOME_BONUS_PER_RANK_OFFICER[3]=7.5f
+LIAISON_MISSION_INCOME_BONUS_PER_RANK_OFFICER[4]=10f
+LIAISON_MISSION_INCOME_BONUS_PER_RANK_OFFICER[5]=12f
+LIAISON_MISSION_INCOME_BONUS_PER_RANK_OFFICER[6]=14f
+LIAISON_MISSION_INCOME_BONUS_PER_RANK_OFFICER[7]=15f

5. The "yellow/green alert" reflex actions are somewhat capped; for each successful reaction that happens in a pod, the chance for the next guy to have a reflex action goes down (i.e. it should be literally impossible for all 8 in the pod to get a reflex action)

; The amount the chance to take an action will drop after each success in a pod. The count is reset
; for each pod that activates within a single turn.
REFLEX_ACTION_CHANCE_REDUCTION=0.05

6. Some interesting notes on the "doom reinforcements" how many turns until they activate for avatar objective missions:

; This is the turn count after squad reveal AND strategic objective fulfillment on missions with unlimited ("continuous") reinfs when ADVENT starts dropping 8-strong pods to force the player to skedaddle.
; Disabled by -1 or a positive reinforcement cap.
+TURN_COUNT_FOR_CAVALRY_AFTER_VICTORY[0]=-1
+TURN_COUNT_FOR_CAVALRY_AFTER_VICTORY[1]=12
+TURN_COUNT_FOR_CAVALRY_AFTER_VICTORY[2]=10
+TURN_COUNT_FOR_CAVALRY_AFTER_VICTORY[3]=8

; This is the turn count after squad reveal on missions with unlimited ("continuous") reinfs when ADVENT starts dropping 8-strong pods to force the player to skedaddle.
+TURN_COUNT_TO_CAVALRY_ALL_CASES[0]=-1
+TURN_COUNT_TO_CAVALRY_ALL_CASES[1]=28
+TURN_COUNT_TO_CAVALRY_ALL_CASES[2]=24
+TURN_COUNT_TO_CAVALRY_ALL_CASES[3]=20

7. A little bit of insight into how rebels on intel give you missions

[ProtectRegionEarly X2LWAlienActivityTemplate]
iPriority = 3
RequiredRebelMissionIncome=110.0 ;This is a cumulative total from rebels on the Intel job that must be met before discovery chances are rolled against
DiscoveryPctChancePerDayPerHundredMissionIncome=40 ; Higher means easier to detect
AlertLevelModifier=0
MissionTree[0] = ( MissionFamilies[0]="Recover_LW", \\
MissionFamilies[1]="Hack_LW", \\
Duration_Hours=216, \\
DurationRand_Hours=24, \\
EvacModifier=1 \\
)

From another file, each rebel on intel has an income of 5 mission income per day. So you have to accumulate a certain number of mission income first, then every 6 hours you get a roll based on % per 100 mission income to detect a certain mission. The % is lower for higher up missions in the lib chain or like supply raids. At the end of the day more rebels on intel generate you missions more reliably. There is a cooldown for each mission type (you can't have 2 troop ambushes two days in a row in one given region).

8. a little bit more insight into havens

[LW_Overhaul.LWRebelJobIncomeModifier_Liberated]
LIBERATED_BONUS=0.2f

[Resupply LWRebelJobTemplate]
IncomePerRebel=1.0f
IncomePenaltyPerFaceless=1.5f

[Recruit LWRebelJobTemplate]
IncomePerRebel=3
IncomePenaltyPerFaceless=5

[Intel LWRebelJobTemplate]
IncomePerRebel=5f
IncomePenaltyPerFaceless=2.5f
ResourceIncomeAmount=1

Apparently faceless do more than eff up your income, they also screw with your intel and recruiting capabilities as well.




Note that I'm just casually code diving and don't claim to be good at it, nor am I seriously taking requests to look into certain mechanics. It's just something I might do here and there if it interests me.
Last edited by trihero on Wed Feb 08, 2017 2:01 am, edited 2 times in total.
Olin
Posts: 24
Joined: Mon Jan 23, 2017 10:38 pm

Re: One bum's code digging notes

Post by Olin »

Most informative - especially the part about retaliation thresholds. Many thanks.
trihero
Posts: 1099
Joined: Sun Jan 01, 2017 7:01 am

Re: One bum's code digging notes

Post by trihero »

Here is some important information regarding sound range

; Sound Range is in meters (1 meter = .67 tiles)
;
; Sound Range 54 = 36 tiles (18 bvr)
; Sound Range 51 = 34 tiles (16 bvr)
; Sound Range 48 = 32 tiles (14 bvr)
; Sound Range 45 = 30 tiles (12 bvr)
; Sound Range 42 = 28 tiles (10 bvr)
; Sound Range 39 = 26 tiles (8 bvr)
; Sound Range 36 = 24 tiles (6 bvr)
; Sound Range 30 = 20 tiles (2 bvr)
; Sound Range 9 = 6 tiles (1/3 vr)
; Sound Range 6 = 4 tiles
; Typical Sight Range is 27 meters, 18 tiles

I have listed the sound radius for some common weapons:

Gauntlet_Primary_CONVENTIONAL_ISOUNDRANGE=39 <--- technical's rocket
ShredderGun_iSoundRange=36
FragGrenade_iSoundRange=36
SmokeGrenade_iSoundRange=14
FlashbangGrenade_iSoundRange=14
ASSAULTRIFLE_CONVENTIONAL_iSoundRange=30
RangerSword_Conventional_iSoundRange=9
LMG_CONVENTIONAL_iSoundRange=36
SHAPEDCHARGE_ISOUNDRANGE = 50

BASIC_SUPPRESSOR_SOUND_REDUCTION_METERS=3
ADVANCED_SUPPRESSOR_SOUND_REDUCTION_METERS=5
ELITE_SUPPRESSOR_SOUND_REDUCTION_METERS=8

Interestingly, the emp grenade and bomb do not have a sound radius.

As you can see, the shaped charge is by far the "loudest" of all the the things you can bring to the table (don't ask me about environmental sounds like car explosions, dunno). But also notice how your simple gunfire itself makes sound, with the gunner's canon being equally as loud as a frag grenade, and even the assault rifles are pretty close.
trihero
Posts: 1099
Joined: Sun Jan 01, 2017 7:01 am

Re: One bum's code digging notes

Post by trihero »

From reading this explanation here

http://ufopaedia.org/index.php/Missions ... vity_Level

And doing some digging in the ini files for an invasion mission, here are some notes I have:

INVASION_REGIONAL_COOLDOWN_HOURS_MIN=864
INVASION_REGIONAL_COOLDOWN_HOURS_MAX=1080
INVASION_MIN_LIBERATED_DAYS=21 ; Minimum days after a liberation that an invasion can pop

So first off, it is literally impossible for advent to launch a full scale Invasion mission until 21 days after you have liberated a region.

Secondly, let's try to apply the knowledge about the invasion type mission here

[Invasion X2LWAlienActivityTemplate]
iPriority=15
RequiredRebelMissionIncome=50.0
DiscoveryPctChancePerDayPerHundredMissionIncome=70

MissionTree[0] = ( MissionFamilies[0]="SupplyLineRaid_LW", \\
Duration_Hours=96, \\
DurationRand_Hours=96 \\
)

MissionTree[1] = ( MissionFamilies[0]="Invasion_LW", \\
Duration_Hours=24, \\
DurationRand_Hours=0, \\
ForceActivityDetection=true \\
)

If you examine other mission types, you'll notice that this "supply raid" mission occurs in a liberated region and is HUGELY easier to detect than any of the other mission types (Lib 1 for instance has a 40% per day per hundred income, while this invasion is 70%). It also has a lower threshold of 50 mission income (lib 1 for instance is 110, more than twice that threshold).

That being said, let's try to calculate using the example from the ufopedia link as a guide, to see how many rebels on intel you would like to have in a liberated region in order to have a 100% chance to sniff it out before it hits - I will assume that you want to have a 100% chance to sniff if within 3 days of intel gathering (since the supply raid duration is 96=4 days at minimum, although if lucky could go up to 96+96=8 days, I'll go with you want to find it strictly before the minimum possible time).

Although I said in the original post that 1 rebel provides 5 mission income, which I think is true but doesn't tell you how often the income is generated, based on the example at ufopedia if you normalize this per day it comes out to 1 income per day.

The threshold that we need to have a nonzero chance of finding the supply raid is 50 / 5 (divide by 5 to normalize to per day) = 10 intel points, and then 70 / (100/5) = 3.5% per intel point to detect the mission. Thus we need 29 intel points above the baseline to reach 100% of hitting the mission = 39 intel points to guarantee the detection. If we give ourselves a 3 day working period, that means we would require all 13 rebels (assuming nonpromoted) in order to guarantee without a doubt that you will find the precursor supply raid to an invasion mission - ouch, this is nowhere near the 1 or 2 rebels we were hoping would make do.

Roughly how good of a job would having say, 2 rebels on intel do us? 2 rebels would give us 10 intel points in 5 days, meaning it wouldn't even be possible to detect the mission until 5 days of it have already worn out, and this is beyond the minimum of 4 days that the mission can have, and then you have a maximum of 3 days to detect it if the duration rolled high, so you would have a 7% on the 6th day, 14% on the 7th day, and a 21% on the 8th day to detect it assuming the mission lasts that long.

In other words, unless you put quite a significant number of rebels on intel, given the duration of the invasion precursor mission, you probably won't find it in time, even though it is easier to detect per intel than lib 1 hacking mission. (lib 1 missions have a base duration of 9 days vs the supply raid 4 days, which is why you have such little chance to see it in time)

We can do a more reasonable estimate - the average duration of the precursor supply raid is 6 days (min 4, max 8), so let's give ourselves a 5 day working period, and let's put 6 rebels on intel.

Day 1: 6 intel in the bank
Day 2: 12 intel in the bank - 10 threshhold = 2 intel x 3.5% = 7% to detect mission
Day 3: 8 intel x 3.5% = 28%
Day 4: 14 intel x 3.5% = 49%
Day 5: 20 intel x 3.5% = 70%

Thus given an average mission duration of 6 days, the chance that we would not detect the supply raid within 5 days is

0.93*0.72*0.51*0.3 = 10.2%.

Or in other words, if you put 6 rebels on intel in a liberated region, you can expect to detect 9 out of 10 supply raids that have duration 6 days or higher, which happens 50% of the time. The other 50% of the time where the mission duration is between 4 and 6 days, you can expect to catch roughly half of these in time. So if you average all that, you expect to catch 70% of all invasion-supply raids within time if you have 6 rebels on intel.


As a side note: if you were wondering how hard it is to find a regular (noninvasion ) supply raid that reinforces a region, it is quite hard - it has a 4% chance per 20 intel income to detect (lib 1 has a 40% chance per 20 intel income), so off the bat it is 10 times harder to detect than lib 1, and the minimum duration is 6 days compared to lib 1's 9 days. It's no wonder in our experiences you rarely find them, and even when you do they have little time remaining.
BookofAeons
Posts: 14
Joined: Tue Jan 17, 2017 7:48 pm

Re: One bum's code digging notes

Post by BookofAeons »

trihero wrote:3. there's a minimum amount of rebels on jobs before it's possible for them to do a retaliation, thus this is the true benefit of "hiding"
This can't be the full story. See here. Xwynns has controlled this region for 8 days, and he had 4 rebels on intel and 1 on recruit the whole time. He still triggers an intel mini-retal.

I have heard that faceless in the haven reduce these thresholds, so they aren't 100% reliable.
GavinRuneblade
Posts: 178
Joined: Fri Jan 20, 2017 6:55 am

Re: One bum's code digging notes

Post by GavinRuneblade »

Thanks for all this cool work and the explanations
trihero
Posts: 1099
Joined: Sun Jan 01, 2017 7:01 am

Re: One bum's code digging notes

Post by trihero »

BookofAeons wrote:
trihero wrote:3. there's a minimum amount of rebels on jobs before it's possible for them to do a retaliation, thus this is the true benefit of "hiding"
This can't be the full story. See here. Xwynns has controlled this region for 8 days, and he had 4 rebels on intel and 1 on recruit the whole time. He still triggers an intel mini-retal.

I have heard that faceless in the haven reduce these thresholds, so they aren't 100% reliable.
It could have something to do with this bit of code below, but I'm afraid reading ini files can only give you a hint of what's going on since they just set parameter values without showing you the actual functions that process the variables.

[LW_Overhaul.X2LWActivityCondition_RNG_Region]
; can vary based on difficulty setting
+FACELESS_ROLL_MODIFIER[0] = 0.5; If an activity roll is modified by the presence of a faceless in haven, each faceless adds this much
+FACELESS_ROLL_MODIFIER[1] = 1.0
+FACELESS_ROLL_MODIFIER[2] = 1.0
+FACELESS_ROLL_MODIFIER[3] = 1.0
LordYanaek
Posts: 940
Joined: Mon Jan 23, 2017 1:34 pm

Re: One bum's code digging notes

Post by LordYanaek »

trihero wrote: In other words, unless you put quite a significant number of rebels on intel, given the duration of the invasion precursor mission, you probably won't find it in time, even though it is easier to detect per intel than lib 1 hacking mission. (lib 1 missions have a base duration of 9 days vs the supply raid 4 days, which is why you have such little chance to see it in time)
In other words, have nobody on intel in liberated regions or at least half a dozen guys, but don't put 1 or 2 of them. Good to know, thanks.
trihero
Posts: 1099
Joined: Sun Jan 01, 2017 7:01 am

Re: One bum's code digging notes

Post by trihero »

This can't be the full story. See here. Xwynns has controlled this region for 8 days, and he had 4 rebels on intel and 1 on recruit the whole time. He still triggers an intel mini-retal.

I have heard that faceless in the haven reduce these thresholds, so they aren't 100% reliable.
You know I wonder if the avenger scanning counts. I bet it does. Did he ever avenger scan in that region?
Antifringe
Posts: 226
Joined: Tue Jan 24, 2017 9:52 pm

Re: One bum's code digging notes

Post by Antifringe »

Some very helpful information here, exactly the kind of the thing I was looking for. In particular, the Haven Adviser detection income tables shows me that the point of diminishing returns is Sgt (Sqd -> Sgt is going from 5 to 20, but Sgt to MSgt is going from 20 to 27). It also shows that it's probably not worth training Advisers as officers for the extra faceless detection.

I wanted to know more about the recruit job, so I poked into the XComLW_Outposts file. What I infer is that
-Each rebel scores 3 "recruitment points" per day (I think it's per day)
-When you hit 100 points, you roll on a table to see what you get. There is a 67% to get a rebel, and a 33% chance to get a rookie
- If the region is liberated, there is a very small chance you can get either a scientist or an engineer. I've never seen this happen, so I don't know if you just get the worker, or if it gets added to the Black Market or something.
-A soldier liaison counts as a normal rebel as far as basic recruitment income goes (ie he scores 3 points a day)
-But, a soldier liaison also multiplies the total recruitment income by (1 + 0.05 * Rank), with squaddie being rank =1 (I think)
-A Faceless gives you -5 income. I'm not sure if they always do this, or only if they are assigned to the recruit job

A tangent, but engineer and scientist liaisons give a 1.2 multiplier to their respective incomes.

Among other things, this means that the game rewards specialization. For a newly contacted region, I'd recommend putting all four rebels in recruit, give them the highest ranking liaison soldier you can, and use the Avenger's scan to pick up the slack in Intel. With a Sgt, you should get a new recruit every ~5.8 days, and that accelerates as you get more rebels to join the recruitment. Rookies and Faceless bring this average down. Later on, this won't be as practical (there's a lot your Avenger needs to be doing), but this is a way to get your second region self-supporting relatively quickly.

FAKE EDIT: I decided to check this in game and what I found is that the interval is about twice as long as expected, so maybe the income isn't really per day after all.

I guess the really big question about that strat is if the extra recruits make up for the lowered chance of finding Jailbreak events. My (totally untested, wildly speculative) guess is that the Avenger is good enough for this by itself.

I guess I could check, since we're ini diving and all. The jailbreak event has the following stats

iPriority=55
RequiredRebelMissionIncome=40.0
DiscoveryPctChancePerDayPerHundredMissionIncome=28
MaxAlert=12
MaxVigilance=7

MissionTree[0] = ( MissionFamilies[0]="Jailbreak_LW", \\
Duration_Hours=216, \\
DurationRand_Hours=96 \\
)

So we need 40 MissionIntel points minimum, and 357 points to guarantee success. Without knowing the income interval, I can't go any further, but hopefully someone will figure it out and we can go from there.

EDIT: The wikipedia article mentioned by the OP is confusing and renormalizes all the units for maximum bewilderment, but it seems to suggest that DiscoveryPctChancePerDayPerHundredMissionIncome means "Chance per full 100% of the minimum income," not "chance per full 100 points." If that's true, then the amount needed for 100% detection is only 142.

MOAR EDIT: I checked recruit times again, this time taking very careful notes. With 6 rebels on recruiting, I got a new recruit every 5.5 days on the nose, as predicted if listed income is per day. I probably just made an error when I thought the interval was different. That certainly makes things easier.
Last edited by Antifringe on Thu Feb 09, 2017 9:15 am, edited 2 times in total.
trihero
Posts: 1099
Joined: Sun Jan 01, 2017 7:01 am

Re: One bum's code digging notes

Post by trihero »

Someone already did a simulation for jailbreak and what you should do with your initial few days.

https://www.reddit.com/r/Xcom/comments/ ... r_day_one/

Short answer is you should both avenger scan + all rebels to intel and it makes a massive difference in your ability to find an early jailbreak with 6+ days left. Avenger alone isn't good enough.

Longer answer is that according to his simulation, if you have 6 rebels on intel, you get jailbreaks with 6 day duration about 40% of the time, so if you want to depend only on avenger (4 rebels), you can expect only lesser results than this which doesn't seem ideal. If you have 6 rebels + avenger, you get jailbreaks with 6+day duration 70% of the time, which is fairly acceptable.

But I generally do agree with putting all rebels towards recruiting in a newly contacted region; your men should already be out on several missions by the time you contacted a new region so you don't have time to do missions in new regions. I would scan with the avenger not in the new zone in an attempt to find a jailbreak, but scan in your hottest advent activity region to help push the cap over for a supply raid/troop ambush, since those represent a windfall in corpses/income and are very hard to detect without dedicated effort. And also just to help detect stupid retaliations.

I let new regions build up recruits quickly so they can be converted to mass intel shortly in the future, and also so they can accumulate experience points earlier.

You want to be spending your soldiers as much as possible on missions early in the game both to cure their lack of ranks and also because the game doesn't throw retals/supply raids at you super in the game so you don't need to hold a reserve back for immediate defense. Once your soldiers are spent, your other means of income are using rebels on recruit/supplies.
Antifringe
Posts: 226
Joined: Tue Jan 24, 2017 9:52 pm

Re: One bum's code digging notes

Post by Antifringe »

That's a useful chart, and seems to settle the issue wrt to your starting region. I'm still interested in a more general answer as to when you should start investing in the recruit job. Looking through the ini, I see this

POLITICAL_PRISONERS_REGIONAL_COOLDOWN_HOURS_MIN=336
POLITICAL_PRISONERS_REGIONAL_COOLDOWN_HOURS_MAX=456

So once you've had a jailbreak, you can't get anymore in that region for 14-19 days. They also stop spawning at vigilance 7, but the player isn't given that information, so it's not as helpful.

A rebel on recruitment gives you a new recruit roughly every 33 days, and this scales down linearly with rebels assigned.

It's hard to tell when you should start pulling people off of intel and onto recruitment. As you say, volume of missions and soldier xp is very important at first. Assuming that you have a random squaddie as an adviser (and you should always, always, always have a soldier advising new havens), you're getting a new recruit about once a month. You can double that if you're willing to pull one rebel off of intel.

There's definitely a point of saturation where you have more missions than you have viable teams, and recruitment makes lots of sense then, but the thing is that the condition of saturation goes away the moment you stop doing intel (which means you should go back to it).
LordYanaek
Posts: 940
Joined: Mon Jan 23, 2017 1:34 pm

Re: One bum's code digging notes

Post by LordYanaek »

Something doesn't look right about the Rendez-vous missions. The data here seems to indicate a squaddie gives 5 points. The UFOpedia table tells the minimum amount of intel is 2! This would mean a squaddie is enough to easily detect those missions given a 21 days (min) duration and should intercept all of them, quickly removing every faceless in their haven.
However UFOpedia doesn't show base detection chance and has "Force Activity Detection " in the notes like the auto-detect missions where we just react to Advent attacks. This leads me to believe the detection system for Faceless spies and Rendez-vous missions is probably different from other missions and those numbers don't actually tell us much, except for the relative value of soldier ranks :?
trihero
Posts: 1099
Joined: Sun Jan 01, 2017 7:01 am

Re: One bum's code digging notes

Post by trihero »

(double post)
Last edited by trihero on Thu Feb 09, 2017 1:49 pm, edited 1 time in total.
trihero
Posts: 1099
Joined: Sun Jan 01, 2017 7:01 am

Re: One bum's code digging notes

Post by trihero »

??

A squaddie is rank 0, hence it would give 0 points, not 5. [1] is lance corporal, [7] is master sergeant. Hence squaddies shouldn't be able to detect faceless at all. There is no conflict to resolve.

And in my home region, I actually always set 1 rebel to recruit and I try to have a soldier adviser at all times. This "feels" roughly good enough that my haven is growing at a reasonable pace. It makes sense since new recruits can either be a soldier or a rebel that only one person on the job "feels" slow; you're only getting a new rebel roughly every other month. With one soldier adviser + 1 rebel, you're getting a new rebel and a new rookie roughly once per month, and that feels good to me.

I don't like to min/max switching rebels off of intel the second I have everyone on a mission then switching back when I have people ready again; for one I'm just lazy but for another thing it takes rebels 1 day to start a new job so you'd have to pay attention to that to maximize soldier uptime. I don't see any need to switch home region rebels en masse to recruiting at any point if you just have 1 rebel + adviser going steady from the beginning and put the rest on intel to find critical missions.
LordYanaek
Posts: 940
Joined: Mon Jan 23, 2017 1:34 pm

Re: One bum's code digging notes

Post by LordYanaek »

trihero wrote: A squaddie is rank 0, hence it would give 0 points, not 5. [1] is lance corporal, [7] is master sergeant. Hence squaddies shouldn't be able to detect faceless at all. There is no conflict to resolve.
Oh, i thought rank 0 was a rookie.
So those "out of the GTS soldiers" are useless as Faceless hunter, that would explain why i didn't detect any of them in some havens :?

Still, with 5 points per soldier at minimal rank and only 2 intel required as detection threshold, it would mean you really don't need a higher rank soldier to detect them very reliably as they would fill the intel pool more than twice in a single day. I often detect faceless with around 6-7 days left out of 19 minimum, so the pool would be filled to 3000% when i detect them :shock: Either the detection chance is terribly low (like lower than reinforcements convoy), they use another math (maybe to actually trigger them) or i really didn't understood the UFOpedia article (which is entirely possible)
trihero
Posts: 1099
Joined: Sun Jan 01, 2017 7:01 am

Re: One bum's code digging notes

Post by trihero »

I don't think it's 5 points per day, it's probably like 1 point per day.

Reason why I say that is because rebels on intel say 5 intel income, but ufopedia says it comes out to 1 per day. That is believable, because the 5 never said how often it comes. So in other words if you divide soldier income by 5 then it makes sense.

I've never had trouble detecting faceless with a lance corporal officer (2nd lt) in havens. You don't catch them 100% as soon as possible but they get caught before they do big damage and it doesn't impact my active teams that much.
LordYanaek
Posts: 940
Joined: Mon Jan 23, 2017 1:34 pm

Re: One bum's code digging notes

Post by LordYanaek »

trihero wrote: Reason why I say that is because rebels on intel say 5 intel income, but ufopedia says it comes out to 1 per day. That is believable, because the 5 never said how often it comes. So in other words if you divide soldier income by 5 then it makes sense.
From what i understood, they actually "normalized" the rebel output on a "per day" basis to make it "easier" to understand :roll:
This would explain why liberation1 (or Protect Region Early) has 110 required intel in the first table but only 22 in the second table on that page (http://www.ufopaedia.org/index.php/Miss ... T_Activity)
trihero
Posts: 1099
Joined: Sun Jan 01, 2017 7:01 am

Re: One bum's code digging notes

Post by trihero »

LordYanaek wrote:
trihero wrote: Reason why I say that is because rebels on intel say 5 intel income, but ufopedia says it comes out to 1 per day. That is believable, because the 5 never said how often it comes. So in other words if you divide soldier income by 5 then it makes sense.
From what i understood, they actually "normalized" the rebel output on a "per day" basis to make it "easier" to understand :roll:
This would explain why liberation1 (or Protect Region Early) has 110 required intel in the first table but only 22 in the second table on that page (http://www.ufopaedia.org/index.php/Miss ... T_Activity)
So how does that change the end result? If you prefer to do the math dividing everything by 5 in numerator and denominator it's still the same fraction in the end. Generating 5 income per day vs a 110 barrier is the same as generating 1 income per day vs a 22 barrier.
LordYanaek
Posts: 940
Joined: Mon Jan 23, 2017 1:34 pm

Re: One bum's code digging notes

Post by LordYanaek »

Yes, but in the case of those Faceless missions, since the required intel of 2 is in the first table, it means it's compared to the full income of 5 for a lance corporal and not 1 as you suggested. If you want to report it on a 1 intel/day scale, it means the required intel to start detecting the mission is 0.4 and you fill the requirement 2.5 times in one day which looks like a lot.
trihero
Posts: 1099
Joined: Sun Jan 01, 2017 7:01 am

Re: One bum's code digging notes

Post by trihero »

Why don't you show me where both

1) the threshold for detecting faceless is
2) and the % per 100 income above the threshold for detecting faceless is

then we can see about calculating detection chance. I'm not even sure what the question is: like you said in your earlier post, you don't require high ranking soldiers to reliably detect faceless. What's the question?
LordYanaek
Posts: 940
Joined: Mon Jan 23, 2017 1:34 pm

Re: One bum's code digging notes

Post by LordYanaek »

I think you don't really understand me. There wasn't really a question, the numbers seemed "off" to me for that mission compared to others and the lack of some information on the UFOpedia table (http://www.ufopaedia.org/index.php/Miss ... T_Activity last line "Rendezvous") led me to think it might obey different rules. I was just pointing that the numbers were strange in my first post but then you started discussing about the 5 points or 1 point scale and mixing them so i tried to clarify that the UFOpedia page isn't really clear as it uses both scales on the same page leading to different values for the same mission in various parts, but it looks like my explanations weren't terribly clear either :oops:

I'll try to have a look at the ini myself to see if i can find better values there (at least once i found the values on UFOpedia were different from those in the ini) but not this evening.
trihero
Posts: 1099
Joined: Sun Jan 01, 2017 7:01 am

Re: One bum's code digging notes

Post by trihero »

Numbers off in what sense? As in you detect faceless more easily than you expect? Or less easily than you would expect?
LordYanaek
Posts: 940
Joined: Mon Jan 23, 2017 1:34 pm

Re: One bum's code digging notes

Post by LordYanaek »

trihero wrote:Numbers off in what sense? As in you detect faceless more easily than you expect? Or less easily than you would expect?
Less often than i would expect given the numbers i see. And it turns out i was right on this. The UFOpedia table (is) EDIT : was incorrect. It listed a Rebel Income threshold of 2 for rendez-vous mission while actually the 2 is for "DiscoveryPctChancePerDayPerHundredMissionIncome"
So the chance to detect them is actually really low (it's the lowest detection chance of any mission, even harder than reinfrorcements). What the ini doesn't tell me is how much intel i need before i can actually start detecting them (aka, the size of the Intel "pool" or Rebel Income in the ufopedia table)

Code: Select all

[Rendezvous X2LWAlienActivityTemplate]
DiscoveryPctChancePerDayPerHundredMissionIncome=2
AlertLevelModifier=-2
ForceLevelModifier=-2

; first layer is just a placeholder for allowing detection to take place over specified timeframe
MissionTree[0] =	(	Duration_Hours=504, \\
						DurationRand_Hours=168, \\
						AdvanceMissionOnDetection=true \\
					)

MissionTree[1] =	(	MissionFamilies[0]="Rendezvous_LW", \\
						Duration_Hours=24, \\
						DurationRand_Hours=5, \\
						ForceActivityDetection=true, \\
						EvacModifier=2 \\
					)
Also the ForceActivityDetection flag is only true for the second part which makes more sense but wasn't clear from the UFOpedia data either.
Last edited by LordYanaek on Fri Feb 10, 2017 10:37 am, edited 1 time in total.
LordYanaek
Posts: 940
Joined: Mon Jan 23, 2017 1:34 pm

Re: One bum's code digging notes

Post by LordYanaek »

OK, while i was messing around with XComLW_Activities.ini to look at those rendezvous missions, i found another interesting value

Code: Select all

[LW_Overhaul.XComGameState_LWAlienActivityManager]
; For every point that global vigiliance (sum of all regional vigilances) exceeds global alert,
; completion of an avatar point project at the Fotress or at a research facility will be delayed
; by this many hours
AVATAR_DELAY_HOURS_PER_NET_GLOBAL_VIG=10
From the look of this, each point of vigilance above the alert level of all regions delays avatar projects "pips" by 10 hours. This means as you are messing around with advent and increasing their vigilance through missions, until they can finally reinforce their regions, all the ruckus you caused will delay their progress on the avatar project. Now it certainly won't allow you to delay it forever but it's interesting to know that you are actually diverting some of their resources away from their big goal, and it can make those "blow the statue" missions more useful as they tend to raise vigilance more than any other mission.
Post Reply