Difference between revisions of "MagicEffect Script"
Jump to navigation
Jump to search
imported>Jog |
imported>Quindraco |
||
(9 intermediate revisions by 5 users not shown) | |||
Line 19: | Line 19: | ||
== Member Functions == | == Member Functions == | ||
''' | |||
*Obtains the skill that this magic effect is associated with. | :'''String [[GetAssociatedSkill - MagicEffect|GetAssociatedSkill]]()''' | ||
:*Obtains the skill that this magic effect is associated with. | |||
== SKSE Member Functions == | |||
:;[[SetAssociatedSkill - MagicEffect|SetAssociatedSkill]](String ''skill'') | |||
:*Set the skill associated with the magic effect (eg. Destruction, Restoration, NONE. ) | |||
:;String [[GetResistance - MagicEffect|GetResistance]]() | |||
:*Returns the Resistance that this Magic Effect will be checked against when applied. | |||
:;[[SetResistance - MagicEffect|SetResistance]](String ''skill'') | |||
:*Sets the Resistance that the magic effect will be checked against when applied (eg. MagicResist, PoisonResist or Resist Fire ) | |||
:;Bool [[IsEffectFlagSet - MagicEffect|IsEffectFlagSet]](Int ''flag'') | |||
:*Checks to see if the specified flag is set (See [[MagicEffect Script#Notes|Notes]] for list of flags) | |||
:;[[SetEffectFlag - MagicEffect|SetEffectFlag]](Int ''flag'') | |||
:*Sets the specified flag. | |||
:;[[ClearEffectFlag - MagicEffect|ClearEffectFlag]](Int ''flag'') | |||
:*Clears the specified flag. | |||
:;Float [[GetCastTime - MagicEffect|GetCastTime]]() | |||
:*Returns the casting time of this magic effect. | |||
:;[[SetCastTime - MagicEffect|SetCastTime]](Float ''castTime'') | |||
:*Sets the casting time of this magic effect. | |||
:;Int [[GetSkillLevel - MagicEffect|GetSkillLevel]]() | |||
:*Returns the minimum skill level required to use this magic effect. | |||
:;[[SetSkillLevel - MagicEffect|SetSkillLevel]](Int ''level'') | |||
:*Sets the minimum skill level required to use this magic effect | |||
:;Int [[GetArea - MagicEffect|GetArea]]() | |||
:*Returns the area of this effect | |||
:;[[SetArea - MagicEffect|SetArea]](Int ''area'') | |||
:*Sets the area of this effect | |||
:;Float [[GetSkillUsageMult - MagicEffect|GetSkillUsageMult]]() | |||
:*Returns the skill usage multiplier which is used to calculate the amount of experience earned when using this spell. | |||
:;[[SetSkillUsageMult - MagicEffect|SetSkillUsageMult]](Float ''usageMult'') | |||
:*Sets the skill usage multiplier to the specified amount. | |||
:;Float [[GetBaseCost - MagicEffect|GetBaseCost]]() | |||
:*Returns the base Magicka cost of the effect. | |||
:;[[SetBaseCost - MagicEffect|SetBaseCost]](Float ''cost'') | |||
:*Sets the base Magicka cost of the effect. | |||
:;Light [[GetLight - MagicEffect|GetLight]]() | |||
:*Returns the light object used while casting the effect. | |||
:;[[SetLight - MagicEffect|SetLight]](Light ''obj'') | |||
:*Sets the light object used while casting the effect. | |||
:;EffectShader [[GetHitShader - MagicEffect|GetHitShader]]() | |||
:*Returns the EffectShader that is applied to an Actor when hit. | |||
:;[[SetHitShader - MagicEffect|SetHitShader]](EffectShader ''obj'') | |||
:*Sets the Effectshader used when an Actor is hit. | |||
:;EffectShader [[GetEnchantShader - MagicEffect|GetEnchantShader]]() | |||
:*Returns the EffectShader which is attached to the enchanted object (Only shown for Enchantments) | |||
:;[[SetEnchantShader - MagicEffect|SetEnchantShader]](EffectShader ''obj'') | |||
:*Sets the EffectShader which is attached to the enchanted object (Only shown for Enchantments) | |||
:;Projectile [[GetProjectile- MagicEffect|GetProjectile]]() | |||
:;[[SetProjectile - MagicEffect|SetProjectile]](Projectile ''obj'') | |||
:*Get/Set the [[projectile]] which is fired by the effect | |||
:;Explosion [[GetExplosion - MagicEffect|GetExplosion]]() | |||
:;[[SetExplosion - MagicEffect|SetExplosion]](Explosion ''obj'') | |||
:*Get/Set the [[explosion]] that is created when the projectile of the effect hits. | |||
:;Art [[GetCastingArt - MagicEffect|GetCastingArt]]() | |||
:*Returns the art that is shown on hands while casting. | |||
:;[[SetCastingArt - MagicEffect|SetCastingArt]](Art ''obj'') | |||
:*Sets the casting art. | |||
:;Art [[GetHitEffectArt - MagicEffect|GetHitEffectArt]]() | |||
:*Returns the art object that is applied to the target of the effect on impact. | |||
:;[[SetHitEffectArt - MagicEffect|SetHitEffectArt]](Art ''obj'') | |||
:*Sets the art object that is applied to the target. | |||
:;Art [[GetEnchantArt - MagicEffect|GetEnchantArt]]() | |||
:*Returns the art object that is attached to the enchanted object. (Only shown for enchantments) | |||
:;[[SetEnchantArt - MagicEffect|SetEnchantArt]](Art ''obj'') | |||
:*Sets the art object that is attached to the enchanted object. | |||
:;ImpactDataSet [[GetImpactDataSet - MagicEffect|GetImpactDataSet]]() | |||
:*Returns the impact data set that is used by the effect to determine which (if any) decals should be applied. | |||
:;[[SetImpactDataSet - MagicEffect|SetImpactDataSet]](ImpactDataSet ''obj'') | |||
:* Sets the impact data set for the effect. | |||
:;Spell [[GetEquipAbility - MagicEffect|GetEquipAbility]]() | |||
:*Returns the Ability-Type spell that is applied to the actor who equips a spell or enchanted item that uses this Magic Effect. | |||
:;[[SetEquipAbility - MagicEffect|SetEquipAbility]](Spell ''obj'') | |||
:*Sets the Equip Ability of this Magic Effect. | |||
:;ImageSpaceModifier [[GetImageSpaceMod - MagicEffect|GetImageSpaceMod]]() | |||
:*Returns the image space modifier that is used by the effect. | |||
:;[[SetImageSpaceMod - MagicEffect|SetImageSpaceMod]](ImageSpaceModifier ''obj'') | |||
:*Sets the image space modifier that is used by the Effect. | |||
:;Perk [[GetPerk - MagicEffect|GetPerk]]() | |||
:*Returns the Perk that is applied to actors who are affected by this active effect. (Only works on the Player, Perks will not be applied to other NPCs). | |||
:;[[SetPerk - MagicEffect|SetPerk]](Perk ''obj'') | |||
:*Sets the Perk to be applied to actors who are affected by this active effect. | |||
:;int [[GetCastingType - MagicEffect|GetCastingType]]() | |||
:* Constant Effect 0 ; Fire And Forget 1 ; Concentration 2 | |||
:;int [[GetDeliveryType- MagicEffect|GetDeliveryType]]() | |||
:* Self 0; Contact 1; Aimed 2; Target Actor 3; Target Location 4 | |||
== Events == | == Events == | ||
None | None | ||
== Notes == | |||
* The following is a list of all available flags for use with SetEffectFlag, ClearEffectFlag, IsEffectFlagSet functions: | |||
<source lang="papyrus"> | |||
Hostile 0x00000001 | |||
Recover 0x00000002 | |||
Detrimental 0x00000004 | |||
NoHitEvent 0x00000010 | |||
DispelKeywords 0x00000100 | |||
NoDuration 0x00000200 | |||
NoMagnitude 0x00000400 | |||
NoArea 0x00000800 | |||
FXPersist 0x00001000 | |||
GoryVisuals 0x00004000 | |||
HideInUI 0x00008000 | |||
NoRecast 0x00020000 | |||
Magnitude 0x00200000 | |||
Duration 0x00400000 | |||
Painless 0x04000000 | |||
NoHitEffect 0x08000000 | |||
NoDeathDispel 0x10000000 | |||
</source> |
Latest revision as of 12:38, 4 June 2018
Extends: Form Script (Papyrus)
Script for the manipulation of magic effect base objects.
Definition[edit | edit source]
ScriptName MagicEffect extends Form
Properties[edit | edit source]
None
Global Functions[edit | edit source]
None
Member Functions[edit | edit source]
- String GetAssociatedSkill()
- Obtains the skill that this magic effect is associated with.
SKSE Member Functions[edit | edit source]
- SetAssociatedSkill(String skill)
- Set the skill associated with the magic effect (eg. Destruction, Restoration, NONE. )
- String GetResistance()
- Returns the Resistance that this Magic Effect will be checked against when applied.
- SetResistance(String skill)
- Sets the Resistance that the magic effect will be checked against when applied (eg. MagicResist, PoisonResist or Resist Fire )
- Bool IsEffectFlagSet(Int flag)
- Checks to see if the specified flag is set (See Notes for list of flags)
- SetEffectFlag(Int flag)
- Sets the specified flag.
- ClearEffectFlag(Int flag)
- Clears the specified flag.
- Float GetCastTime()
- Returns the casting time of this magic effect.
- SetCastTime(Float castTime)
- Sets the casting time of this magic effect.
- Int GetSkillLevel()
- Returns the minimum skill level required to use this magic effect.
- SetSkillLevel(Int level)
- Sets the minimum skill level required to use this magic effect
- Int GetArea()
- Returns the area of this effect
- SetArea(Int area)
- Sets the area of this effect
- Float GetSkillUsageMult()
- Returns the skill usage multiplier which is used to calculate the amount of experience earned when using this spell.
- SetSkillUsageMult(Float usageMult)
- Sets the skill usage multiplier to the specified amount.
- Float GetBaseCost()
- Returns the base Magicka cost of the effect.
- SetBaseCost(Float cost)
- Sets the base Magicka cost of the effect.
- Light GetLight()
- Returns the light object used while casting the effect.
- SetLight(Light obj)
- Sets the light object used while casting the effect.
- EffectShader GetHitShader()
- Returns the EffectShader that is applied to an Actor when hit.
- SetHitShader(EffectShader obj)
- Sets the Effectshader used when an Actor is hit.
- EffectShader GetEnchantShader()
- Returns the EffectShader which is attached to the enchanted object (Only shown for Enchantments)
- SetEnchantShader(EffectShader obj)
- Sets the EffectShader which is attached to the enchanted object (Only shown for Enchantments)
- Projectile GetProjectile()
- SetProjectile(Projectile obj)
- Get/Set the projectile which is fired by the effect
- Explosion GetExplosion()
- SetExplosion(Explosion obj)
- Get/Set the explosion that is created when the projectile of the effect hits.
- Art GetCastingArt()
- Returns the art that is shown on hands while casting.
- SetCastingArt(Art obj)
- Sets the casting art.
- Art GetHitEffectArt()
- Returns the art object that is applied to the target of the effect on impact.
- SetHitEffectArt(Art obj)
- Sets the art object that is applied to the target.
- Art GetEnchantArt()
- Returns the art object that is attached to the enchanted object. (Only shown for enchantments)
- SetEnchantArt(Art obj)
- Sets the art object that is attached to the enchanted object.
- ImpactDataSet GetImpactDataSet()
- Returns the impact data set that is used by the effect to determine which (if any) decals should be applied.
- SetImpactDataSet(ImpactDataSet obj)
- Sets the impact data set for the effect.
- Spell GetEquipAbility()
- Returns the Ability-Type spell that is applied to the actor who equips a spell or enchanted item that uses this Magic Effect.
- SetEquipAbility(Spell obj)
- Sets the Equip Ability of this Magic Effect.
- ImageSpaceModifier GetImageSpaceMod()
- Returns the image space modifier that is used by the effect.
- SetImageSpaceMod(ImageSpaceModifier obj)
- Sets the image space modifier that is used by the Effect.
- Perk GetPerk()
- Returns the Perk that is applied to actors who are affected by this active effect. (Only works on the Player, Perks will not be applied to other NPCs).
- SetPerk(Perk obj)
- Sets the Perk to be applied to actors who are affected by this active effect.
- int GetCastingType()
- Constant Effect 0 ; Fire And Forget 1 ; Concentration 2
- int GetDeliveryType()
- Self 0; Contact 1; Aimed 2; Target Actor 3; Target Location 4
Events[edit | edit source]
None
Notes[edit | edit source]
- The following is a list of all available flags for use with SetEffectFlag, ClearEffectFlag, IsEffectFlagSet functions:
Hostile 0x00000001
Recover 0x00000002
Detrimental 0x00000004
NoHitEvent 0x00000010
DispelKeywords 0x00000100
NoDuration 0x00000200
NoMagnitude 0x00000400
NoArea 0x00000800
FXPersist 0x00001000
GoryVisuals 0x00004000
HideInUI 0x00008000
NoRecast 0x00020000
Magnitude 0x00200000
Duration 0x00400000
Painless 0x04000000
NoHitEffect 0x08000000
NoDeathDispel 0x10000000