> For the complete documentation index, see [llms.txt](https://axiomemu.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://axiomemu.gitbook.io/docs/data/item/setitemtype.md).

# SetItemType

This configuration file defines which items can be set (ancient) items and maps them to their corresponding set bonuses in SetItemOption.xml.

## File Location

```
Data/Item/SetItemType.xml
```

## Dependencies

| Depends On                                            | Purpose                              |
| ----------------------------------------------------- | ------------------------------------ |
| [Item.xml](/docs/data/item/item.md)                   | Item definitions by Category/Index   |
| [SetItemOption.xml](/docs/data/item/setitemoption.md) | Set bonus definitions by OptionIndex |

| Depended On By                                          | Purpose                                        |
| ------------------------------------------------------- | ---------------------------------------------- |
| [ItemOptionRate.xml](/docs/data/item/itemoptionrate.md) | SetOptions section determines set tier on drop |

## How It Works

When a player equips items:

1. Server checks if the item is a set item. Bits 0-1 of its SetOption byte must be non-zero; only values 1 and 2 select a usable OptionIndex slot.
2. Looks up the item by Section/Type in this table.
3. Uses bits 0-1 of SetOption to pick the slot: value 1 uses OptionIndex1, value 2 uses OptionIndex2.
4. Counts equipped pieces that share the same resolved OptionIndex across all worn slots.
5. Applies piece and full set bonuses defined in [SetItemOption.xml](/docs/data/item/setitemoption.md) based on that count.

## Structure

```xml
<SetItemTypeList>
    <Item Section="7" Type="1" StatType="3"
          OptionIndex1="11" OptionIndex2="12"/>
</SetItemTypeList>
```

## Attributes

| Attribute      | Type | Description                                                                                                                  |
| -------------- | ---- | ---------------------------------------------------------------------------------------------------------------------------- |
| `Section`      | int  | Item category, matches the Category index in [Item.xml](/docs/data/item/item.md)                                             |
| `Type`         | int  | Item type index within that category                                                                                         |
| `StatType`     | int  | Stat **added** by the item's tier (NOT a requirement, see below)                                                             |
| `OptionIndex1` | int  | First set ID reference into [SetItemOption.xml](/docs/data/item/setitemoption.md). Selected when SetOption bits 0-1 equal 1. |
| `OptionIndex2` | int  | Second set ID reference. Selected when SetOption bits 0-1 equal 2. 0 means this slot is unused.                              |

### StatType Values

A raw 0-based stat index selecting which stat receives the tier bonus.

| Value | Stat      | Effect                                      |
| ----- | --------- | ------------------------------------------- |
| -1    | None      | No stat bonus from the tier (item skipped)  |
| 0     | Strength  | Adds Strength based on the tier             |
| 1     | Dexterity | Adds Agility based on the tier              |
| 2     | Energy    | Adds Energy based on the tier               |
| 3     | Vitality  | Adds Vitality (Stamina) based on the tier   |
| 4     | Command   | Adds Command (Leadership) based on the tier |

{% hint style="danger" %}
**A missing or omitted `StatType` defaults to 0 = Strength, NOT None.** The loader reads it as an integer defaulting to 0. Use `StatType="-1"` if the item should grant no base stat.
{% endhint %}

{% hint style="info" %}
**Stat Tier Multiplier**: The tier bits live in bits 2-3 of the item's SetOption byte. The bonus is `((SetOption >> 2) & 3) * 5`, giving +0, +5, +10, or +15 to the stat selected by StatType. The tier is independent of which set the item belongs to (bits 0-1).
{% endhint %}

### Item Index Calculation

```
ItemIndex = Section * 512 + Type
```

`Section` values match the Category indices in [Item.xml](/docs/data/item/item.md): Swords 0, Axes 1, Maces and Scepters 2, Spears 3, Bows and Crossbows 4, Staffs 5, Shields 6, Helms 7, Armors 8, Pants 9, Gloves 10, Boots 11, Wings / Orbs / Spheres 12, Pets / Rings / Pendants / Misc 13, Jewels / Consumables 14, Scrolls 15.

## OptionIndex Reference

OptionIndex values reference set definitions in [SetItemOption.xml](/docs/data/item/setitemoption.md). The shipped data populates 49 sets. A partial mapping:

| OptionIndex | Set Name  | Example Members (Section, Type)                                       |
| ----------- | --------- | --------------------------------------------------------------------- |
| 1           | Warrior   | Morning Star (2,1), Leather Helm (7,5), Ring of Ice (13,8)            |
| 2           | Anonymous | Small Shield (6,0), Leather Helm (7,5) via second slot                |
| 3           | Hyperion  | Bronze Armor (8,0), Bronze Pants (9,0), Bronze Boots (11,0)           |
| 4           | Mist      | Bronze Helm (7,0)                                                     |
| 5           | Eplete    | Plate Shield (6,9), Pendant of Lighting (13,12)                       |
| 11          | Hyon      | Lighting Sword (0,14), Dragon Helm (7,1), Dragon Armor (8,1)          |
| 12          | Vicious   | Dragon Helm (7,1) via second slot, Dragon Armor (8,1) via second slot |

The full name list (Warrior, Anonymous, Hyperion, Mist, Eplete, Berserker, Garuda, Cloud, Kantata, Rave, Hyon, Vicious, Apollo, Barnake, Evis, Sylion, Heras, Minet, Anubis, Isis, Ceto, Drake, Gaia, Fase, Odin, Elvian, Argo, Karis, Gywen, Aruan, Gaion, Muren, Agnis, Broy, Chrono, Sedemen, Vega, Chamer, Moros, Dione, Hades, Ophion, Meter, Hegaton, Castol, Taros, Nemesis, Amis, Trite) is declared in [SetItemOption.xml](/docs/data/item/setitemoption.md).

{% hint style="info" %}
**Dual Set Membership**: An item with both OptionIndex1 and OptionIndex2 can belong to TWO different sets. The set it contributes to at runtime depends on which value the item's SetOption byte encodes in bits 0-1, not on both at once.
{% endhint %}

## Examples

{% tabs %}
{% tab title="Armor Piece" %}

```xml
<!-- Dragon Helm (Section 7, Type 1) belongs to Hyon set (11) and Vicious set (12) -->
<Item Section="7" Type="1" StatType="3" OptionIndex1="11" OptionIndex2="12"/>
```

* StatType=3: Gains +5 Vitality (Stamina) per tier level
* Can contribute to either Hyon or Vicious set bonuses
  {% endtab %}

{% tab title="Weapon" %}

```xml
<!-- Lighting Sword (Section 0, Type 14) belongs to Hyon set -->
<Item Section="0" Type="14" StatType="0" OptionIndex1="11" OptionIndex2="0"/>
```

* StatType=0: Gains +5 Strength per tier level (0 is Strength, not "none"; use -1 for no bonus)
* OptionIndex2=0 means only the first slot is usable, so the item contributes only to the Hyon set
  {% endtab %}

{% tab title="Accessory" %}

```xml
<!-- Ring of Ice (Section 13, Type 8) belongs to Warrior set -->
<Item Section="13" Type="8" StatType="1" OptionIndex1="1" OptionIndex2="0"/>
```

* StatType=1: Gains +5 Agility (Dexterity) per tier level
* Contributes to Warrior set
  {% endtab %}
  {% endtabs %}

## Important Behavior

{% hint style="info" %}
**Duplicate Weapon and Ring Rule**: When both weapon slots (or both ring slots) hold the exact same item index and that item contributes to the same active OptionIndex, only one of the two counts toward the piece total.
{% endhint %}

{% hint style="info" %}
**SetOption Byte Structure**: The SetOption byte encodes two pieces of information:

* **Bits 0-1**: Which slot to activate. 1 selects OptionIndex1, 2 selects OptionIndex2. Value 0 disables the set behaviour. Value 3 is treated as out of range and is ignored.
* **Bits 2-3**: Stat bonus tier (0-3). Multiplied by 5 to give +0, +5, +10, or +15 on the stat named by StatType.

The SetOption byte is assigned at drop time by the SetOptions section of [ItemOptionRate.xml](/docs/data/item/itemoptionrate.md).
{% endhint %}

{% hint style="warning" %}
**OptionIndex 0**: Setting OptionIndex1 or OptionIndex2 to 0 means that slot never activates a set. This is distinct from Set Index 0, which does not appear in the shipped data.
{% endhint %}

## Common Issues

{% hint style="warning" %}
**Item Not Recognized as Set**: Check that bits 0-1 of the item instance's SetOption byte are 1 or 2. An item that appears in this table but drops without those bits set will not activate any set bonus. The drop-time roll is governed by the SetOptions section of [ItemOptionRate.xml](/docs/data/item/itemoptionrate.md).
{% endhint %}

{% hint style="danger" %}
**Wrong Section/Type**: Section and Type must match a real entry in [Item.xml](/docs/data/item/item.md). A mismatch resolves to an invalid item index and the row is silently ignored at load time.
{% endhint %}
