XCOM 2
Armor Chance for Unarmored Units [WOTC]
48 則留言
zin 2023 年 4 月 27 日 下午 5:24 
Ah, yes, very simple. But me, I’m bad at maths, once again. Thank you!
Alex Nares  [作者] 2023 年 4 月 27 日 下午 5:08 
Yes, for 33.33% chance of 1 Armor:

+RandomizedBaseStats=(StatType=eStat_ArmorMitigation, StatAmount=-1, RandStatAmount=3)
zin 2023 年 4 月 27 日 上午 10:00 
Hi, I can’t figure out how to set a 30–35% chance of 1 armour.
Do you know of a configuration that results in that (perhaps, 33.33% chance of 1 armour)?

I came up with this:
+RandomizedBaseStats=(StatType=eStat_ArmorMitigation, StatAmount=-6, RandStatAmount=9)

That’s a 22.22% chance of 1–2 armour, which I use for Faceless, which is nice.
An Essential Hiro 2023 年 4 月 16 日 上午 8:15 
Oh alright then, no worries!
Alex Nares  [作者] 2023 年 4 月 16 日 上午 5:06 
Thanks, but sorry, I am no longer modding XCOM 2.
An Essential Hiro 2023 年 4 月 15 日 上午 10:46 
Any chance of adding frost legion enemies? Also, I've noticed that the Advent Demoman from LW2/LWOTC is not on the list. Great mod though, loved configuring it to up the difficulty curve.
zin 2023 年 4 月 12 日 下午 7:45 
Oop! You’re right! I did forget to put a hyphen before the 1. The weird thing is, I’m pretty sure I used to have that, but I changed it for some reason.

And I had this configuration for 120 enemies… welp! Thanks for the help!

It took me a while to understand how the mod works, but thankfully I got it eventually.
Alex Nares  [作者] 2023 年 4 月 12 日 下午 7:34 
That's because if you have this:

+RandomizedBaseStats=(StatType=eStat_ArmorMitigation, StatAmount= 1 , RandStatAmount= 4 )

That means they start with 1 armor (StatAmount=1) and gain a random amount from 1-4 (RandStatAmount=4) then always -1 afterward. So they gain 0-3 which would result in 4 Armor with their base armor of 1. You probably forgot to put the " - " in front of the 1 (to make it -1 instead of +1).

But all the other stats are correct, great job posting a chart. Looks like you have a correct understanding of how the stats work!
zin 2023 年 4 月 12 日 下午 2:27 
I have a little problem. I’ve encountered Lost Dashers with 4 armour; however, I’ve set them to have a 50% chance of 1–2 armour:
+RandomizedBaseStats=(StatType=eStat_ArmorMitigation, StatAmount= 1 , RandStatAmount= 4 )

I don’t understand why this is happening. Is this due to this mod, you think? I also have WorldWarLost, but that only gives Brutes armour as far as I can tell.
zin 2023 年 4 月 12 日 下午 1:31 
Other options:

16.66% chance of 1 armour (default):
StatAmount= -4 , RandStatAmount= 6

20% chance of 1 armour:
StatAmount= -3 , RandStatAmount= 5

25% chance of 1 armour:
StatAmount= -2 , RandStatAmount= 4
zin 2023 年 4 月 12 日 下午 1:31 
Here are all the configurations I’m using for various enemies for anyone interested:

50% chance of 1 armour:
StatAmount= 0 , RandStatAmount= 2

33.33% chance of 1–2 armour:
StatAmount= -3 , RandStatAmount= 6

50% chance of 1–2 armour:
StatAmount= -1 , RandStatAmount= 4

50% chance of 1–3 armour:
StatAmount= -2 , RandStatAmount= 6

60% chance of 1–3 armour:
StatAmount= -1 , RandStatAmount= 5

66.66% chance of 1–2 armour:
StatAmount= 0 , RandStatAmount= 3

100% chance of 1 armour:
StatAmount= 1 , RandStatAmount= 0

100% chance of 2 armour:
StatAmount= 2 , RandStatAmount= 0

100% chance of 3 armour:
StatAmount= 3 , RandStatAmount= 0 )

100% chance of 1–2 armour:
StatAmount= 1 , RandStatAmount= 2

100% chance of 1–3 armour:
StatAmount= 1 , RandStatAmount= 3
zin 2023 年 4 月 8 日 上午 6:49 
Oh yes, I’m dumb! Thank you.
Alex Nares  [作者] 2023 年 4 月 7 日 下午 10:07 
For 50% chance of 1 Armor:

+RandomizedBaseStats=(StatType=eStat_ArmorMitigation, StatAmount= 0 , RandStatAmount= 2 )

Because the starting armor is 0, then it adds a random range from 1-2 (because RandStatAmount= 2), then always subtract -1.
zin 2023 年 4 月 7 日 下午 3:23 
Okay, I think that’s actually impossible with this configuration.
zin 2023 年 4 月 7 日 上午 10:29 
Thank you. I recently understood how it works. However, I was wondering how to get a 50% chance of 1 armour? Still can’t figure that out.
Alex Nares  [作者] 2023 年 4 月 6 日 下午 6:36 
It's no problem asking questions. You got that line correct. Starting with -1 Armor and then adding a random amount from 0-3 (because that's RandStatAmount = 4 maximum armor added -1). That will result in enemies getting 0 Armor 50% of the time (because it could roll -1 or 0), then 50% chance to roll 1, or 2.
zin 2023 年 4 月 5 日 下午 1:00 
Wait, hold on, I think I figured it out.

+RandomizedBaseStats=(StatType=eStat_ArmorMitigation, StatAmount= -1 , RandStatAmount= 4 )

That’s a 2/4 chance, or a 50% chance, for 1–2 armour. This should mean that any units that do NOT already have armour should spawn with either 1 or 2 armour, 50% of the time, correct?
zin 2023 年 4 月 5 日 下午 12:20 
Sorry for asking so many questions, but this is one of my favourite mods for making the game harder in a subtle way.

Just wondering, could you provide me with the correct line to make it so that all unarmoured enemies have a 50% chance to get 1 OR 2 armour (assuming it’d be a 50/50 chance to get either 1 or 2 armour – and a 50% total chance to get any additional armour)? Much appreciated!
Alex Nares  [作者] 2023 年 4 月 3 日 下午 6:41 
Sorry, I don't know
zin 2023 年 4 月 3 日 上午 3:19 
Whilst it may not work with modded enemies by default, do you know if it works with LWotC?
zin 2023 年 3 月 26 日 下午 1:00 
Thank you!
Alex Nares  [作者] 2023 年 3 月 26 日 下午 12:48 
No that's 50% (and sometimes will be 2 or 3 armor). Because you're starting with -2 (which results in 0 armor), and then a random number from 0-5 is added to your -2.

To make it 25% chance to have 1 armor (and no more than 1 armor), do this:

+RandomizedBaseStats=(StatType=eStat_ArmorMitigation, StatAmount= -2 , RandStatAmount= 4 )
zin 2023 年 3 月 26 日 下午 12:16 
+RandomizedBaseStats=(StatType=eStat_ArmorMitigation, StatAmount= -2 , RandStatAmount= 6 )

This is 25%/26%, right?
Alex Nares  [作者] 2023 年 3 月 25 日 上午 7:48 
Yes, but if you saved your game halfway through a tactical mission, you won't see changes until the next mission.
zin 2023 年 3 月 24 日 上午 10:55 
Does it work mid-campaign?
Alex Nares  [作者] 2023 年 3 月 20 日 下午 9:35 
Correct! You got it. The eStat "ArmorMitigation" is the number of armor points they will start with (however, a negative number means 0 armor). The RandStatAmount is a random number from 1 to X (where X is the number in the RandStatAmount) and this number gets added to the base armor value per spawn and then subtracts -1. So really, if that random stat is 5, then that means 0 to 4 armor gets randomly added to the base value of -3, resulting in 0 armor 80% of the time and 1 Armor 20% of the time.

Answering your first question (does this work for mods adding custom enemies)... only if those enemies are in the INI and have a similar setup for Armor Mitigation. You can add them yourself if they aren't in there already (I'm not actively modding XCOM these days).

To remove this effect from the Lost, delete all of the Lost enemies in this mod from the CharacterStats INI.
zin 2023 年 3 月 20 日 上午 9:48 
I changed all these lines in XCOMGameData_CharacterStats.ini in the mod folder within the workshop folder in the Steam files:
+RandomizedBaseStats=(StatType=eStat_ArmorMitigation, StatAmount= -4 , RandStatAmount= 6 )

to:
+RandomizedBaseStats=(StatType=eStat_ArmorMitigation, StatAmount= -3 , RandStatAmount= 5 )

This makes all unarmoured enemies have a 20% chance, instead of a 17% chance, to get one armour point, correct?
zin 2023 年 3 月 20 日 上午 7:31 
Hi, love the mod; exactly what I was looking for!

Was just wondering, does this work for mods that add custom enemy types – such as A Better ADVENT: WotC?

Also, could you please show me how I could change the chance to something higher, such as 20 or 25%, and exclude The Lost? Thank you!
Alex Nares  [作者] 2021 年 8 月 10 日 下午 8:30 
Actually I believe the Advent Heavy doesn't come with armor. Just an LMG. That's why it was included.
Odd 2021 年 8 月 10 日 下午 2:49 
Hey Alex! Just tried this mod and had an Advent Heavy show up with 0 armor when it should have 1 at base level. Just wondering what might be causing this. I sent you a friend request as I'm using this mod in a current YT run so was hoping to have a quick chat and try to understand it.
steven777 2021 年 7 月 6 日 上午 5:25 
Thanks - adds to gameplay.
Alex Nares  [作者] 2020 年 10 月 10 日 下午 11:10 
You can make it 100% by changing "StatAmount" to 1 and "RandStatAmount" to 1.
Oblivious Naga 2020 年 9 月 16 日 上午 6:48 
Thankis. done something similar with a different mod so I know its doable. Mite make lost super OP but thats half the fun
Alex Nares  [作者] 2020 年 9 月 16 日 上午 5:02 
lmost correct but not quite. Put StatAmount to 1 -- this means the enemy starts with 1 Armor minimum.

And set RandStatAmount for 1 -- this means the game will choose a random number (starting from 0) with a range of 1 possible number ( only 0).

Overall, this would mean that each enemy starts with 1 Armor, then adding a random amount of additional Armor points ranging from 0 to 0.
Oblivious Naga 2020 年 9 月 15 日 上午 7:44 
So if I want to 100% it I would have to set the stat amount to 1 and random stat amount to 0?
Alex Nares  [作者] 2020 年 5 月 14 日 上午 11:22 
Anytime, let me know if you have any more questions or ideas.
CptnHappyTimePie 2020 年 5 月 14 日 上午 11:20 
I was physically hurting my brain when I tried to figure out the math/logic for the settings but I've got there in the end. Thank you again for the mods and taking the time to help, much appreciated
Alex Nares  [作者] 2020 年 5 月 14 日 上午 11:18 
No, the way you have it would give Soldiers a random amount of Armor from 0-4. "StatAmount" is the lowest that the stat can be (in this case, minimum of 0 Armor). Then, "RandStatAmount" adds to the number randomly (including possibly adding 0), so by having a 5 there, it will randomly add up to 5 numbers; either 0, 1, 2, 3, or 4 Armor. <-- There's 5 numbers there)

To make Armor chance 20%, reduce "StatAmount" to -3, then increase the "RandStatAmount" to 5, so the game will randomly add 0, 1, 2, 3, or 4. In that case, the first 4 numbers would result in 0 Armor, with only a roll of 4 adding 1 Armor. BUT as you stated before, you noticed soldiers having less Armor than they should have, that's because if a negative number is rolled, it subtracts from any advanced armor (such as the Armor bonus from Predator Armor, etc). But any numbers lower than 0 will be 0.
CptnHappyTimePie 2020 年 5 月 14 日 上午 10:51 
I actually miss random Xcom Soldiers getting +1 armor now :/ Would setting the following result in a 20% chance for recruits to gain +1 Armor?

+RandomizedBaseStats=(StatType=eStat_ArmorMitigation, StatAmount= 0 , RandStatAmount= 5 )
Alex Nares  [作者] 2020 年 5 月 14 日 上午 10:43 
Thanks for pointing those out, I forgot to remove those from the list (will do that later today). Yes, SparkSoldier is XCOM Sparks.
CptnHappyTimePie 2020 年 5 月 14 日 上午 10:14 
Went ahead and changed to 20% on my end, much better now.

Also finally think I've found the cause of my Soldiers randomly having -2 -1 or +1 Armor :/ I excluded the following because they're Xcom units not ADVENT:

[Soldier_Diff_0 X2CharacterTemplate]
[Soldier_Diff_1 X2CharacterTemplate]
[Soldier_Diff_2 X2CharacterTemplate]
[Soldier_Diff_3 X2CharacterTemplate]

( Unsure if these are Xcom or not so excluded anyway )
[SparkSoldier_Diff_0 X2SparkCharacterTemplate_DLC_3]
[SparkSoldier_Diff_1 X2SparkCharacterTemplate_DLC_3]
[SparkSoldier_Diff_2 X2SparkCharacterTemplate_DLC_3]
[SparkSoldier_Diff_3 X2SparkCharacterTemplate_DLC_3]

Was driving me mad for ages
CptnHappyTimePie 2020 年 5 月 14 日 上午 8:01 
Amazing response and thank you for the detailed instructions on what to edit, really helped.

Going to wait until your official update, love the concept of the mod but with A Better Barracks PLUS in combination with Diverse Enemy by Force Level (manually edited in ADVENTs favor) the result has been fun, but overall mixed.

(still playing with default squad of 4 on Legend, have it set to max upgrade GTS to total of 8 squad)
Alex Nares  [作者] 2020 年 5 月 14 日 上午 7:14 
I'm going to update it later today so that the chance of armor is 16.67% because I noticed that 25% might be a little too strong.
Alex Nares  [作者] 2020 年 5 月 14 日 上午 6:49 
[Read previous post]

It says "StatAmount=-2" which means, the unit will start with -2 Armor. Then you see "RandStatAmount=4" which means it will randomly select between 4 numbers to add (including 0), so in this case it is 0, 1, 2, or 3.

To make Armor chance 20%, reduce "StatAmount" to -3, then increase the "RandStatAmount" to 5, so the game will randomly add 0, 1, 2, 3, or 4. In that case, the first 4 numbers would result in 0 Armor, with only a roll of 4 adding 1 Armor.

The closest you can get to 15% is actually 14.28%. You would have to reduce "StatAmount" to -5, then increase "RandStatAmount" to 7. The game will roll 0, 1, 2, 3, 4, 5, or 6 and only give 1 Armor on a 6.

You will need to edit each character template, as your edits would only apply to the character that you are editing. Best way to do this is to use "Find and Replace" feature to mass-replace all text in the entire document.
Alex Nares  [作者] 2020 年 5 月 14 日 上午 6:49 
Yes - but not in the same way that you're thinking. It isn't a %-based parameter. Currently I have it set so that when a unit spawns, they spawn with a default of -2 Armor (yes a negative number of Armor). Then the game adds a random number of Armor from 0-3. If the final result is less than 0, then the game defaults it to 0.

So if the game rolls 0, 1, or 2, it results in 0 Armor. If the game rolls a 3, then that results in 1 Armor (because if you add -2 and 3, you get 1). All things considered, it is a 25% chance of getting 1 Armor.

So if you wanted to change it to 20% or 15%, go into the mod's folder and open CharacterStats.ini. You'll notice that each character has a line that says "RandomizedBaseStats=(StatType=eStat_ArmorMitigation) <--- This is the Armor stat.

Continued on next post.
CptnHappyTimePie 2020 年 5 月 14 日 上午 4:52 
Is there a way to manually edit the chance down to 15% or 20% through ini edits?
Alex Nares  [作者] 2020 年 5 月 9 日 下午 5:21 
That is a possibility. I will add it to my mod "wish list".
Dad By Daylight 2020 年 5 月 9 日 下午 12:00 
This is great. Do you think a variation of this regarding crit chance would be possible? Making certain enemies randomly more lethal would be fun.