From NWN Lexicon
Revision as of 21:34, 25 August 2012 by Dood (talk | contribs)
Jump to: navigation, search

EffectCurse(int, int, int, int, int, int)

Create a Curse effect.

 [[effect | effect ]] EffectCurse(
     [[int | int ]] nStrMod = 1,
     [[int | int ]] nDexMod = 1,
     [[int | int ]] nConMod = 1,
     [[int | int ]] nIntMod = 1,
     [[int | int ]] nWisMod = 1,
     [[int | int ]] nChaMod = 1



strength modifier (Default: 1)


dexterity modifier (Default: 1)


constitution modifier (Default: 1)


intelligence modifier (Default: 1)


wisdom modifier (Default: 1)


charisma modifier (Default: 1)


Returns a new effect object that when applied to a target will reduce their ability scores by the amounts given in the parameters.

It is unknown (although likely) that curses do not stack, or at least the peanlties from more then 1 curse together, as how EffectAbilityDecrease.

A value of 0 should mean just no decrease in that ability. If all are 0, it is likely to return an invalid effect.

The target this effect is applied to must be a creature for it to work. This effect cannot be applied instantly, only temporarily or permanently.


Modifiers should be given in positive amounts, the script will apply them negatively.

Effect functions are Constructors, which are special methods that help construct effect "objects". You can declare and link effects, and apply them using an ApplyEffectToObject() Command. Once applied, each effect can be got seperately via. looping valid effects on the target (GetFirst/NextEffect()). See the Effect Tutorial for more details.




 // Sample code for applying a Curse of 1 of every stat to a target
 void main()
     // This is the Object to apply the effect to.
     object oTarget = OBJECT_SELF;
     // Create the effect to apply
     effect eCurse = EffectCurse(1, 1, 1, 1, 1, 1);
     // Create the visual portion of the effect. This is instantly
     // applied and not persistant with wether or not we have the
     // above effect.
     effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
     // Apply the visual effect to the target
     ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
     // Apply the effect to the object   
     ApplyEffectToObject(DURATION_TYPE_PERMANENT, eCurse, oTarget);

See Also

 author: John Shuell, editor: Jasperre, additional contributor(s): Jasperre