Class WornObjectScript
- Namespace
- SkyrimForge.Papyrus
- Assembly
- SkyrimForge.Game.dll
Functions and comments from WornObject.psc.
These functions operate directly on worn items within the inventory Valid Hand Slot: 0 - Left 1 - Right Valid Slot Masks: See Armor.psc Use zero when using hand slot
public static class WornObjectScript
- Inheritance
-
WornObjectScript
- Inherited Members
Properties
Dispatcher
The dispatcher that binds this script to a form and calls the functions and properties that have no generated member.
public static PapyrusScriptDispatcher Dispatcher { get; }
Property Value
Methods
CreateEnchantment(IActor, int, int, float, IReadOnlyCollection<MagicEffect>, IReadOnlyCollection<float>, IReadOnlyCollection<int>, IReadOnlyCollection<int>)
Creates a new enchantment on the item given the specified parameters all arrays must be the same size created enchantments are not purged from the save when removed or overwritten exact same enchantments are re-used by the game
public static Task CreateEnchantment(IActor akActor, int handSlot, int slotMask, float maxCharge, IReadOnlyCollection<MagicEffect> effects, IReadOnlyCollection<float> magnitudes, IReadOnlyCollection<int> areas, IReadOnlyCollection<int> durations)
Parameters
akActorIActorhandSlotintslotMaskintmaxChargefloateffectsIReadOnlyCollection<MagicEffect>magnitudesIReadOnlyCollection<float>areasIReadOnlyCollection<int>durationsIReadOnlyCollection<int>
Returns
GetDisplayName(IActor, int, int)
Returns the name of this reference this is the name that is displayed
public static Task<string> GetDisplayName(IActor akActor, int handSlot, int slotMask)
Parameters
Returns
GetEnchantment(IActor, int, int)
Returns the player-made enchantment if there is one
public static Task<Enchantment?> GetEnchantment(IActor akActor, int handSlot, int slotMask)
Parameters
Returns
GetItemCharge(IActor, int, int)
public static Task<float> GetItemCharge(IActor akActor, int handSlot, int slotMask)
Parameters
Returns
GetItemHealthPercent(IActor, int, int)
public static Task<float> GetItemHealthPercent(IActor akActor, int handSlot, int slotMask)
Parameters
Returns
GetItemMaxCharge(IActor, int, int)
Works on any enchanted item
public static Task<float> GetItemMaxCharge(IActor akActor, int handSlot, int slotMask)
Parameters
Returns
GetNumReferenceAliases(IActor, int, int)
Returns the number of ref aliases holding this reference
public static Task<int> GetNumReferenceAliases(IActor akActor, int handSlot, int slotMask)
Parameters
Returns
GetPoison(IActor, int, int)
Returns the poison on the specified item
public static Task<Potion?> GetPoison(IActor akActor, int handSlot, int slotMask)
Parameters
Returns
SetDisplayName(IActor, int, int, string, bool)
Sets a reference's display name returns false if force is false and the reference is held by an alias using 'Stored Text' or 'Uses Stored Text' Text Replacement does not use this name and may be lost if forced
public static Task<bool> SetDisplayName(IActor akActor, int handSlot, int slotMask, string name, bool force = false)
Parameters
Returns
SetEnchantment(IActor, int, int, Enchantment, float)
Changes an item's player-made enchantment to something else None enchantment will remove the existing enchantment does not delete the custom enchantment, only removes it
public static Task SetEnchantment(IActor akActor, int handSlot, int slotMask, Enchantment source, float maxCharge)
Parameters
akActorIActorhandSlotintslotMaskintsourceEnchantmentmaxChargefloat
Returns
SetItemHealthPercent(IActor, int, int, float)
public static Task SetItemHealthPercent(IActor akActor, int handSlot, int slotMask, float health)
Parameters
Returns
SetItemMaxCharge(IActor, int, int, float)
Charges Only works on items that have user-enchants
public static Task SetItemMaxCharge(IActor akActor, int handSlot, int slotMask, float maxCharge)