Difference between revisions of "WornObject Script"
Jump to navigation
Jump to search
imported>CraftySentinel m (MIssing '' added) |
imported>Egocarib |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 13: | Line 13: | ||
:'''Float [[GetItemHealthPercent - WornObject|GetItemHealthPercent]](Actor ''akActor'', Int ''handSlot'', Int ''slotMask'')''' | :'''Float [[GetItemHealthPercent - WornObject|GetItemHealthPercent]](Actor ''akActor'', Int ''handSlot'', Int ''slotMask'')''' | ||
:* | :*Returns the item's tempering. | ||
:'''[[SetItemHealthPercent - WornObject|SetItemHealthPercent]](Actor ''akActor'', Int ''handSlot, Int ''slotMask'', Float ''health'')''' | :'''[[SetItemHealthPercent - WornObject|SetItemHealthPercent]](Actor ''akActor'', Int ''handSlot'', Int ''slotMask'', Float ''health'')''' | ||
:* | :*Sets the item's tempering | ||
:'''[[SetItemMaxCharge - WornObject|SetItemMaxCharge]](Actor ''akActor'', Int ''handSlot, Int ''slotMask'', Float ''maxCharge'')''' | :'''[[SetItemMaxCharge - WornObject|SetItemMaxCharge]](Actor ''akActor'', Int ''handSlot'', Int ''slotMask'', Float ''maxCharge'')''' | ||
:* | :*Sets the maximum charge of the worn object.(Only works on player enchants) | ||
:'''Float [[GetItemMaxCharge - WornObject|GetItemMaxCharge]](Actor ''akActor'', Int ''handSlot, Int ''slotMask'')''' | :'''Float [[GetItemMaxCharge - WornObject|GetItemMaxCharge]](Actor ''akActor'', Int ''handSlot'', Int ''slotMask'')''' | ||
:* | :*Returns the worn objects max charge. | ||
:'''Float [[GetItemCharge - WornObject| GetItemCharge]](Actor ''akActor'', Int ''handSlot, Int ''slotMask'')''' | :'''Float [[GetItemCharge - WornObject|GetItemCharge]](Actor ''akActor'', Int ''handSlot'', Int ''slotMask'')''' | ||
:* | :*Returns the current charge of the worn object. | ||
:'''String [[GetDisplayName - WornObject| GetDisplayName]](Actor ''akActor'', Int ''handSlot, Int ''slotMask'')''' | :'''String [[GetDisplayName - WornObject|GetDisplayName]](Actor ''akActor'', Int ''handSlot'', Int ''slotMask'')''' | ||
:* | :*Returns the name of the worn object (This is the name that is displayed) | ||
:'''Bool [[SetDisplayName- WornObject| SetDisplayName]](Actor ''akActor'', Int ''handSlot, Int ''slotMask'', String ''name'', Bool ''forced'')''' | :'''Bool [[SetDisplayName- WornObject|SetDisplayName]](Actor ''akActor'', Int ''handSlot'', Int ''slotMask'', String ''name'', Bool ''forced'')''' | ||
:* | :*Sets the display name of the worn object. | ||
:'''Enchantment [[GetEnchantment - WornObject| GetEnchantment]](Actor ''akActor'', Int ''handSlot, Int ''slotMask | :'''Enchantment [[GetEnchantment - WornObject|GetEnchantment]](Actor ''akActor'', Int ''handSlot'', Int ''slotMask'')''' | ||
:* | :*Returns the player-made enchantment if there is one | ||
:'''[[SetEnchantment - WornObject| | :'''[[SetEnchantment - WornObject|SetEnchantment]](Actor ''akActor'', Int ''handSlot'', Int ''slotMask'', Enchantment ''source'', Float ''maxCharge'')''' | ||
:* | :*Changes an item's player-made enchantment to the specified Enchant and max charge. | ||
:'''[[CreateEnchantment - ObjectReference|CreateEnchantment]](Actor ''akActor'', Int ''handSlot, Int ''slotMask'', Float ''maxCharge'', MagicEffect[] ''effects'', Float[] ''magnitudes'', Int[] ''areas'', Int[] ''durations'')''' | :'''[[CreateEnchantment - ObjectReference|CreateEnchantment]](Actor ''akActor'', Int ''handSlot'', Int ''slotMask'', Float ''maxCharge'', MagicEffect[] ''effects'', Float[] ''magnitudes'', Int[] ''areas'', Int[] ''durations'')''' | ||
:*Creates a new Enchantment on the worn object with the specified parameters. | :*Creates a new Enchantment on the worn object with the specified parameters. | ||
:'''Int [[GetNumReferenceAliases - ObjectReference|GetNumReferenceAliases]](Actor ''akActor'', Int ''handSlot, Int ''slotMask'')''' | :'''Int [[GetNumReferenceAliases - ObjectReference|GetNumReferenceAliases]](Actor ''akActor'', Int ''handSlot'', Int ''slotMask'')''' | ||
:*Returns the number of reference aliases holding this worn object. | :*Returns the number of reference aliases holding this worn object. | ||
:'''ReferenceAlias [[GetNthReferenceAlias - ObjectReference|GetNthReferenceAlias]](Actor ''akActor'', Int ''handSlot, Int ''slotMask'', Int ''n'')''' | :'''ReferenceAlias [[GetNthReferenceAlias - ObjectReference|GetNthReferenceAlias]](Actor ''akActor'', Int ''handSlot'', Int ''slotMask'', Int ''n'')''' | ||
:*Returns the nth Reference alias holding this worn object. | :*Returns the nth Reference alias holding this worn object. | ||
== Notes == | |||
*These functions operate directly on worn/equipped items within the inventory. Valid values for ''handSlot'' are 0 (for left hand) or 1 (for right hand). Valid Slot Masks can be found [[Slot_Masks_-_Armor|here]]. Use slotMask of 0 for weapons. | |||
[[Category:Scripting]] | [[Category:Scripting]] |
Latest revision as of 00:07, 26 July 2014
Script for the manipulation of Worn Objects.
Definition
ScriptName WornObject
SKSE Global Functions
- Float GetItemHealthPercent(Actor akActor, Int handSlot, Int slotMask)
- Returns the item's tempering.
- SetItemHealthPercent(Actor akActor, Int handSlot, Int slotMask, Float health)
- Sets the item's tempering
- SetItemMaxCharge(Actor akActor, Int handSlot, Int slotMask, Float maxCharge)
- Sets the maximum charge of the worn object.(Only works on player enchants)
- Float GetItemMaxCharge(Actor akActor, Int handSlot, Int slotMask)
- Returns the worn objects max charge.
- Float GetItemCharge(Actor akActor, Int handSlot, Int slotMask)
- Returns the current charge of the worn object.
- String GetDisplayName(Actor akActor, Int handSlot, Int slotMask)
- Returns the name of the worn object (This is the name that is displayed)
- Bool SetDisplayName(Actor akActor, Int handSlot, Int slotMask, String name, Bool forced)
- Sets the display name of the worn object.
- Enchantment GetEnchantment(Actor akActor, Int handSlot, Int slotMask)
- Returns the player-made enchantment if there is one
- SetEnchantment(Actor akActor, Int handSlot, Int slotMask, Enchantment source, Float maxCharge)
- Changes an item's player-made enchantment to the specified Enchant and max charge.
- CreateEnchantment(Actor akActor, Int handSlot, Int slotMask, Float maxCharge, MagicEffect[] effects, Float[] magnitudes, Int[] areas, Int[] durations)
- Creates a new Enchantment on the worn object with the specified parameters.
- Int GetNumReferenceAliases(Actor akActor, Int handSlot, Int slotMask)
- Returns the number of reference aliases holding this worn object.
- ReferenceAlias GetNthReferenceAlias(Actor akActor, Int handSlot, Int slotMask, Int n)
- Returns the nth Reference alias holding this worn object.
Notes
- These functions operate directly on worn/equipped items within the inventory. Valid values for handSlot are 0 (for left hand) or 1 (for right hand). Valid Slot Masks can be found here. Use slotMask of 0 for weapons.