Aller au contenu

Photo

EFFECT_TYPE_DAMAGE - Value?


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
Baaleos

Baaleos
  • Members
  • 1 330 messages
Does anyone know what int value the Effect type - Damage has?

This is potentially more a scripting related issue - but figured Content makers might know.

Im working on some custom damage handling through nwnx, and I suddenly got to an impass.
To detect whether the effect being handled is a damage effect, I need to know what the right int value for its type should be.


As it stands, I cant find it in any 2da, and even in nwscript.nss   - there is no mention of a EFFECT_TYPE_DAMAGE.

But it must have a value somewhere?

#2
Baaleos

Baaleos
  • Members
  • 1 330 messages
Think I got it - seems to be effect type 38 inside nwn.

Note - turns out there is no real EFFECT_TYPE_DAMAGE - damage might be created via EffectDamage()
but it seems that it is applied as an independent function inside nwn, instead of as a subtype as other effects are.

Eg: EffectTrueSeeing etc - would have a publically accessible int value for its effect type.
Damage however, seems to be hidden, and only accessible through the use of nwnx.
(Im doing some work in nwnx to hook the damage event, to modify damage before it gets applied to the player/creature)

Hopfully allowing the creation of custom damage effects, the ability to mitigate or even change the type of damages when they are received.

eg: 500 Fire Damage received - but its a fire elemental receiving it, so reduce it to 0 Fire Damage and Heal instead - that sort of thing.

I've already got the ability to mitigate the damage altogether, and detect the total damage.
Im just working on detecting the damage type, and amount per damage type.

#3
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
<poking the engine...>

SendMessageToPC( oPC, IntToString( EFFECT_TYPE_DAMAGE ));

=)

<...with a stick>