Disease Payload Script

From NWN Lexicon
Jump to: navigation, search

A disease payload script runs if setup in disease.2da under the column End_Incu_Script or 24_Hour_Script.


There are 2 triggers:

  • End_Incu_Script fires only ever once, at the end of the incubation period if a failed save occurs.
  • 24_Hour_Script fires after failing a fortitude save each 24 hours

Resting makes the incubation period occur instantly ignoring that timer.

Further in-depth information on disease.2da payloads can be found on the nwn.wiki: [1].


  • OBJECT_SELF is the affected object.
  • Since only one disease can be present at once on a creature, you can loop the effects on OBJECT_SELF to find EFFECT_TYPE_DISEASE and extrapolate the disease owner. Note that this may be an invalid object (and commonly is so long after combat with them).


Bioware uses this to apply additional disease effects, some what mimicking the 3.0E rules. They tend to only use the 24 hour script OR the incubation script not both. Since the incubation script can be skipped from an initially successful fortitude save it is useful as a "once only" check.

Since the script runs from OBJECT_SELF, they essentially apply hostile effects to themselves with all the various checks for Versus Alignment, Versus Racial Type and so forth for immunity and other purposes. To get around this you can assign the creation of effects to the module instead.


//:: Disease: Red Slaad, Incubation
//:: NW_S3_SlaadEgg
//:: Copyright (c) 2001 Bioware Corp.
    If by the end of the incubation period the
    character is not cured they take 4d6 damage
    and a Red Slaad bursts from their body and
//:: Created By: Preston Watamaniuk
//:: Created On: Aug 15, 2001
void main()
    //Declare major variables
    object oTarget = OBJECT_SELF;
    effect eSummon = EffectSummonCreature("NW_SP_SLAADRED");
    effect eDam = EffectDamage(d6(4));
    effect eVis = EffectVisualEffect(VFX_IMP_DESTRUCTION);
    effect eKnockdown = EffectKnockdown();
    //Apply the VFX impact and effects
    ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
    ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eKnockdown, oTarget, RoundsToSeconds(2));
    CreateObject(OBJECT_TYPE_CREATURE, "NW_SP_SLAADRED", GetLocation(oTarget));

See Also


GetScriptParam GetPCSpeaker