Steam'i Yükleyin
giriş
|
dil
简体中文 (Basitleştirilmiş Çince)
繁體中文 (Geleneksel Çince)
日本語 (Japonca)
한국어 (Korece)
ไทย (Tayca)
Български (Bulgarca)
Čeština (Çekçe)
Dansk (Danca)
Deutsch (Almanca)
English (İngilizce)
Español - España (İspanyolca - İspanya)
Español - Latinoamérica (İspanyolca - Latin Amerika)
Ελληνικά (Yunanca)
Français (Fransızca)
Italiano (İtalyanca)
Bahasa Indonesia (Endonezce)
Magyar (Macarca)
Nederlands (Hollandaca)
Norsk (Norveççe)
Polski (Lehçe)
Português (Portekizce - Portekiz)
Português - Brasil (Portekizce - Brezilya)
Română (Rumence)
Русский (Rusça)
Suomi (Fince)
Svenska (İsveççe)
Tiếng Việt (Vietnamca)
Українська (Ukraynaca)
Bir çeviri sorunu bildirin
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,
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.
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
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.
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.
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.