Author Topic: EFFECT_TYPE_DAMAGE - Value?  (Read 620 times)

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
EFFECT_TYPE_DAMAGE - Value?
« on: September 01, 2013, 07:01:03 pm »


               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?
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
EFFECT_TYPE_DAMAGE - Value?
« Reply #1 on: September 01, 2013, 07:57:58 pm »


               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.
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
EFFECT_TYPE_DAMAGE - Value?
« Reply #2 on: September 01, 2013, 07:58:12 pm »


               <poking the engine...>

SendMessageToPC( oPC, IntToString( EFFECT_TYPE_DAMAGE ));

=)

<...with a stick>