Difference between revisions of "Ingredient Script"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Egocarib
(updated links)
imported>CraftySentinel
(Reverted To List)
Line 1: Line 1:
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Script Objects]]
[[Category:SKSE]]
'''Extends:''' [[Form Script]]
'''Extends:''' [[Form Script]]


Line 21: Line 16:
== Member Functions ==
== Member Functions ==


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


|[[LearnEffect - Ingredient|'''LearnEffect'''(Int ''aiIndex'')]]
:'''[[LearnEffect - Ingredient|LearnEffect]](Int ''aiIndex'')'''
|Flags the effect with the given index as known by the player.
:*Flags the effect with the given index as known by the player.
|-


|[[LearnNextEffect - Ingredient|Int '''LearnNextEffect'''()]]
:'''Int [[LearnNextEffect - Ingredient|LearnNextEffect]]()'''
|Flags the next unknown effect as known by the player, returning index of learned effect.
:*Flags the next unknown effect as known by the player, returning index of learned effect.
|-


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


|}


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


{|class="wikitable" width =100%
:'''Int [[GetNumEffects - Ingredient|GetNumEffects]]()'''
!style="text-align:left;"|Function
:*Returns the number of effects on this ingredient.
!style="text-align:left;"|Description
|-
|[[GetNumEffects - Ingredient|Int '''GetNumEffects'''()]]
|Returns the number of effects on this ingredient.
|-


|[[GetNthEffectMagnitude - Ingredient|Float '''GetNthEffectMagnitude'''(Int ''index'')]]
:'''Float [[GetNthEffectMagnitude - Ingredient|GetNthEffectMagnitude]](Int ''index'')'''
|Returns the magnitude of the specified effect of this ingredient.
:*Returns the magnitude of the specified effect of this ingredient.
|-


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


|[[GetNthEffectDuration - Ingredient|Int '''GetNthEffectDuration'''(Int ''index'')]]
:'''Int [[GetNthEffectDuration - Ingredient|GetNthEffectDuration]](Int ''index'')'''
|Returns the duration of the specified effect of this ingredient.
:*Returns the duration of the specified effect of this ingredient.
|-


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


|[[GetCostliestEffectIndex - Ingredient|Int '''GetCostliestEffectIndex'''()]]
:'''Int [[GetCostliestEffectIndex - Ingredient|GetCostliestEffectIndex]]()'''
|Returns which effect of the ingredient has the highest cost.
:*Returns which effect of the ingredient has the highest cost.
|-


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


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


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


|}


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

Revision as of 19:07, 2 February 2014

Extends: Form Script

Script that represents an alchemy ingredient.

Definition

ScriptName Ingredient extends Form

Properties

None

Global Functions

None

Member Functions

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

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.


Events

None