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>CraftySentinel
m (Formatting Change)
Line 20: Line 20:


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


'''Function [[LearnEffect - Ingredient|LearnEffect]](int aiIndex)'''
{|class="wikitable" width =100%
*Flags the effect with the given index as known by the player.
!style="text-align:left;"|Function
!style="text-align:left;"|Description
|-
|[[IsHostile - Ingredient|Bool '''IsHostile'''()]]
|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.
|-


'''Function [[LearnAllEffects - Ingredient|LearnAllEffects]]()'''
|[[LearnNextEffect - Ingredient|Int '''LearnNextEffect'''()]]
*Flags the all effects as known by the player.
|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.
|-
 
|}


== 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)'''
{|class="wikitable" width =100%
*Returns the magnitude of the specified effect of this ingredient.
!style="text-align:left;"|Function
!style="text-align:left;"|Description
|-
|[[GetNumEffects - Ingredient|Int '''GetNumEffects'''()]]
|Returns the number of effects on this ingredient.
|-
 
|[[GetNthEffectMagnitude - Ingredient|Float '''GetNthEffectMagnitude'''(Int ''index'')]]
|Returns the magnitude of the specified effect of this ingredient.
|-
 
|[[GetNthEffectArea - Ingredient|Int '''GetNthEffectArea'''(Int ''index'')]]
|Returns the area of the specified effect of this ingredient.
|-


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


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


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


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


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

Revision as of 04:05, 24 October 2013


Extends: Form Script

Script that represents an alchemy ingredient.

Definition

ScriptName Ingredient extends Form

Properties

None

Global Functions

None

Member Functions

Function Description
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

Function Description
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.

Events

None