Weight Fragment
The Weight fragment defines how heavy an item is and contributes to encumbrance tracking for the owning inventory. It integrates with stack size to calculate total weight and optionally blocks inventory actions when encumbrance limits are exceeded.
This fragment interacts with Gameplay Attributes using a lightweight approach based on attribute aggregators, avoiding the need for persistent Gameplay Effects. By default, it synchronizes with the default Encumbrance Attribute.
Fragment Tags
This fragment does not contribute any tags by default.
Properties
This fragment has the following properties.
Property | Description |
|---|---|
| The weight of a single item unit. |
| The Gameplay Attribute representing the current encumbrance. |
| The Gameplay Attribute representing the maximum encumbrance allowed. |
| A query used to exclude specific containers (e.g., vendor or loot) from contributing to encumbrance. |
Operations
This fragment exposes the following operations.
Function | Description |
|---|---|
| Calculates the total weight of the item, considering the stack size. |
| Sums the weight of all valid items in the inventory and returns the total. |
| Updates the current encumbrance attribute on the owning actor. |
Memory
This fragment does not define a memory struct but relies on the Stack fragment to calculate the total item weight.
Encumbrance is recomputed dynamically by summing valid item weights across all containers, filtered by ExemptContainerFilterQuery.
Event Payload
This fragment does not define its own event or payload.