> For the complete documentation index, see [llms.txt](https://roogame.gitbook.io/roogame/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://roogame.gitbook.io/roogame/roo-gameplay-framework/inventory-and-equipment/equipment-and-stat-integration.md).

# Equipment and Stat Integration

Equipment slots are configured on Roo Inventory Component or created from registered Equipment Slot widgets.

A slot contains:

* Slot Index
* Slot Tag
* Accepted Type Tag
* Equipped Item Instance

## Acceptance rules

If Accepted Type Tag is empty, the slot accepts any valid item.

If it is set, the item's Item Tag must match the accepted tag through Gameplay Tag hierarchy matching.

Example using a project-owned namespace:

```
Accepted Type Tag: MyGame.Inventory.Item.Equipment.Weapon
Item Tag: MyGame.Inventory.Item.Equipment.Weapon.Sword
Result: Accepted
```

Inventory tag roots are project-defined and are not changed by the Stats Designer Tag Namespace field. The included demo uses corresponding tags under `RooRPGDemo`.

## Equip nodes

* Equip Item From Inventory Slot
* Equip Item From Inventory Slot By Index
* Equip Item By Instance
* Equip Item By Instance To Index
* Toggle Equip Item From Inventory Slot

Unequip nodes:

* Unequip Item
* Unequip Item By Index
* Unequip Item To Inventory Slot
* Unequip Item To Inventory Slot By Index

Before equipping, use Can Equip Item To Slot or Can Equip Item To Slot Index when you need to preview validity in UI.

## Automatic modifiers

When an item is equipped, each valid item Property is resolved and sent to Roo Stats Component as a modifier.

Mapping:

```
Property Tag -> target Stat Tag
Constant Number or Formula -> Constant modifier
Percent Number or Formula -> Percent modifier
```

The inventory stores the returned modifier handles and a Source Id for the equipped instance. When that equipment slot is replaced or unequipped, those modifiers are removed.

A Property Tag must resolve to a Stat present in the target Stats Component. Attribute tags are not equipment modifier targets.

## Percent values

Equipment percent values are ratios:

```
0.10 = +10 percent
-0.25 = -25 percent
```
