Difference between revisions of "Ingredient Script"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Cipscis
(Updated links to point to function pages with appropriate names)
imported>Xander9009
m (Fixed typo: missing "e" in "Determines" under 'GetIsNthEffectKnown')
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Script Objects]]
[[Category:SKSE]]
'''Extends:''' [[Form Script]]
'''Extends:''' [[Form Script]]


Line 20: Line 15:


== Member Functions ==
== Member Functions ==
'''bool Function [[IsHostile - Ingredient|IsHostile]]()'''
*Returns whether this ingredient is considered hostile or not.


'''Function [[LearnEffect - Ingredient|LearnEffect]](int aiIndex)'''
:'''Bool [[IsHostile - Ingredient|IsHostile]]()'''
*Flags the effect with the given index as known by the player.
:*Returns whether this ingredient is considered hostile or not.


'''int Function [[LearnNextEffect - Ingredient|LearnNextEffect]]()'''
:'''[[LearnEffect - Ingredient|LearnEffect]](Int ''aiIndex'')'''
*Flags the next unknown effect as known by the player, returning index of learned effect.
:*Flags the effect with the given index as known by the player.
 
:'''Int [[LearnNextEffect - Ingredient|LearnNextEffect]]()'''
:*Flags the next unknown effect as known by the player, returning index of learned effect.
 
:'''[[LearnAllEffects - Ingredient|LearnAllEffects]]()'''
:*Flags the all effects as known by the player.


'''Function [[LearnAllEffects - Ingredient|LearnAllEffects]]()'''
*Flags the all effects as known by the player.


== SKSE Member Functions ==
== SKSE Member Functions ==
'''int Function [[GetNumEffects - Ingredient|GetNumEffects]]()'''
*Returns the number of effects on this ingredient.


'''float Function [[GetNthEffectMagnitude - Ingredient|GetNthEffectMagnitude]](int index)'''
:'''Int [[GetNumEffects - Ingredient|GetNumEffects]]()'''
*Returns the magnitude of the specified effect of this ingredient.
:*Returns the number of effects on this ingredient.
 
:'''Float [[GetNthEffectMagnitude - Ingredient|GetNthEffectMagnitude]](Int ''index'')'''
:*Returns the magnitude of the specified effect of this ingredient.
 
:'''Int [[GetNthEffectArea - Ingredient|GetNthEffectArea]](Int ''index'')'''
:*Returns the area of the specified effect of this ingredient.
 
:'''Int [[GetNthEffectDuration - Ingredient|GetNthEffectDuration]](Int ''index'')'''
:*Returns the duration of the specified effect of this ingredient.


'''int Function [[GetNthEffectArea - Ingredient|GetNthEffectArea]](int index)'''
:'''MagicEffect [[GetNthEffectMagicEffect - Ingredient|GetNthEffectMagicEffect]](Int ''index'')'''
*Returns the area of the specified effect of this ingredient.
:*Returns the MagicEffect of the specified effect of this ingredient.


'''int Function [[GetNthEffectDuration - Ingredient|GetNthEffectDuration]](int index)'''
:'''Int [[GetCostliestEffectIndex - Ingredient|GetCostliestEffectIndex]]()'''
*Returns the duration of the specified effect of this ingredient.
:*Returns which effect of the ingredient has the highest cost.


'''MagicEffect Function [[GetNthEffectMagicEffect - Ingredient|GetNthEffectMagicEffect]](int index)'''
:'''[[SetNthEffectMagnitude - Spell|SetNthEffectMagnitude]](Int ''index'', Float ''value'')'''
*Returns the MagicEffect of the specified effect of this ingredient.
:*Sets the magnitude of the specified effect.


'''int Function [[GetCostliestEffectIndex - Ingredient|GetCostliestEffectIndex]]()'''
:'''[[SetNthEffectArea - Spell|SetNthEffectArea]](Int ''index'', Int ''value'')'''
*Returns which effect of the ingredient has the highest cost.
:*Sets the area of the specified effect.
 
:'''[[SetNthEffectDuration - Spell|SetNthEffectDuration]](Int ''index'', Int ''value'')'''
:*Sets the duration of the specified effect.
 
:'''Bool [[GetIsNthEffectKnown - Ingredient|GetIsNthEffectKnown]](Int ''index'')'''
:*Determines whether the player knows this effect.


== Events ==
== Events ==
None
None
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Script Objects]]
[[Category:SKSE]]

Latest revision as of 16:17, 29 July 2014

Extends: Form Script

Script that represents an alchemy ingredient.

Definition[edit | edit source]

ScriptName Ingredient extends Form

Properties[edit | edit source]

None

Global Functions[edit | edit source]

None

Member Functions[edit | edit source]

Bool IsHostile()
  • Returns whether this ingredient is considered hostile or not.
LearnEffect(Int aiIndex)
  • Flags the effect with the given index as known by the player.
Int LearnNextEffect()
  • Flags the next unknown effect as known by the player, returning index of learned effect.
LearnAllEffects()
  • Flags the all effects as known by the player.


SKSE Member Functions[edit | edit source]

Int GetNumEffects()
  • Returns the number of effects on this ingredient.
Float GetNthEffectMagnitude(Int index)
  • Returns the magnitude of the specified effect of this ingredient.
Int GetNthEffectArea(Int index)
  • Returns the area of the specified effect of this ingredient.
Int GetNthEffectDuration(Int index)
  • Returns the duration of the specified effect of this ingredient.
MagicEffect GetNthEffectMagicEffect(Int index)
  • Returns the MagicEffect of the specified effect of this ingredient.
Int GetCostliestEffectIndex()
  • Returns which effect of the ingredient 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.
Bool GetIsNthEffectKnown(Int index)
  • Determines whether the player knows this effect.

Events[edit | edit source]

None