EffectSavingThrowDecrease(int, int, int)

Create a Saving Throw Decrease effect to lower one Saving Throw type.

effect EffectSavingThrowDecrease(
    int nSave,
    int nValue,
    int nSaveType = SAVING_THROW_TYPE_ALL



The Saving Throw to affect, as defined by the SAVING_THROW_* constants group.


The amount to lower the saving throws by.


The type of resistance this effect applies to as defined by the SAVING_THROW_TYPE_* constants group. (Default: SAVING_THROW_TYPE_ALL)


Returns a new effect object that when applied to a target will lower the nSave Saving Throw by nValue amount when resisting anything that falls under the nSaveType definition.

Only direct save changes (SAVING_THROW_TYPE_ALL), change the values returned by GetWillSavingThrow(), GetFortitudeSavingThrow() and GetReflexSavingThrow(). The different save types are only used when you try FortSave(), WillSave() and ReflexSave() or GetReflexAdjustedDamage(), with the correct saving throw type.

The limit of nValus is unknown.

The target this effect is applied to must be a creature for it to work (even though placeables/doors have saves). This effect cannot be applied instantly, only temporarily or permanently.


Note: nSave and nSaveType are defined by similarly named constant groups and should not be confused.

This will stack with, or decrease with even, any other effects of its type or penalties on items. It will merely cancel out with similar Increases in spell saves - of course, if the parameters for nSave and nSaveType are not matched, nothing will be affected.

It is impossible to see on a character sheet any changes to your saves except direct ones using SAVING_THROW_TYPE_ALL, to your will, fortitude or reflex.

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 separately via. looping valid effects on the target (GetFirst/NextEffect()). See the Effect Tutorial for more details.




// Sample code for applying a 5 penalty to any will saves
// specifically against death saves, to a target

void main()
    // This is the Object to apply the effect to.
    object oTarget = OBJECT_SELF;

    // Create the effect to apply
    effect eSavePen = EffectSavingThrowDecrease(SAVING_THROW_WILL, 5, SAVING_THROW_TYPE_DEATH);

    // Create the visual portion of the effect. This is instantly
    // applied and not persistent with whether 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, eSavePen, oTarget);

See Also

categories: Effects Functions | Saving Throw Functions
constants: SAVING_THROW_* Constants | SAVING_THROW_TYPE_* Constants

 author: John Shuell, editors: Jasperre, Mistress, additional contributor: Jasperre