GetEquippedItemRefs
A function added by the ShowOff NVSE Plugin version 1.25.
Description
Returns an array containing the calling Actor reference's equipped items (as Inventory References). When called without specifying any arguments, will return all equipped Playable Items. Otherwise, filters and effects can be used to determine what items will be added to the array.
Parameters
flagsMask: A bitmask containing filters for what kinds of items to get. If flags is omitted / set to 0, the function will check for every playable equipped item. Otherwise, it can be used to specify which equip slots to check for, and further filters.
- If an equipped item occupies multiple equip slots, the function will not return duplicates.
Syntax
(equippedItemRefs:array) ActorRefr.GetEquippedItemRefs filterFlags:int
Example
array_var aItems let aItems := player.GetEquippedItemRefs
aItems will contain every playable item references that the player has equipped.
let aItemRefs := player.GetEquippedItemRefs let iIndex := Ar_Size aItemRefs while (iIndex -= 1) >= 0 let ref rItemRef := aItemRefs[iIndex] rItemRef.RemoveMeIR loop
Removes every playable item that the player has equipped from the player's inventory.
Notes
- The flags used to determine the equip slots to check are:
Equip Slot Flag | Flag Value | Bit |
---|---|---|
Head | 1 | 0 |
Hair | 2 | 1 |
Upper Body | 4 | 2 |
Left Hand | 8 | 3 |
Right Hand | 16 | 4 |
Weapon | 32 | 5 |
PipBoy | 64 | 6 |
Backpack | 128 | 7 |
Necklace | 256 | 8 |
Headband | 512 | 9 |
Hat | 1024 | 10 |
Eyeglasses | 2048 | 11 |
Nosering | 4096 | 12 |
Earrings | 8192 | 13 |
Mask | 16384 | 14 |
Choker | 32768 | 15 |
MouthObject | 65536 | 16 |
BodyAddon1 | 131072 | 17 |
BodyAddon2 | 262144 | 18 |
BodyAddon3 | 524288 | 19 |
- The misc. flags that come after that are:
Misc. Flags | Value | Bit |
---|---|---|
NoUnplayableItems | 1048576 | 20 |
NoQuestItems | 2097152 | 21 |
NoSlotlessItems | 4194304 | 22 |
See Also
- GetEquippedItems - for base forms.
- GetEquippedItemsAsBitMask
- GetEquippedObject
- GetNumBrokenEquippedItems