XCOM 2
[WOTC] Point-Based Not Created Equal
Skasian 5 Aug, 2022 @ 5:50pm
3
4
1
Tips on Editing the Config (& changing the Variance)
So it took me nearly 2 hours (+ reading logs) to figure out how this mod works. I think I have a good idea now and hope this info helps others who WISH TO ADJUST THE LEVEL OF RANDOMIZATION.

The config file to edit is located in your steamapps folder which is here for me:
D:\Steam\steamapps\workshop\content\268500\1144463583\Config

The instructions inside the PBNCE config are useful to an extent but doesn't fully explain what is going on. It's misleading in you would think setting a range would be modifying the base value by + or - the modifier. This is not the case.

PBNCE overides the original base values found in XComGameData_CharacterStats.ini. As an example, vanilla WOTC has all rookies start with 65 Aim. PBNCE changes this base value to 50 Aim. It then uses some clever maths to get the average to be in the range specified.

Worth noting is, **PBNCE does not subtract stats while rolling, it only adds**. So it always starts with the low value (i.e. 50) then adds more up to the limit of the range.

Here's where after testing, reading the code and logs I think there are 2 'errors' in the config. They aren't strictly errors, rather they won't produce the results commented in the config file (i.e. gives Mobility ranges between 10-14, Aim 55-75 which are reasonable values as Vanilla WOTC uses 12 and 65 respectively for each of these values).

Base Mobility is set to 9 (should be 10)
Base Aim is set to 50 (should be 55)

If you want a quick fix to these.
Change the Mobility SHIFT = 0 to SHIFT = 1, Aim SHIFT = 0 to SHIFT = 5.

There is also an error in the PsiOffense config code, +CHANGE_STATSE should say +CHANGE_STATS with no 'E' on the end.

Lastly, if you want to play around with these values yourself to make more crazy randomisation. Two things to note:

- Base HP is affected by difficulty you choose during game setup. So if your soliders aren't getting the expected HP range, it could be your difficulty.
- If you want to increase the RANGE (i.e. increase variance), you need to increase the INITIAL_POINTS_AVAILABLE. Because of how the addition system works, if you don't do this, it won't generate enough stats and you will have underpowerered soldiers each time. The exact amount depends on how much you increase your ranges by and how much you've made each stat COST. You will need to play around with this to find the right balance if you change any of the ranges or costs.
Last edited by Skasian; 5 Aug, 2022 @ 5:51pm
< >
Showing 1-6 of 6 comments
Skasian 5 Aug, 2022 @ 6:06pm 
For those who like variance, sharing my config values. I like to run the 'Commander's Choice' mod with this as it allows you to specify what role to promote your Rookie to.

e.g. Rolled a Rookie with 75 Aim but only 2 HP? Send him off to Sharpshooter Camp.
e.g. Got the rare roll of 7 HP and 1 Armor but horrible aim? Send him off to Grenadier Camp and get him that blast padding etc... he is now your utility man.

; Hitpoints: [default values result in HP values of 2 - 7 on Commander Difficulty with a reduced chance of rolling very high HP]
+CHANGE_STATS = (STAT = eStat_HP, RANGE = 2, SHIFT = 0, COST = 10, PLUSONE = true, CHANCE = 65)

; Mobility: [default values result in Mobility values of 9 - 15 with a reduced chance of rolling very high Mobility]
+CHANGE_STATS = (STAT = eStat_Mobility, RANGE = 3, SHIFT = 1, COST = 10, CHANCE = 85)

; Offense / Aim: [default values result in Offense values of 50 - 80 with a reduced chance of rolling very high Aim]
+CHANGE_STATS = (STAT = eStat_Offense, RANGE = 15, SHIFT = 5, COST = 3, CHANCE = 85)

; Will: [default values result in Will values of 33 - 57 with a reduced chance of rolling very high Will]
+CHANGE_STATS = (STAT = eStat_Will, RANGE = 12, SHIFT = 5, COST = 1, CHANCE = 80)

; Defense: [default values result in Defense values of 0 - 30 with a lower % chance of rolling very high defense]
+CHANGE_STATS = (STAT = eStat_Defense, RANGE = 15, SHIFT = 15, COST = 2, CHANCE = 60)

; Dodge: [default values result in Dodge values of 0 - 30 with a lower % chance of rolling very high dodge]
+CHANGE_STATS = (STAT = eStat_Dodge, RANGE = 15, SHIFT = 15, COST = 1, CHANCE = 60)

; Hack: [default values result in Hacking values of 5 - 25 with a lower % chance of rolling very high hack]
+CHANGE_STATS = (STAT = eStat_Hacking, RANGE = 10, SHIFT = 10, COST = 1, CHANCE = 50)

; Psi Offense: [default values result in Psi Offense values of 0 - 20 with a lower % chance of rolling very high Psi]
+CHANGE_STATS = (STAT = eStat_PsiOffense, RANGE = 10, SHIFT = 10, COST = 1, CHANCE = 50)

; Armor: [default values result in Armor values of 0 - 2 with a low chance of occuring and very rare chance of 2 armor]
+CHANGE_STATS = (STAT = eStat_ArmorMitigation, RANGE = 1, SHIFT = 1, COST = 10, CHANCE = 10)


; The number of points that are spent increasing stat values:
INITIAL_POINTS_AVAILABLE = 130

; The maximum number of loops that will be performed to spend points:
; Used to stop the Stat Randomization function if an invalid configuration is entered (ex: 1 point remaining, but you set all the costs to
; 2 or more points, set points higher than all max stats, etc.). Can be reduced to make it more likely low rolls will result in unspent points.
MAX_DISTRIBUTION_PASSES = 7
Last edited by Skasian; 5 Aug, 2022 @ 7:03pm
joey 18 Jul, 2023 @ 8:20pm 
Thank you for this!
Koohan 14 Nov, 2023 @ 2:28am 
Thank you so much. Shiremct is an excellent modder, but boy his language is way too mathy for us noob.
I used your values, just went 70 instead of 65 for hitpoint chance to give my soldiers more chance to roll a health stat change because I was getting way too much 2 health soldiers and since its not even guaranteed that they get high or even good aim as compensation most of them were just useless canon fodder. Had 5 2-health on my first try with your values, and with my little change I got none. Seems good ;)
ArcticJack 15 Jun, 2024 @ 12:19am 
Not sure where exactly you got the data of the starting stats from, but the X2DownloadableContentInfo_WOTC_PointBasedNCE.uc file has starting stats explicitly formulated as (STAT - RANGE + SHIFT). I can't quite find where that "STAT" is pulling from, but I can't quite find a reason it isn't pulling from the stats found in XComGameData_CharacterStats.ini. Code (with some weird formatting from copy/paste) for comparison:

// The config values are okay, populate BaseStats type and initial value SetStat.STAT = CHANGE_STATS(i).STAT; SetStat.VALUE = Unit.GetBaseStat(CHANGE_STATS(i).STAT) - CHANGE_STATS(i).RANGE + CHANGE_STATS(i).SHIFT; /*DEBUG*/`LOG("Point-Based NCE: Setting Base Stat" @ SetStat.STAT @ "to" @ SetStat.VALUE, default.bDEBUG_LOG,'PBNCE_DEBUG'); BaseStats.AddItem(SetStat);

Also, the MAX_DISTRIBUTION_PASSES seems to top out at 10 based on things pulled from that same file. Otherwise fantastic explanation of the process this mod uses to roll the stats.
Last edited by ArcticJack; 15 Jun, 2024 @ 12:26am
Mr.Pigeon 16 Aug, 2024 @ 5:08pm 
Originally posted by Skasian:
For those who like variance, sharing my config values. I like to run the 'Commander's Choice' mod with this as it allows you to specify what role to promote your Rookie to.

e.g. Rolled a Rookie with 75 Aim but only 2 HP? Send him off to Sharpshooter Camp.
e.g. Got the rare roll of 7 HP and 1 Armor but horrible aim? Send him off to Grenadier Camp and get him that blast padding etc... he is now your utility man.

; Hitpoints: [default values result in HP values of 2 - 7 on Commander Difficulty with a reduced chance of rolling very high HP]
+CHANGE_STATS = (STAT = eStat_HP, RANGE = 2, SHIFT = 0, COST = 10, PLUSONE = true, CHANCE = 65)

; Mobility: [default values result in Mobility values of 9 - 15 with a reduced chance of rolling very high Mobility]
+CHANGE_STATS = (STAT = eStat_Mobility, RANGE = 3, SHIFT = 1, COST = 10, CHANCE = 85)

; Offense / Aim: [default values result in Offense values of 50 - 80 with a reduced chance of rolling very high Aim]
+CHANGE_STATS = (STAT = eStat_Offense, RANGE = 15, SHIFT = 5, COST = 3, CHANCE = 85)

; Will: [default values result in Will values of 33 - 57 with a reduced chance of rolling very high Will]
+CHANGE_STATS = (STAT = eStat_Will, RANGE = 12, SHIFT = 5, COST = 1, CHANCE = 80)

; Defense: [default values result in Defense values of 0 - 30 with a lower % chance of rolling very high defense]
+CHANGE_STATS = (STAT = eStat_Defense, RANGE = 15, SHIFT = 15, COST = 2, CHANCE = 60)

; Dodge: [default values result in Dodge values of 0 - 30 with a lower % chance of rolling very high dodge]
+CHANGE_STATS = (STAT = eStat_Dodge, RANGE = 15, SHIFT = 15, COST = 1, CHANCE = 60)

; Hack: [default values result in Hacking values of 5 - 25 with a lower % chance of rolling very high hack]
+CHANGE_STATS = (STAT = eStat_Hacking, RANGE = 10, SHIFT = 10, COST = 1, CHANCE = 50)

; Psi Offense: [default values result in Psi Offense values of 0 - 20 with a lower % chance of rolling very high Psi]
+CHANGE_STATS = (STAT = eStat_PsiOffense, RANGE = 10, SHIFT = 10, COST = 1, CHANCE = 50)

; Armor: [default values result in Armor values of 0 - 2 with a low chance of occuring and very rare chance of 2 armor]
+CHANGE_STATS = (STAT = eStat_ArmorMitigation, RANGE = 1, SHIFT = 1, COST = 10, CHANCE = 10)


; The number of points that are spent increasing stat values:
INITIAL_POINTS_AVAILABLE = 130

; The maximum number of loops that will be performed to spend points:
; Used to stop the Stat Randomization function if an invalid configuration is entered (ex: 1 point remaining, but you set all the costs to
; 2 or more points, set points higher than all max stats, etc.). Can be reduced to make it more likely low rolls will result in unspent points.
MAX_DISTRIBUTION_PASSES = 7

Hey!

Appreciate this is a Old Post, but having some difficulty fully understanding how to work our the "Initial Points Available" Value for the Changes I have made to the Base Config File. How do you figure out that Value?

Below are the Parameters I am using,

; Hitpoints: [default values result in HP values of 3 - 6]
+CHANGE_STATS = (STAT = eStat_HP, RANGE = 1, SHIFT = 0, COST = 10, PLUSONE = true)

; Mobility: [default values result in Mobility values of 10 - 14]
+CHANGE_STATS = (STAT = eStat_Mobility, RANGE = 2, SHIFT = 1, COST = 10)

; Offense / Aim: [default values result in Offense values of 55 - 75]
+CHANGE_STATS = (STAT = eStat_Offense, RANGE = 10, SHIFT = 5, COST = 3)

; Will: [default values result in Will values of 35 - 55]
+CHANGE_STATS = (STAT = eStat_Will, RANGE = 10, SHIFT = 5, COST = 1)

; Defense: [default values result in Defense values of 0 - 10 (with a 50% chance to change this stat each round)]]
+CHANGE_STATS = (STAT = eStat_Defense, RANGE = 5, SHIFT = 5, COST = 1, CHANCE = 50)

; Dodge: [default values result in Dodge values of 0 - 10 (with a 50% chance to change this stat each round)]]
+CHANGE_STATS = (STAT = eStat_Dodge, RANGE = 5, SHIFT = 5, COST = 1, CHANCE = 50)

; Hack: [default values result in Hacking values of 5 - 15 (with a 50% chance to change this stat each round)]
+CHANGE_STATS = (STAT = eStat_Hacking, RANGE = 5, SHIFT = 5, COST = 1, CHANCE = 50)

; Psi Offense: [default values result in Psi Offense values of 0 - 10 (with a 50% chance to change this stat each round)]
;+CHANGE_STATS = (STAT = eStat_PsiOffense, RANGE = 5, SHIFT = 5, COST = 1, CHANCE = 50)

; (This illustrates how to use the PLUSONE arguement to setup an odd range - say you want a 0-1 range on armor...)
; Armor: [default values result in Armor values of 0 - 1 (with a 50% chance to change this stat each round)]
;+CHANGE_STATS = (STAT = eStat_ArmorMitigation, RANGE = 0, SHIFT = 0, COST = 10, PLUSONE = true, CHANCE = 50)


; The number of points that are spent increasing stat values:
INITIAL_POINTS_AVAILABLE = (?? Unsure what to make this)

; The maximum number of loops that will be performed to spend points:
; Used to stop the Stat Randomization function if an invalid configuration is entered (ex: 1 point remaining, but you set all the costs to
; 2 or more points, set points higher than all max stats, etc.). Can be reduced to make it more likely low rolls will result in unspent points.
MAX_DISTRIBUTION_PASSES = 6

Any help would be greatly appreciated!
Skasian 24 Aug, 2024 @ 4:15am 
Old post indeed. The best way to think of initial points available is the amount of variance you want. The more intial points available the highest the variance.

Each stat change it rolls when loading a XCOM cost as certain amount of point. If I recall correctly, it runs them in order. So hitpoints will be the first roll and it Costs: 10 points. Then it move onto the next stat and rolls that, using up more points until it reaches the end of the list then it repeats from the top.

One it runs out of points to spend rolling for stats it stops and gives you your XCOM member.

So the more points, the more rolling of stats. I remember experimenting with this and I recall settling on 130 as my value as it gave enough difference for my liking between solders whilst minimising seriously absurd unusable ones due to extreme rolls.

I'd suggest to try playing around with values and start a few new campaigns and see what it gives you till you find a happy number for your liking.
< >
Showing 1-6 of 6 comments
Per page: 1530 50