Difference between revisions of "Potion Script"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>CraftySentinel
(→‎SKSE Member Functions: Added SetNthEffect Functions, should now contain all SKSE functions upto 1.06.16)
imported>Palingard
 
(14 intermediate revisions by 6 users not shown)
Line 22: Line 22:
== Member Functions ==
== Member Functions ==


{|class="wikitable" width =100%
:'''Bool [[IsHostile - Potion|IsHostile]]()'''
!style="text-align:left;"|Function
:*Returns whether this potion is considered hostile or not.
!style="text-align:left;"|Description
|-
|[[IsHostile - Potion|Bool '''IsHostile'''()]]
|Returns whether this potion is considered hostile or not.
|-


|}


== SKSE Member Functions ==
== SKSE Member Functions ==


{|class="wikitable" width =100%
:'''Bool [[IsFood - Potion|IsFood]]()'''
!style="text-align:left;"|Function
:*Returns whether the potion is considered food.
!style="text-align:left;"|Description
|-
|[[IsFood - Potion|Bool '''IsFood'''()]]
|Returns whether the potion is considered food.
|-


|[[GetNumEffects - Potion|Int '''GetNumEffects'''()]]
:'''Bool [[IsPoison- Potion|IsPoison]]()'''
|Returns the number of effects on this potion.
:*Returns whether the potion is considered Poison.
|-


|[[GetNthEffectMagnitude - Potion|Float '''GetNthEffectMagnitude'''(Int ''index'')]]
:'''Int [[GetNumEffects - Potion|GetNumEffects]]()'''
|Returns the magnitude of the specified effect of this potion.
:*Returns the number of effects on this potion.
|-


|[[GetNthEffectArea - Potion|Int '''GetNthEffectArea'''(Int ''index'')]]
:'''Float [[GetNthEffectMagnitude - Potion|GetNthEffectMagnitude]](Int ''index'')'''
|Returns the area of the specified effect of this potion.
:*Returns the magnitude of the specified effect of this potion.
|-


|[[GetNthEffectDuration - Potion|Int '''GetNthEffectDuration'''(Int ''index'')]]
:'''Int [[GetNthEffectArea - Potion|GetNthEffectArea]](Int ''index'')'''
|Returns the duration of the specified effect of this potion.
:*Returns the area of the specified effect of this potion.
|-


|[[GetNthEffectMagicEffect - Potion|MagicEffect '''GetNthEffectMagicEffect'''(Int ''index'')]]
:'''Int [[GetNthEffectDuration - Potion|GetNthEffectDuration]](Int ''index'')'''
|Returns the MagicEffect of the specified effect of this potion.
:*Returns the duration of the specified effect of this potion.
|-


|[[GetCostliestEffectIndex - Potion|Int '''GetCostliestEffectIndex'''()]]
:'''MagicEffect [[GetNthEffectMagicEffect - Potion|GetNthEffectMagicEffect]](Int ''index'')'''
|Returns which effect of the potion has the highest cost.
:*Returns the MagicEffect of the specified effect of this potion.
|-


|[[SetNthEffectMagnitude - Potion|'''SetNthEffectMagnitude'''(Int ''index'', Float ''value'')]]
:'''Int [[GetCostliestEffectIndex - Potion|GetCostliestEffectIndex]]()'''
|Sets the magnitude of the specified effect.
:*Returns which effect of the potion has the highest cost.
|-


|[[SetNthEffectArea - Potion|'''SetNthEffectArea'''(Int ''index'', Int ''value'')]]
:'''[[SetNthEffectMagnitude - Potion|SetNthEffectMagnitude]](Int ''index'', Float ''value'')'''
|Sets the area of the specified effect.
:*Sets the magnitude of the specified effect.
|-


|[[SetNthEffectDuration - Potion|'''SetNthEffectDuration'''(Int ''index'', Int ''value'')]]
:'''[[SetNthEffectArea - Potion|SetNthEffectArea]](Int ''index'', Int ''value'')'''
|Sets the duration of the specified effect.
:*Sets the area of the specified effect.
|-


|}
:'''[[SetNthEffectDuration - Potion|SetNthEffectDuration]](Int ''index'', Int ''value'')'''
:*Sets the duration of the specified effect.
 
:'''SoundDescriptor [[GetUseSound- Potion|GetUseSound]]()'''
:*Returns the [[Sound Descriptor|sound descriptor]] of this potion as a form id.
 
:'''Float[] [[GetEffectMagnitudes - Potion|GetEffectMagnitudes]]()'''
:*Returns all the magnitudes of this object in order.
 
:'''Int[] [[GetEffectAreas- Potion|GetEffectAreas]]()'''
:*Returns all the areas of this object in order.
 
:'''Int[] [[GetEffectDurations - Potion|GetEffectDurations]]()'''
:*Returns all the durations of this object in order.
 
:'''MagicEffect[] [[GetMagicEffects- Potion|GetMagicEffects]]()'''
:*Returns all the magic effects of this object in order.


== Events ==
== Events ==
None
None

Latest revision as of 08:37, 23 September 2016


Extends: Form Script

Script that represents an alchemy potion.

Definition[edit | edit source]

ScriptName Potion extends Form

Properties[edit | edit source]

None

Global Functions[edit | edit source]

None

Member Functions[edit | edit source]

Bool IsHostile()
  • Returns whether this potion is considered hostile or not.


SKSE Member Functions[edit | edit source]

Bool IsFood()
  • Returns whether the potion is considered food.
Bool IsPoison()
  • Returns whether the potion is considered Poison.
Int GetNumEffects()
  • Returns the number of effects on this potion.
Float GetNthEffectMagnitude(Int index)
  • Returns the magnitude of the specified effect of this potion.
Int GetNthEffectArea(Int index)
  • Returns the area of the specified effect of this potion.
Int GetNthEffectDuration(Int index)
  • Returns the duration of the specified effect of this potion.
MagicEffect GetNthEffectMagicEffect(Int index)
  • Returns the MagicEffect of the specified effect of this potion.
Int GetCostliestEffectIndex()
  • Returns which effect of the potion has the highest cost.
SetNthEffectMagnitude(Int index, Float value)
  • Sets the magnitude of the specified effect.
SetNthEffectArea(Int index, Int value)
  • Sets the area of the specified effect.
SetNthEffectDuration(Int index, Int value)
  • Sets the duration of the specified effect.
SoundDescriptor GetUseSound()
Float[] GetEffectMagnitudes()
  • Returns all the magnitudes of this object in order.
Int[] GetEffectAreas()
  • Returns all the areas of this object in order.
Int[] GetEffectDurations()
  • Returns all the durations of this object in order.
MagicEffect[] GetMagicEffects()
  • Returns all the magic effects of this object in order.

Events[edit | edit source]

None