Poison Payload Script

From NWN Lexicon
Jump to navigationJump to search

A poison payload script runs if setup in poison.2da under the column Script_1 or Script_2.

Trigger

There are 2 triggers:

  • Script_1 fires when the initial fortitude saving throw is failed
  • 24_Hour_Script fires after 60 seconds and failing a second fortitude saving throw

Resting makes the incubation period occur instantly ignoring that timer.

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


Function(s)

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


Remarks

Bioware uses this to apply additional poison effects, some what mimicking the 3.0E rules. They tend to only use the Script_1 script OR the Script_2 script not both, and commonly do not apply the default ability score damage (even when it'd make sense to do so). Since the Script_1 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 or the original poison creator (got via. the above search method).


Example

//::///////////////////////////////////////////////
//:: Carrions Crawler Brain Juice
//:: NW_S0_1Carrion
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
    Induces Paralysis
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: April 11, 2002
//:://////////////////////////////////////////////

void main()
{
    object oTarget = OBJECT_SELF;
    effect eParal = EffectParalyze();
    effect eVis = EffectVisualEffect(VFX_DUR_PARALYZED);
    effect eLink = EffectLinkEffects(eParal, eLink);

    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(10));
}

See Also

functions:

Poison