XCOM 2
[WOTC] Configurable Immunities
44 Comments
RambelZambel Apr 25 @ 2:45am 
is there a way to make immun to rupture?
modifieda4 Oct 28, 2022 @ 2:55pm 
hi, im trying to make lost immune to ParthenogenicPoison in an attempt to prevent cocoons. i added: +CharacterImmunities = (TemplateName=TheLost, AddImmunityName[0]=ParthenogenicPoison) and so on, even for world war L units. im not seeing any changes in a mid game save using another F1. any ideas?
Haite Apr 25, 2022 @ 4:09am 
How about weaknesses?
Boundir  [author] Sep 25, 2021 @ 12:59pm 
Blinded is handled differently iirc. Would probably require to make an ability immune to it using X2Effect_DamageImmunity and then attach this ability to the template you need.
Kiruka Sep 25, 2021 @ 11:03am 
Is it possible to add immunity to Blind?
PЋФƎȠiメ Aug 14, 2021 @ 8:13am 
Ok, thank you for clarifying.
Boundir  [author] Aug 14, 2021 @ 1:09am 
It's different. Chosen strength are not immunities set to the character template but abilities.
You can remove it in XComGameData.ini if you're starting a new game. The ability is called ChosenImuneMelee.
If the ability is already on the Chosen you will need Repurpose Ability or WSR by Iridar to remove it.
PЋФƎȠiメ Aug 14, 2021 @ 12:31am 
Does this work for the Chosen? I'm trying to remove their melee immunity. Where are the Template names? I don't see any files in the game's localization that mention unit names as you stated.
Titanium Highwayman Nov 12, 2020 @ 1:10pm 
Much appreciated.
Boundir  [author] Nov 12, 2020 @ 12:02pm 
Replace "Soldier" by whichever enemy unit character template you want. You can find them in localization files.
Titanium Highwayman Nov 12, 2020 @ 10:50am 
I was wondering how I would use this for removing immunities for enemy units, since the examples provided in both here and the read me mainly focus on the playable characters. Reason being that I'd like to remove fire immunity for the enemies in-game and all that.
NatKerensky Apr 4, 2020 @ 6:41am 
Awesome! Thanks for the help.
Boundir  [author] Apr 4, 2020 @ 6:36am 
I made another mod to create immunities through ini. You can check the code if needed.
With Repurpose Abilities or WSR by Iridar you can attach abilities to other abilities. Same, look at the code, adapt and you have your mod 👍
NatKerensky Apr 4, 2020 @ 6:24am 
That's basically exactly what I'm trying to do. Add Poison and 2 other immunities as a Colonel level upgrade to a class. That said, I've only just finished my first mod yesterday, lol, so I'm not 100% sure how to go about this. Thanks for the info though!
Boundir  [author] Apr 4, 2020 @ 12:45am 
This will apply/remove immunities from a Character. If you want to make it so your Ranger is immune to Poison once he unlock Untouchable, the best way would be:
1- Create the ability granting poison immunity.
2- Attach the ability to Untouchable.
NatKerensky Apr 3, 2020 @ 9:15pm 
Anyone know if this can be used to allow for an ability or perk to add immunities once a soldier unlocks that specific perk? Would the template name just be the ability name?
Blue Aug 26, 2019 @ 4:38pm 
Alright, thank you. I've started watching tutorials on youtube on modding xcom 2 as well so that should work together nicely with the advice you've just given me. Cool!
Boundir  [author] Aug 26, 2019 @ 3:18am 
The Template name for units is Soldier. To grab a specific soldier using his name you will need to use XComGameState_Unit. You can look at MakeSoldierItemsAvailable function in XComHeadquartersCheatManager.uc for example if you have the SDK.
Blue Aug 25, 2019 @ 9:48pm 
Is this for editing the Immunities on a soldier class, or do you mean a specific soldier? I'm really hoping for a specific soldier in my case. Would I replace "TemplateName" with something like "Mark'Blaster'Briggs so it would look like:
+CharacterImmunities = (Mark'Blaster'Briggs=Soldier, AddImmunityName[0]=Fire)
I'm very new to xcom modding myself, just trying to make one soldier have some immunities. I would greatly appreciate any help.
Syro System Jul 25, 2019 @ 1:39pm 
I feel ya on that one. I work as a tram driver so I hate warm, sunny days. The cockpit can end up feeling like a sauna if the AC is underperforming.

Well, I still gotta get my new rig before I start up a new campain, so I'll wait for your mod :)
Boundir  [author] Jul 25, 2019 @ 1:20pm 
Immunities to mental, disorient and poison can be granted using this mod.

Weak to Bluescreen/Emp is something defined in the Character template.
Had a mod almost ready to allow you to change those but didn't have much time to test with the heatwave this week.
Syro System Jul 25, 2019 @ 5:53am 
Is it possible to remove the gatekeeper's stupid weaknesses (bluescreen/EMP and mental effects)?
Because the final enemy to show up in the (vanilla) game should not be possible to counter by simply flashbanging it, and it being weak to bluescreen and EMP makes zero sense since it's not a robot.
Gas grenade can also sometimes make it bug out and waste all it's actions on opening and closing it's shell repeatedly.
Syro System Jul 12, 2019 @ 3:15pm 
If you do end up making a mod that is just "gives chosen crit immunity", I would greatly appreciate it (seeing as the current method available involves quite a lot of steps and potential bugs when mods involved updates).

It's such a small change that adds so much more quality to the fights without needing to rely on something like insanely buffed hp or armour.
Boundir  [author] Jul 12, 2019 @ 3:03pm 
I like this Idea too so I might make a mod out if it.
Boundir  [author] Jul 12, 2019 @ 2:46pm 
Strength are abilities that can be acquired by Chosen. To remove a Strength, you can either remove the line adding it XComGameData.ini or put a semi-colon at the start of the line.

Meaning if you want ChosenBalanced for all Chosen you add the ability using Repurpose Abilities (or other method if you want) and remove it from the Strength in XComGameData.ini
Syro System Jul 12, 2019 @ 2:17pm 
That would require having the new chosen traits mod installed wouldn't it? If so, looks like this will require a bit of mod modding, because there are several traits in that mod that I don't wan't to be on their list of potential rolls.

Also, would I need to re-define the Blanaced strength as a perk for it not to take up a strength slot?
Boundir  [author] Jul 12, 2019 @ 12:20pm 
Ok I see what he did. This mod will not address it but [WOTC] Repurpose Abilities can.
You just have to add the ability ChosenBalanced to all Chosen.
Syro System Jul 12, 2019 @ 7:32am 
There is a mod called "new chosen traits" that adds new strengths and weaknesses to the chosen, one of which is 'Balanced: Chosen will not suffer random crits' which makes it so that the only way to land a crit is to use an ability that auto-crits (even 99% crit chance is ignored).

Personally I REALLY like this method of making the chosen a little harder to kill, as it removes the whole "chosen will die to crits in 1 turn once their cover gets destroyed" crap. The only problem is that it's a strength they need to randomly roll (and takes a strength slot). I want it to be a basic perk that all 3 of them always have (kinda like how all 3 has the same summon trooper ability).
Boundir  [author] Jul 12, 2019 @ 2:19am 
Do you know any unit immune to crit? If you do I could look at it.
The ability to crit is tied to the ability, not the character.
Syro System Jul 11, 2019 @ 8:38am 
Saw the mod that changed ruler and avatar immunities, is it possible to also make chosen immune to crits?
Boundir  [author] Jul 3, 2019 @ 9:56am 
I will update this mod to remove my default changes and let it be used by other mods.
After that I will upload a mod which will apply my changes.
It was not smart to include default changes in the first place when the mod is supposed to be used by other mods, my bad 😅

Meaning if you did you own changes in the file they will be removed so better backup!
Lebowskichild Jun 26, 2019 @ 2:08am 
I believe this mod would help you achieve what you require @marshmallow justice.

Iridar's Weapon Skin Replacer - https://steamcommunity.com/sharedfiles/filedetails/?id=1517938486

It will allow you to hide weapons individually. Although I haven't used it myself, I believe you will need to do the configuring of each weapon. Should not be too hard.
marshmallow justice Jun 25, 2019 @ 8:08am 
i know its off topic but it's been a while since i played xcom let alone tried out mods on it, but does anyone know if a mod exist where you can disable certain mod-added weapons? say you download resistance fire arms.. and halo weapons.. and halo magnum ... and enemy unknown laser weapons.. etc. but you only want SOME of the weapons in each of the packages (so you dont have to balance each and every single one)... can you disable some and stop them from showing up in game? beagle does this but idk how or what mod
Lebowskichild Jun 24, 2019 @ 4:53am 
Thanks again for your answers Boundir.

I appreciate the time and effort you mod making guys put in.

Didn't realise that all the original game code came with the SDK. That is pretty dumb of me to be fair. Well I've already got the full WOTC version installed so I guess the world is now my oyster. :D
Boundir  [author] Jun 24, 2019 @ 3:52am 
Yes for both. I could have named the variable 'Original' instead of 'Previous' but well ¯\_(ツ)_/¯

As stated in the description there are limitations where it won't remove immunities acquired with abilities. I can think of something for that too.

Take the Viper King for example, he has an ability to make him immune to unconscious. This mod won't remove that even if you set 'RemovePreviousImmunity' to true. It would however remove Poison and Mental.
By setting the variable to false it won't remove Poison and Mental.

Yes, just download the SDK, available in Tools from your library :)
Lebowskichild Jun 24, 2019 @ 3:31am 
Hey there again @Boundir.

So just to be clear with the new variable.

RemovePreviousImmunity=false means that the character that has been specified (by using their specified TemplateName) will retain any immunities they originally had and then I can add on top any extra immunities from the list that this mod supports?

Or

RemovePreviousImmunity=true means that the character that has been specified (by using their specified TemplateName) will be stripped of any immunities that they originally had and I can then have full control of which immunies they have using immunities from the list that this mod supports?

Also is it actually possible for me to gain access to the original game code? There have been a few occasions where I would like to look at certain code as I wish to try my hand at mod making.
Boundir  [author] Jun 24, 2019 @ 12:15am 
Some enemies will display immunities when set as abilities. Using Yet another F1, MECs will tell you they are immune to fire and poison damages. It won't tell you Vipers are immune to poison.
p6kocka Jun 23, 2019 @ 9:28pm 
Is it possible to see the immunities as info in combat? Or you have to try and remember?
Boundir  [author] Jun 23, 2019 @ 5:54pm 
Updated! Hope you didn't have time to go too crazy with it yet

- Added 'RemovePreviousImmunity' variable. If set to true it will remove the unit previous immunities, set to false it will add the new ones.
- Removed Commander Avatar previously added immunities.
Boundir  [author] Jun 23, 2019 @ 5:27pm 
Thank you :D

To find about the Sectopod immunities for example you have to look at game code X2Character_DefaultCharacter.uc. I don't believe everyone has access to those files.
That is the reason I am making this update.
Lebowskichild Jun 23, 2019 @ 4:56pm 
Funny that you should mention the already existing immunities as I was just looking in the game configs to find out what enemies have any but I could not find any mention.

If you could add a list of already existing immunites for all enemies that would be fantastic. Or could you possibly point me in the right direction as to where I can find them out myself?

Great Mod by the way as the only other WOTC version that added Ruler immunites had another feature I did not want. Also the addition of being able to add immunities to ANY enemy is massive.
Boundir  [author] Jun 23, 2019 @ 4:36pm 
@Beagle you're very welcome. Make sure to share your craziest ideas !

@Lebowskichild he deserves at least that. And you deserve to be crushed by his cannon :D

Will probably update soon to include another variable. Because as of now you have to include the character previous immunities to not remove them accidentally.
Lebowskichild Jun 23, 2019 @ 4:24pm 
So I can now make Sectopods immune to Frost Bombs???
Beagle Jun 23, 2019 @ 3:50pm 
awesome! thank you very much!