XCOM 2
Enhanced Status Penalties WOTC
26 Komentar
Juravis  [pembuat] 27 Mei 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 Mei 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,
Juravis  [pembuat] 27 Mei 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 Mei 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 Mei 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
Juravis  [pembuat] 26 Mei 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.
Juravis  [pembuat] 26 Mei 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 Mei 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 Mei 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.
Juravis  [pembuat] 26 Mei 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.
Kittah Khan 26 Mei 2023 @ 4:02am 
From the log and gameplay, it looks like this isn't applying the modifiers for burning, poisoned, bleeding and acid.

The sole exception for me is Boil Burst's poison from World War Lost, all other sources show no log entries for having been patched.
Dęąth Viper 19 Okt 2022 @ 2:30pm 
Just finished a campaign with about 685 mods, this one included, and had no major issues! Thanks for putting this up.
Olof Plays 26 Sep 2021 @ 10:04am 
This is one of those small but greatly underappreciated challenge increasing type of mods that I love! :)
ZJwh5S 19 Mei 2021 @ 5:38pm 
@ADVENT Avenger
Gotcha. Thanks for the response.
Juravis  [pembuat] 19 Mei 2021 @ 5:32pm 
I dont cover freezing and this is mostly hardcoded you have to start from scratch you cant adapt this to have new functionality
ZJwh5S 19 Mei 2021 @ 5:21pm 
@ADVENT Avenger
Hi. How can I make this compatible with mods like Bitterfrost Protocol? I want to add extra effects for chill and freeze effects for consistency.
Dragon32 12 Mar 2021 @ 1:31am 
@Empusae
AML only shows one kind of conflict, mod class overrides.

Load order is... complex: https://robojumper.github.io/too-real/load-order/
Empusae 11 Mar 2021 @ 11:23pm 
Iam using yours flashbang adds blind effect mod and aim reduction do not stack as it should be (i mean disorientation + blindness = -40 aim). Only disorientation penaly applies. Is it load order issue, cause i dont see any conflict in aml?
Lebowskichild 7 Mar 2020 @ 9:08am 
Haha, will do, I'll try to remember to come back and let you know.
Juravis  [pembuat] 7 Mar 2020 @ 9:06am 
Good question. Only one way to find out. Try it!
Lebowskichild 7 Mar 2020 @ 8:27am 
@ADVENT Avenger could you tell me, if I am to set some of the values to zero, will they still show in the penalties screen.

I'm just a bit anal about having info showing that is not required.
Lebowskichild 22 Sep 2019 @ 3:05pm 
Thanks for the added features,
Juravis  [pembuat] 22 Sep 2019 @ 11:09am 
Mod updated (major overhaul).
Saisher 25 Sep 2017 @ 2:29pm 
"stunned units dodging"
Oh the memories of one HP vipers getting one last kill.
Element UK 18 Sep 2017 @ 3:11am 
totally logical, ty
teh1archon 18 Sep 2017 @ 3:04am 
I always did find it strange that impaired units had no problem incoming fire. Thank you. Now flashbang granade is truely 100% useful 100% of the time.