In the game engine all effects have an array integers specifying properties. It's length varies depending on effect's type. In the case of EffectDamage there are 20 integers. For some reason Acaos hardcoded a limit of 15 integers, so you need to edit in nwnx_structs are f_GetInteger.c & f_SetInteger.c. Change the following lines in each from
if (idx < 0 || idx > 15)
to
if (idx < 0 || idx > eff->eff_num_integers)
Not sure if this was intentional or not.
The Integers at these indexes specify the following
0 - 12: These are the Damage amounts in the exact same order as the DAMAGE_TYPE_* constants in nwscript.
13: Set to 1 on a melee damage.
14: Seems usually be 1000, I think it's some action duration.
15: DAMAGE_TYPE_* - This is whatever the damage used to create the effect was.
16: DAMAMGE_POWER_* -- Doesn't seem to work.
17: This seems also seems to flag that the damages are from melee attack when set to 1. If you don't set this to one it will add up all the damages then apply that much for every type that was set.
18: Seems to be set to 1 on a Ranged attack
19: not sure.
My original testing was somewhat limited, having looked at it again it seems this sadly might share the same issuses as Divine Wrath, Divine Favor, etc. I.e. The damage is all unblockable and respects no soak, immunity, resists, etc, which in most cases probably isn't what you'd want. But maybe there is a way, it's a place to start, since it doesn't make much sense that an effect with one damage type would respect defenses and one with two would not.
Modifié par pope_leo, 15 mai 2011 - 08:29 .