XCOM 2
Reworked Combat Intelligence
39 Comments
Juravis  [author] 26 Jan, 2024 @ 5:20pm 
Pretty sure thats a mod that already exists but this isnt it
M9|Ассист по ПЛ-у 26 Jan, 2024 @ 4:30pm 
How to make all soldier SAVANT????:D
MrMali 14 Jun, 2023 @ 8:30pm 
If anyone is still confused on how the chances work to have a higher intelligence in the DefaultGameData.ini

So on the chance if you put it at 100 then 100 percent of your people will be above average or better. Then after that roll, the thresholds split up the people who are above average or better into above average[0], gifted[1], genius[2], and savant[3]. So If you say only wanted genius and savant it would look like:

ComIntAboveAverageChance=100 (Everyone will be above normal)
ComIntThresholds[0]=0 (0 for 0 percent chance to be above average)
ComIntThresholds[1]=0 (0 for 0 percent chance to be gifted)
ComIntThresholds[2]=50 (50 for 50 percent chance to be genius)
ComIntThresholds[3]=100 (100 for another 50 percent chance to be Savant)

The Above Average chance sets that percentage of your soldiers above normal
Then the thresholds determine who is what.
photon 24 Oct, 2021 @ 8:46am 
i'm guessing how ComIntThresholds works, and i think i found sth interesting :)

from DefaultGameData.ini we have:
ComIntAboveAverageChance=50
ComIntThresholds[0]=50 ; 25% chance
ComIntThresholds[1]=80 ; 15% chance
ComIntThresholds[2]=99 ; 9.5% chance
ComIntThresholds[3]=100 ; 0.5% chance

look into the comments

50/100 * 50/100 = 25%
50/100 * (80 - 50)/100 = 15%
50/100 * (99 - 80)/100 = 9.5%
50/100 * (100 - 99) / 100 = 0.5%

so you can follow the rules to design the probability yourself
Cúchulainn 8 Oct, 2021 @ 2:34pm 
I see, thank you very much! It's an interesting way of coding it and I was having a hard time wrapping my head around it. Thanks for your hard work!
Juravis  [author] 6 Oct, 2021 @ 5:21pm 
I dont know exactly how the thresholds work however but as you can see the numbers go UP and eventually reach 100 this means that lower is probably better. Follow the game logic.
Juravis  [author] 6 Oct, 2021 @ 5:20pm 
The decimal number is a multiplier on the points you get according to your combat ranking.

You got it mostly right, just increase the numbers and youll get more randomly generated savants and less normal people. The thresholds are the rolls to get the ranks (slightly above average happens more often, and savants are rare).
Cúchulainn 6 Oct, 2021 @ 12:20am 
I just want to be able to understand the code myself since I just started learning myself
Juravis  [author] 4 Oct, 2021 @ 4:44pm 
Dont use this mod if you want regular combat intelligence, change the game instead!
Cúchulainn 4 Oct, 2021 @ 2:42pm 
Hi Advent Avenger, can you help me understand what to edit for the values in your int file? I'm a little confused.

For the Disable having more than average = 0 , if I change 0 to 1, does that mean I disable the chance for rookies/squaddies/new soldiers to spawn with greater than avg combat standard?

And then for my next question what does this mean?

ResistanceHeroComIntModifiers[eComInt_Standard]=1.15
+ResistanceHeroComIntModifiers[eComInt_AboveAverage]=1.30
+ResistanceHeroComIntModifiers[eComInt_Gifted]=1.45
+ResistanceHeroComIntModifiers[eComInt_Genius]=1.60
+ResistanceHeroComIntModifiers[eComInt_Savant]=1.75

Im guessing this is the AP x (Modifier number you have)?

How do i change % change of having better combat intelligence ?

-ComIntAboveAverageChance=50
-ComIntThresholds[0]=50
-ComIntThresholds[1]=80
-ComIntThresholds[2]=99
-ComIntThresholds[3]=100

Does it have to do with this?
Fiard 6 May, 2020 @ 8:44am 
I don't think, it's possible to achieve what I want without some events hooking via making actual mod. I haven't found any way how to control character pool throw/pass one, wen generating new soldier.
Juravis  [author] 4 May, 2020 @ 9:33pm 
You can edit the game ini values yourself! Its very easy. Look at my mod for details
Fiard 4 May, 2020 @ 5:59pm 
I was actually searching for mod, that could give me a character from my character pool, ONLY if rolled character passes some minimal CI treshold (So in about mid game I would have 10-20 random soldiers with std and above, and my 8-10 premade chars with gifted and genius). No success ((
But your mod is the best kinda solution here I found :P ty
Juravis  [author] 12 Nov, 2019 @ 7:11pm 
You can edit that yourself, those parameters are exposed in the INI settings. You can do that either straight in the game itself or in this mod.
MrCloista 12 Nov, 2019 @ 6:39pm 
Is it possible with this to set soldiers to be able to spawn at more than just Standard, for a smaller amount of randomisation (say Standard and Above average only)?
Juravis  [author] 12 Jul, 2019 @ 5:08pm 
Feel free to delete the int file.
Noob Train 12 Jul, 2019 @ 12:17pm 
I see no need to rename the intelligence ranks. I like the original rank names better. I was on the fence on using this but that change made the choice easier, sorry.
Juravis  [author] 24 Apr, 2019 @ 11:43am 
No reason not to honestly unless they changed either combat intelligence or the ap progress.
SkySpirit 24 Apr, 2019 @ 7:56am 
Will this mod works with RPGOverhaul?
⚡Judge Zed⚡ 20 Feb, 2019 @ 1:38pm 
Works great, well thought out and compatible, just what I wanted! I like the new names but the lowest one made me think my game was broken haha, reading is hard.
Juravis  [author] 10 Feb, 2019 @ 11:03am 
Killing a Chosen has it's own variables I believe, I didnt check.
Juravis  [author] 10 Feb, 2019 @ 11:02am 
Dragon32 is the support expert. He's the man.
Atlas 10 Feb, 2019 @ 11:00am 
Well, if those snippets also apply to special events like killing a chosen, then the wiki seems to have gotten it's facts wrong. I also have never noticed any kind of AP cap, although your highest level soldiers are generally also very high CI in vanilla.

Thanks for looking it up anyways. Must be the quickest mod support in the workshop here :D
Juravis  [author] 10 Feb, 2019 @ 10:38am 
Oh also:

SoldierAbilityPointsMinReward[0]=4 ;Easy
SoldierAbilityPointsMinReward[1]=4 ;Normal
SoldierAbilityPointsMinReward[2]=4 ;Classic
SoldierAbilityPointsMinReward[3]=4 ;Impossible

SoldierAbilityPointsMaxReward[0]=10 ;Easy
SoldierAbilityPointsMaxReward[1]=10 ;Normal
SoldierAbilityPointsMaxReward[2]=10 ;Classic
SoldierAbilityPointsMaxReward[3]=10 ;Impossible
Juravis  [author] 10 Feb, 2019 @ 10:35am 
I have never hit an AP cap to date, you would have to not spend your points for a while to hit any kind of cap.
Juravis  [author] 10 Feb, 2019 @ 10:34am 
Found it. It's in DefaultGameData. As you can see, the only thing that affects AP is difficulty, and by default they all have the same value. So my statement seems correct, and the Wiki is just extrapolating. The code also seems to say I'm correct, the functions only return these values without touching them or checking soldiers or such. I would have been surprised Firaxis made a complex formula checking for your team composition.

[XComGame.X2StrategyElement_XpackRewards]
AbilityPointsBaseReward[0]=30 ;Easy
AbilityPointsBaseReward[1]=30 ;Normal
AbilityPointsBaseReward[2]=30 ;Classic
AbilityPointsBaseReward[3]=30 ;Impossible
AbilityPointsInterval[0]=24 ;Easy
AbilityPointsInterval[1]=24 ;Normal
AbilityPointsInterval[2]=999999 ;Classic
AbilityPointsInterval[3]=999999 ;Impossible
AbilityPointsRewardIncrease[0]=0 ;Easy
AbilityPointsRewardIncrease[1]=0 ;Normal
AbilityPointsRewardIncrease[2]=0 ;Classic
AbilityPointsRewardIncrease[3]=0 ;Impossible
AbilityPointsRangePercent=25
Atlas 10 Feb, 2019 @ 10:25am 
Also, now that I read the wiki page again, it also says Soldiers have a cap for AP that is determined by Combat Intelligence? If that is true, that would be another advantage for raising CI instead of doing AP Ring missions, I guess.
Juravis  [author] 10 Feb, 2019 @ 10:22am 
I'll check the event to see in the UC code what impact it has, I'm curious now.
Atlas 10 Feb, 2019 @ 10:20am 
Well, I haven't looked in the code, so I can't confirm it 100%, but it says so on the wiki page for Skill Events (https://xcom.fandom.com/wiki/Skill_Events) . Matches my personal experience of it as well. Has nothing to do with bonds, as far as I know.
Juravis  [author] 10 Feb, 2019 @ 10:16am 
I am not aware of such a mechanic. Pretty sure combat intelligence is individual. Unless the soldiers are bonded, in which case I am not so sure.
Atlas 10 Feb, 2019 @ 10:08am 
Correct me if I'm wrong, but Combat Intelligence also affects how much Team AP you get from Skill Events, right? So, your math with the ring is somewhat off, as you also get more AP from these sources.

Like the mod very much otherwise.
Juravis  [author] 25 Dec, 2018 @ 11:18am 
Mod updated so that leveling your Combat Intelligence via the Ring now provides approximately the same bonus as sending them on an AP increase mission.
Arkhangel 13 Sep, 2017 @ 5:21pm 
"when everyone's special, no one will be"
Savar Belmont 13 Sep, 2017 @ 4:19pm 
Another winner nice
Alexandr 13 Sep, 2017 @ 3:49pm 
XCOM2: Full Communism Now
Juravis  [author] 13 Sep, 2017 @ 3:43pm 
I got inspired by Robojumper's mod, which is in the required section.
Chrizzly Bear 13 Sep, 2017 @ 3:43pm 
Oh whoops, I totally overlooked it. Nah, that's fine. Thanks! I like how it's a smoother progression. Liking your mods lately. :)
Juravis  [author] 13 Sep, 2017 @ 3:42pm 
Very slightly less at Savant. The numbers are in the description. As you can see, the curve is flattened, and the starting point is raised. Do you want me to make a graph and add it to images?
Chrizzly Bear 13 Sep, 2017 @ 3:41pm 
Hmm, so if soldiers get to Savant combat intelligence with this mod enabled, do they gain more AP than soldiers with Savant combat intelligence in vanilla?