Skip to content

tes3magicEffect⚓︎

A core magic effect definition.

This type inherits the following: tes3baseObject.

Properties⚓︎

allowEnchanting⚓︎

Access to the flag that determines if this effect can be used in enchanting.

Returns:

  • result (boolean)

allowSpellmaking⚓︎

Access to the flag that determines if this effect can be used with spellmaking.

Returns:

  • result (boolean)

appliesOnce⚓︎

Access to the base flag that determines if this effect is applied only once.

Returns:

  • result (boolean)

areaSoundEffect⚓︎

The sound effect that plays on area of effect impacts. Can be set to nil to use the default sound effect for the magic school.

Returns:


areaVisualEffect⚓︎

The visual played when a spell with this effect, with area of effect hits something.

Returns:


baseFlags⚓︎

No description yet available.

Returns:

  • result (number)

baseMagickaCost⚓︎

The base magicka cost to use in calculations.

Returns:

  • result (number)

bigIcon⚓︎

The path to the large icon to use for the effect. This is derived from the base icon path.

Returns:

  • result (string)

blocked⚓︎

The blocked state of the object.

Returns:

  • result (boolean)

boltSoundEffect⚓︎

The sound effect that plays for magic projectiles. Can be set to nil to use the default sound effect for the magic school.

Returns:


boltVisualEffect⚓︎

The visual played when a spell with this effect is in flight.

Returns:


canCastSelf⚓︎

Access to the base flag that determines if this effect can be used with a range of self.

Returns:

  • result (boolean)

canCastTarget⚓︎

Access to the base flag that determines if this effect can be used with a range of target.

Returns:

  • result (boolean)

canCastTouch⚓︎

Access to the base flag that determines if this effect can be used with a range of touch.

Returns:

  • result (boolean)

casterLinked⚓︎

Access to the base flag that determines if this effect must end if caster is dead, or not an NPC/creature. Not allowed in container or door trap spells.

Note that this property is hidden in the Construction Set.

Returns:

  • result (boolean)

castSoundEffect⚓︎

The sound effect that plays when casting. Can be set to nil to use the default sound effect for the magic school.

Returns:


castVisualEffect⚓︎

The visual played when a spell with this effect is cast.

Returns:


deleted⚓︎

Read-only. The deleted state of the object.

Returns:

  • result (boolean)

description⚓︎

Player-facing description of the effect.

Returns:

  • result (string)

disabled⚓︎

Read-only. The disabled state of the object.

Returns:

  • result (boolean)

flags⚓︎

Raw access to the numerical representation of flags. Typically shouldn't be used.

Returns:

  • result (number)

hasActorLighting⚓︎

If true, the spell will count as a light spell. This can matter when calculating lights on mobiles.

Returns:

  • result (boolean)

hasContinuousVFX⚓︎

Access to the base flag that determines if this effect's VFX continuously plays for the full duration of the spell, rather than occuring once on hit.

Returns:

  • result (boolean)

hasNoDuration⚓︎

Access to the base flag that determines if this effect doesn't use a duration.

Returns:

  • result (boolean)

hasNoMagnitude⚓︎

Access to the base flag that determines if this effect doesn't make use of its magnitude.

Returns:

  • result (boolean)

hitSoundEffect⚓︎

The sound effect that plays when the effect hits a target. Can be set to nil to use the default sound effect for the magic school.

Returns:


hitVisualEffect⚓︎

The visual played when a spell with this effect hits something.

Returns:


icon⚓︎

The path to the icon to use for the effect.

Returns:

  • result (string)

id⚓︎

Read-only. The unique identifier for the magic effect. Maps to values in tes3.effect. Values not defined in tes3.effect are also possible for magic effects added by mods that don't use tes3.claimSpellEffectId() to register their id.

Returns:


illegalDaedra⚓︎

Access to the base flag that determines if this effect summons an illegal daedra. This flag isn't used.

Returns:

  • result (boolean)

isHarmful⚓︎

Access to the base flag that determines if this effect is counted as a hostile action.

Returns:

  • result (boolean)

lightingBlue⚓︎

The amount of blue lighting to use when lighting projectiles. This is also used for coloring the enchanted item effect.

Returns:

  • result (number)

lightingGreen⚓︎

The amount of green lighting to use when lighting projectiles. This is also used for coloring the enchanted item effect.

Returns:

  • result (number)

lightingRed⚓︎

The amount of red lighting to use when lighting projectiles. This is also used for coloring the enchanted item effect.

Returns:

  • result (number)

modified⚓︎

The modification state of the object since the last save.

Returns:

  • result (boolean)

name⚓︎

Read-only. Player-facing name of the effect.

Returns:

  • result (string)

nonRecastable⚓︎

Access to the base flag that determines if this effect can be refreshed by recasting.

Returns:

  • result (boolean)

objectFlags⚓︎

Read-only. The raw flags of the object.

Returns:

  • result (number)

objectType⚓︎

Read-only. The type of object. Maps to values in tes3.objectType.

Returns:


particleTexture⚓︎

Read-only. The path to use for the particle effect texture.

Returns:

  • result (string)

persistent⚓︎

The persistent flag of the object.

Returns:

  • result (boolean)

school⚓︎

The school that the effect is associated with. Maps to tes3.magicSchool constants.

Returns:


size⚓︎

Controls how much the visual effect scales with its magnitude.

Returns:

  • result (number)

sizeCap⚓︎

The maximum possible size of the spell projectile with this effect.

Returns:

  • result (number)

skill⚓︎

Read-only. The skill for the associated school that the effect is associated with. This skill is used when calculating experience gain per skill after a spell with this effect is cast. Maps to values in tes3.skill namespace.

Returns:


sourceless⚓︎

The sourceless flag of the object.

Returns:

  • result (boolean)

sourceMod⚓︎

Read-only. The filename (including the extension) of the mod that owns this object. It has nil value if the object was anything other than loaded from an ESP or ESM file.

Returns:

  • result (string)

speed⚓︎

No description yet available.

Returns:

  • result (number)

spellFailureSoundEffect⚓︎

Read-only. The sound effect that plays when a spell fails to cast, and when magic is resisted. This is determined only by the spell school.

Returns:


supportsActivate⚓︎

If true, the object supports activation. This includes all the items (excluding non-carriable lights), actors outside combat, activators, containers and doors.

However, the activation of such an object may still be blocked via mwscript or a Lua script.

Returns:

  • result (boolean)

supportsLuaData⚓︎

If true, references of this object can store temporary or persistent lua data.

Returns:

  • result (boolean)

targetsAttributes⚓︎

Access to the base flag that determines if this effect makes use of attributes.

Returns:

  • result (boolean)

targetsSkills⚓︎

Access to the base flag that determines if this effect makes use of skills.

Returns:

  • result (boolean)

unreflectable⚓︎

Access to the base flag that determines if this effect can't be reflected.

Returns:

  • result (boolean)

usesNegativeLighting⚓︎

Access to the base flag that determines if this effect provides negative lighting.

Returns:

  • result (boolean)

Methods⚓︎

__tojson⚓︎

Serializes the object to json.

local string = myObject:__tojson()

Returns:

  • string (string)

isValid⚓︎

Checks to see if the object still points to valid memory. This should be done any time when the object may have been deleted since the variable's last use (e.g. in timer callbacks).

local valid = myObject:isValid()

Returns:

  • valid (boolean)