XCOM 2
[WOTC] Configurable Immunities
44 kommentarer
RambelZambel 25. apr. kl. 2:45 
is there a way to make immun to rupture?
modifieda4 28. okt. 2022 kl. 14:55 
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 25. apr. 2022 kl. 4:09 
How about weaknesses?
Boundir  [ophavsmand] 25. sep. 2021 kl. 12:59 
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 25. sep. 2021 kl. 11:03 
Is it possible to add immunity to Blind?
PЋФƎȠiメ 14. aug. 2021 kl. 8:13 
Ok, thank you for clarifying.
Boundir  [ophavsmand] 14. aug. 2021 kl. 1:09 
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メ 14. aug. 2021 kl. 0:31 
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 12. nov. 2020 kl. 13:10 
Much appreciated.
Boundir  [ophavsmand] 12. nov. 2020 kl. 12:02 
Replace "Soldier" by whichever enemy unit character template you want. You can find them in localization files.
Titanium Highwayman 12. nov. 2020 kl. 10:50 
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 4. apr. 2020 kl. 6:41 
Awesome! Thanks for the help.
Boundir  [ophavsmand] 4. apr. 2020 kl. 6:36 
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 4. apr. 2020 kl. 6:24 
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  [ophavsmand] 4. apr. 2020 kl. 0:45 
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 3. apr. 2020 kl. 21:15 
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 26. aug. 2019 kl. 16:38 
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  [ophavsmand] 26. aug. 2019 kl. 3:18 
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 25. aug. 2019 kl. 21:48 
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 25. juli 2019 kl. 13:39 
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  [ophavsmand] 25. juli 2019 kl. 13:20 
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 25. juli 2019 kl. 5:53 
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 12. juli 2019 kl. 15:15 
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  [ophavsmand] 12. juli 2019 kl. 15:03 
I like this Idea too so I might make a mod out if it.
Boundir  [ophavsmand] 12. juli 2019 kl. 14:46 
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 12. juli 2019 kl. 14:17 
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  [ophavsmand] 12. juli 2019 kl. 12:20 
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 12. juli 2019 kl. 7:32 
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  [ophavsmand] 12. juli 2019 kl. 2:19 
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 11. juli 2019 kl. 8:38 
Saw the mod that changed ruler and avatar immunities, is it possible to also make chosen immune to crits?
Boundir  [ophavsmand] 3. juli 2019 kl. 9:56 
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 26. juni 2019 kl. 2:08 
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 25. juni 2019 kl. 8:08 
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 24. juni 2019 kl. 4:53 
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  [ophavsmand] 24. juni 2019 kl. 3:52 
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 24. juni 2019 kl. 3:31 
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  [ophavsmand] 24. juni 2019 kl. 0:15 
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 23. juni 2019 kl. 21:28 
Is it possible to see the immunities as info in combat? Or you have to try and remember?
Boundir  [ophavsmand] 23. juni 2019 kl. 17:54 
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  [ophavsmand] 23. juni 2019 kl. 17:27 
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 23. juni 2019 kl. 16:56 
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  [ophavsmand] 23. juni 2019 kl. 16:36 
@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 23. juni 2019 kl. 16:24 
So I can now make Sectopods immune to Frost Bombs???
Beagle 23. juni 2019 kl. 15:50 
awesome! thank you very much!