Background for Skyrim SE
Member of the Actor script
voidfunctionEquipItem(FormakItem, boolabPreventRemoval=false, boolabSilent=false)Native

Description

Wiki Description

Forces this actor to equip the specified item, preventing removal if requested.

Documentation Comment

Forces this actor to equip the specified item, preventing removal if requested


Caveats

CK Wiki - Notes

  • When using EquipItem to equip a custom player-enchanted item to any actor, a bug will prevent the magic effects of that enchantment from taking effect. Normal (non-player-enchanted) items still take effect normally.
  • Equipping an enchanted weapon on an actor that is not in a loaded cell will reset the weapon charge to full.
  • If the calling actor does not have akItem, they will be given one. It is best, however, to add the item with ObjectReference.AddItem(...), then equip it as the item might not otherwise register as equipped.
FrenchTaunterREF.EquipItem(HolyGrailARMO, True) ; Gives them one unless they've already got one
  • In some cases the aforementioned item addition can be utilized to add non-inventory items. The below will add an Alduin NPC form to the player's inventory that, when dropped, will be a full-sized Alduin actor.
Game.GetPlayer().EquipItem((Game.GetForm(0x00032DB7) As ObjectReference).GetBaseObject())
  • Armor equipped while in Actor.OpenInventory(...) or pick-pocketing dialogues will not be visible on the actor until the dialogue is ended. Calling the SKSE function Actor.QueueNiNodeUpdate() straight after calling EquipItem can force the actor to draw the new equipment immediately.
  • The abPreventRemoval flag does not prevent removal by the functions UnEquipAll and RemoveAllItems. It does prevent removal when using EquipItem(OtherItem). The player can still move the item to a container!
  • EquipItem does not work with leveled items.
  • Attempting to Equip or Unequip Quest Alias items via script which are generated via the quest fill to method (as opposed to forced fill of an existing reference) will require you to acquire not only the reference but also the base form (ex: Game.GetPlayer().EquipItem(Alias_Waystone.GetReference().GetBaseObject())

Parameters

FormakItem

CK Wiki Description

The item the actor should equip.

boolabPreventRemoval=false

CK Wiki Description

If true, prevents the actor (or player) from removing the item.

  • Default:False

boolabSilent=false

CK Wiki Description

Should the equip message be silenced?

  • Default:False

Examples

; Force the player to equip the tutu - but they can remove it
Game.GetPlayer().EquipItem(TutuProperty)
; Force Sally to equip the dress - but they can't remove it
Sally.EquipItem(DressProperty, true)

Auto-Generated Example

Form myForm__akItem
bool myBool__abPreventRemoval
bool myBool__abSilent

myActor__toCallFunctionOn.EquipItem(myForm__akItem, myBool__abPreventRemoval, myBool__abSilent)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.