XCOM 2
84 ratings
Enhanced Status Penalties WOTC
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
277.925 KB
17 Sep, 2017 @ 7:06pm
26 May, 2023 @ 7:36pm
29 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
Enhanced Status Penalties WOTC

Description
This mod was retooled and renamed. It now provides penalties on all status effects.

-= DEFAULT PARAMETERS =-
; Disoriented already has a Will, Mobility and Offense penalty configurable in INI. It blocks some abilities.
DISORIENTED_DODGE_REDUCTION = -10; Small dodge penalty.
DISORIENTED_HACK_REDUCTION = -10;

; Being blind in WOTC provides no natural penalties. Being blind does not block any abilities.
BLINDED_DODGE_REDUCTION = -20; This is added to the Disorient effect most of the time, so it's cumulative. -30 with defaults.
BLINDED_AIM_REDUCTION = -20; This is added to the Disorient effect most of the time, so it's cumulative. -40 with defaults WOTC INI value.
BLINDED_HACK_REDUCTION = -10; This is added to the Disorient effect most of the time, so it's cumulative. -20 with defaults.

; Burning has no penalties in WOTC other than blocking abilities. It can be removed by Hunkering Down.
BURNING_DODGE_REDUCTION = -10;
BURNING_AIM_REDUCTION = -10;
BURNING_HACK_REDUCTION = -20;

; Acid burning has no penalties in WOTC other than damage.
ACID_BURNING_DODGE_REDUCTION = -10; Small dodge penalty.
ACID_BURNING_AIM_REDUCTION = -10; Small offense penalty.
ACID_BURNING_WILL_REDUCTION = -10;
ACID_BURNING_HACK_REDUCTION = -20;

; Poison already has an aim and mobility penalty configurable in INI.
POISONED_DODGE_REDUCTION = -10;
POISONED_WILL_REDUCTION = -10;
POISONED_HACK_REDUCTION = -10;

; Bleeding does not have any penalties in WOTC, it's pure non-elemental damage over time.
BLEEDING_DODGE_REDUCTION = -10;
BLEEDING_WILL_REDUCTION = -10;
BLEEDING_HACK_REDUCTION = -20;

; Being panicked does not have penalties, but it does prevent you from acting.
; Most action while panicked already have offensive penalties.
PANICKED_DODGE_REDUCTION = -30;

; Being bound will now negate Dodge.
BIND_DODGE_REDUCTION = -50;
BIND_WILL_REDUCTION = -10;

-= COMPATIBILITY =-

No overrides. Uses a Screen Listener to make sure all the PostTemplates are done before this is run in case you added more abilities, weapons and such with these effects on them.

You cannot have negative stats. Special cases like a Aim Mod could allow negative Dodge to affect outcomes, but usually Dodge 0 is Dodge 0 and that's it.
26 Comments
ADVENT Avenger  [author] 27 May, 2023 @ 6:32pm 
I'm opened to making easy broken things work if the change isn't too intense, but I certainly can't fix world fire/acid however. Some of these functions are protected. I remember wanting to change some Fire/Acid things back in the day and being unable to overload the core functions. It would have been so easy.
Kittah Khan 27 May, 2023 @ 5:37pm 
@ADVENT Avenger
Ah, no worries dude, i didn't intend to be overly critical, I know that feeling of "Oh man, I've learned a lot since then." as well.

Thanks for taking a look and fixing some of it regardless, it has a big feature working now,
ADVENT Avenger  [author] 27 May, 2023 @ 4:37pm 
This is an old pre WOTC mod i patched for WOTC. Its 6 years old from incept and i was a junior coder. I dont develop anymore so its probably going to stay as is unfortunately. Overloading the functions of these effects could break a myriad of other mods. Your idea is great and you seem to know what youre doing, feel free to make a new one and potentially take code from here. I would suggest starting fresh.
Kittah Khan 27 May, 2023 @ 2:42am 
CONTINUED

In these functions, simply check against unit state using functions like isBlinded and apply hit/crit/dodge/damage modifiers according to what status effects the attacker/defender have.

Using this method, there is no way for any source of status effects to slip the net and it's fairly light on code compared to your current method, but more limited in what it can do, and status tooltips won't automatically list the changes. (but hit modifiers do)

FANCY-ish:
Use an event listener that listens for status effect applications, when it detects a new effect, it adds your stat changes to it.

This method should be able to do everything you're attempting right now, but more reliably.



However, i recommend the simple method, the will/hack/psi changes are nice, but mostly for flavor's sake.

Hope this helps.
Kittah Khan 27 May, 2023 @ 2:42am 
It works better, but it's still missing a lot of effects, Burning and world-spawned effect instances remain unaffected. (as do weapon effects like the burning from fusion blades, I think?)

I believe your current method of applying these modifiers might be flawed in concept, the potential sources of status effects are too varied to catch.

I think I have some alternatives:

SIMPLE:
Add a hidden passive ability to every single character template.
This ability applies an extension of the X2Effect_Persistent class with the following functions:
GetToHitModifiers
GetToHitAsTargetModifiers
GetAttackingDamageModifier
GetDefendingDamageModifier

CONTINUED
ADVENT Avenger  [author] 26 May, 2023 @ 7:37pm 
I found the **** error. A template's name for difficulty fetching is DataName. Name is also a thing, but it's not the template's actual name. Check the log, it is very verbose now and should show ALL fixes.
ADVENT Avenger  [author] 26 May, 2023 @ 5:57pm 
I got ModBuddy up and running. Checking. I've uploaded a more verbose version that will spam the Launch Log.
Kittah Khan 26 May, 2023 @ 5:41pm 
CONT

Those log entries show up towards the very end of init, as you'd expect.

In your code, you handle skills first, and items later, thus, I postulate that the code handling items is not functioning as you expect.

In game terms, I don't see any changes to the effects of burning and disoriented, as applied by flashbangs and incendiaries.
Kittah Khan 26 May, 2023 @ 5:36pm 
@ADVENT Avenger
The mod IS running, otherwise I wouldn't be seeing this:
BEGIN ESP LOG
[0027.21] ESP: Abilities and Weapon names loaded. Ready.
[0027.21] ESP: Patching Revive with new stat penalties for Disoriented.
[0027.21] ESP: Patching Rend with new stat penalties for Disoriented
...
[0027.22] ESP: Patching Fire Flamethrower with new stat penalties for Panicked
[0027.22] ESP: Patching Hellfire Projector with new stat penalties for Panicked
[0027.22] ESP: Patching Boil Burst with new stat penalties for Poisoned
[0027.22] ESP: Patching Shoot Anyone with new stat penalties for Disoriented
[0027.22] ESP: Patching Smokescreen with new stat penalties for Blinded
END ESP LOG

Going by this, it may just be that the only effects it is touching are only skill-related effects, and not any weapon bonus effects or grenade thrown/launched effects.

No items here, the heavy weapons only show up because their skills are what give them effects, and not the item.
ADVENT Avenger  [author] 26 May, 2023 @ 4:27pm 
Do you see the icons as in the screenshots up top? Or there's just nothing at all?
If you see the icons and numbers and they are correct, you just don't notice them because the penalty isn't very high.
If you see absolutely nothing, the mod is not working for some reason. XCOM often loads mods and then doesn't apply them properly. Sometimes you have to Verify Game Files, sometimes unsub/resub does it.