Mod:Creation Kit/AttachModToInventoryItem - ObjectReference

Member of: Mod:Creation Kit/ObjectReference Script

Attach a mod to an item in this object's inventory.

Syntax
bool Function AttachModToInventoryItem(Form akItem, ObjectMod akMod) native

Parameters

 * akItem: a base form of the item we want to modify
 * akMod: a base form of the mod we want to add/attach to akItem

Return Value
True if it successfully attached the mod, false otherwise. Note that this is only going to check that the mod found an attach point to attach to; it will not check what type of mod it is or if it replaced another mod already on the item.

Examples
BobRef.AttachModToInventoryItem(PowerArmorObject, PowerArmorRightArmMod)
 * attach a new arm armor mod to Bob's power armor