GetCalculatedEquippedWeight
A function added by the ShowOff NVSE Plugin.
Contents
Description
Returns the total amount of Weight for the items that the calling Actor reference has equipped.
This accounts for weight modification effects, including:
- "Modify Light Items" Perk Entry Point
- "Decrease Weight" Weapon Mod effect - note that it does not properly account for it if more than 1 weap. mod with this effect is equipped.
- "Adjust Heavy Weapon Weight" Perk Entry Point
minWeight is the minimum weight an equipped item must have in order to be included in the total. If omitted, it defaults to 0.
flagsMask is 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 count duplicates.
Syntax
(totalWeight:float) actorRefr.GetCalculatedEquippedWeight minWeight:float flagsMask:int
Example
player.GetCalculatedEquippedWeight
Returns the total weight that the player has equipped on all slots, except for unplayable items, such as the Pip-Boy.
player.GetCalculatedEquippedWeight 0 (0b00000000000000000001100)
Returns the combined current weight of the items the player has equipped on the Upper Body and the Left Hand equip slots. If either of those slots are occupied by Unplayable items, they are still counted.
0b00000000000000000001100 (a number in Binary Notation) is equal to 12 in decimal (4 + 8). Bit #2 and #3 are both enabled, which represent Upper Body and Left Hand, respectively.
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 |
- This function does NOT account for most, if not all of the bWeightless(...) options from lStewieAl's Tweaks.