XCOM 2
Enhanced Status Penalties WOTC
26 opmerkingen
Juravis  [auteur] 27 mei 2023 om 18:32 
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 om 17:37 
@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  [auteur] 27 mei 2023 om 16:37 
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 om 2:42 
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 om 2:42 
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  [auteur] 26 mei 2023 om 19:37 
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  [auteur] 26 mei 2023 om 17:57 
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 om 17:41 
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 om 17:36 
@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  [auteur] 26 mei 2023 om 16:27 
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 om 4:02 
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 om 14:30 
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 om 10:04 
This is one of those small but greatly underappreciated challenge increasing type of mods that I love! :)
ZJwh5S 19 mei 2021 om 17:38 
@ADVENT Avenger
Gotcha. Thanks for the response.
Juravis  [auteur] 19 mei 2021 om 17:32 
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 om 17:21 
@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 mrt 2021 om 1:31 
@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 mrt 2021 om 23:23 
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 mrt 2020 om 9:08 
Haha, will do, I'll try to remember to come back and let you know.
Juravis  [auteur] 7 mrt 2020 om 9:06 
Good question. Only one way to find out. Try it!
Lebowskichild 7 mrt 2020 om 8:27 
@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 om 15:05 
Thanks for the added features,
Juravis  [auteur] 22 sep 2019 om 11:09 
Mod updated (major overhaul).
Saisher 25 sep 2017 om 14:29 
"stunned units dodging"
Oh the memories of one HP vipers getting one last kill.
Element UK 18 sep 2017 om 3:11 
totally logical, ty
teh1archon 18 sep 2017 om 3:04 
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.