Caveats
CK Wiki - Notes
Changing an armor item's mods causes it to be silently unequipped and re-equipped.
Parameters
ObjectModakMod
CK Wiki Description
the base form of a mod that we wish to add & attach to this reference
intaiAttachIndex=0
CK Wiki Description
OPTIONAL:the attach index to put akMod onto. For example, a robot that can take an arm mod in three different places can have this specified to specify which spot the arm mod should go to. Defaults to 1. Has no relevance and can safely be ignored for mods that can only go in one spot.
Examples
; Attach a "RobotArmMod" onto the second slot it can go onto
myRobot.AttachMod(RobotArmMod, 2)Auto-Generated Example
ObjectMod myObjectMod__akMod
int myInt__aiAttachIndex
bool returnedValue = myObjectReference__toCallFunctionOn.AttachMod(myObjectMod__akMod, myInt__aiAttachIndex)Related Pages
Additional References
View this function’s page on the Fallout 4 Creation Kit Wiki
