Durability Fragment
The Durability Fragment determines whether an item can wear down and break over time, based on its usage.
It tracks current durability per item instance and optionally allows items to be repaired or broken, influencing gameplay tags like Broken or Indestructible.
Fragment Tags
This fragment adds the following tags, representing the Broken state and Indestructible trait.
Tag | When Applied |
|---|---|
| When item durability reaches |
| When |
Properties
This fragment has the following properties.
Property | Description |
|---|---|
| Whether the item can lose durability and break. |
| Maximum durability of the item. Only relevant if |
Operations
This fragment exposes the following operations.
Function | Description |
|---|---|
| Returns |
| Returns |
| Returns whether the specified default item data is in a broken state. |
| Returns |
| Returns the maximum durability value defined in this fragment. |
| Returns the current durability of the given item instance. |
| Provides the current durability for a default item data structure. |
| Sets the durability value of the item. |
| Decreases durability by a given wear amount. |
| Restores the item's durability to full. |
Memory
This fragment uses InventoryItemFragmentDurabilityMemory, to store the current durability.
Event Payload
This fragment emits the following events, using InventoryItemDurabilityPayload as the payload structure.
Event | Description |
|---|---|
| Triggered when durability value changes. |