> 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/socketitemtype.md).

# SocketItemType

This configuration file lists the items that can carry seed sphere sockets and the maximum number of socket slots each one supports.

Any item type can be a socket item. There is no longer a fixed set of socketable categories - list any Section/Type here and it becomes socketable. The full table is sent to the client at login (game data sync), so the client recognizes exactly the items configured here for socket handling, drag-and-drop, and tooltips, with no client patch required.

## File Location

```
Data/Item/SocketItemType.xml
```

## Dependencies

| Depends On                          | Purpose                          |
| ----------------------------------- | -------------------------------- |
| [Item.xml](/docs/data/item/item.md) | Item definitions by Section/Type |

| Depended On By                                              | Purpose                                                     |
| ----------------------------------------------------------- | ----------------------------------------------------------- |
| [ItemOptionRate.xml](/docs/data/item/itemoptionrate.md)     | SocketOptions section picks the actual socket count on drop |
| [SocketItemOption.xml](/docs/data/item/socketitemoption.md) | Provides seed, bonus, and package effects for sockets       |

## How It Works

1. An item rolls a socket count from the SocketOptions table in `ItemOptionRate.xml`.
2. If the item is listed in this file, up to `MaxSocket` slots are marked as empty (byte value `0xFE`).
3. Slots that are not created stay at `0xFF` (no socket).
4. Each created slot can later hold one seed sphere byte that encodes both the option index and the sphere level.

If the item is not listed here but is a Pentagram item (handled by the Pentagram system), socket slots are still created up to the engine limit of 5 without consulting this file.

## Structure

```xml
<SocketItemTypeList>
    <Item Section="0" Type="26" MaxSocket="3"/>
    <Item Section="0" Type="37" MaxSocket="5"/>
</SocketItemTypeList>
```

## Attributes

| Attribute   | Type | Range | Description                             |
| ----------- | ---- | ----- | --------------------------------------- |
| `Section`   | int  | 0-15  | Item category                           |
| `Type`      | int  | 0-511 | Item type index within the category     |
| `MaxSocket` | int  | 1-5   | Maximum number of sockets for this item |

### Item Index Calculation

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

### Section Reference

| Section | Category                              |
| ------- | ------------------------------------- |
| 0       | Swords                                |
| 1       | Axes                                  |
| 2       | Maces / Scepters                      |
| 3       | Spears                                |
| 4       | Bows / Crossbows                      |
| 5       | Staffs / Sticks                       |
| 6       | Shields                               |
| 7       | Helms                                 |
| 8       | Armor                                 |
| 9       | Pants                                 |
| 10      | Gloves                                |
| 11      | Boots                                 |
| 12      | Wings / Orbs / Scrolls                |
| 13      | Misc (potions, pets, rings, pendants) |
| 14      | Event / summon items                  |
| 15      | Quest / misc items                    |

{% hint style="info" %}
The stock configuration lists weapons (Sections 0-5) and armor pieces (Sections 6-11), but any Section/Type can be added. Bow Arrows (Section 4 Type 7) and Crossbow Bolts (Section 4 Type 15) are excluded from socket generation even if listed, because the server treats them as ammunition.
{% endhint %}

## Element Restriction by Section

Socket element types are restricted by item section when seeds are generated:

| Item Sections                                 | Allowed Element Types            |
| --------------------------------------------- | -------------------------------- |
| 0-5 (weapons, staffs), excluding arrows/bolts | Fire (1), Ice (3), Lightning (5) |
| 6-11 (shields, armor, pants, gloves, boots)   | Water (2), Wind (4), Earth (6)   |

See [SocketItemOption.xml](/docs/data/item/socketitemoption.md) for the element numbering and per-type effects.

## Examples

{% tabs %}
{% tab title="Weapon" %}

```xml
<!-- Socket Swords -->
<Item Section="0" Type="26" MaxSocket="3"/>
<Item Section="0" Type="27" MaxSocket="3"/>
<Item Section="0" Type="28" MaxSocket="3"/>

<!-- Socket Staffs -->
<Item Section="5" Type="30" MaxSocket="3"/>
<Item Section="5" Type="31" MaxSocket="3"/>
<Item Section="5" Type="37" MaxSocket="5"/>
```

{% hint style="info" %}
Some entries in the stock file (for example Section 0 Types 36 and 37) may not map to items present in a minimal `Item.xml`. They are placeholders for custom server items or future additions.
{% endhint %}
{% endtab %}

{% tab title="Armor Set" %}

```xml
<!-- Socket Armor pieces (all MaxSocket=3) -->
<Item Section="7" Type="45" MaxSocket="3"/>  <!-- Helm -->
<Item Section="8" Type="45" MaxSocket="3"/>  <!-- Armor -->
<Item Section="9" Type="45" MaxSocket="3"/>  <!-- Pants -->
<Item Section="10" Type="45" MaxSocket="3"/> <!-- Gloves -->
<Item Section="11" Type="45" MaxSocket="3"/> <!-- Boots -->
```

{% endtab %}

{% tab title="Shields" %}

```xml
<!-- Socket Shields -->
<Item Section="6" Type="17" MaxSocket="3"/>
<Item Section="6" Type="18" MaxSocket="3"/>
<Item Section="6" Type="19" MaxSocket="3"/>
```

{% endtab %}
{% endtabs %}

## Important Behavior

{% hint style="info" %}
**Socket Count Determination**: The actual socket count on a dropped item is rolled from [ItemOptionRate.xml](/docs/data/item/itemoptionrate.md) SocketOptions. This file only defines the maximum allowed.
{% endhint %}

{% hint style="info" %}
**Empty vs No Socket**: A slot that exists but is unfilled is stored as `0xFE`. A slot that does not exist is stored as `0xFF`. Items not in this list and not Pentagram items cannot have any slots.
{% endhint %}

{% hint style="warning" %}
**Socket Count Capping**: When sockets are generated the count is capped to `MaxSocket`. If the roll asks for 5 sockets but `MaxSocket` is 3, the item is created with 3 slots.
{% endhint %}

{% hint style="info" %}
**Engine Limit**: The server fixes the socket array size at 5 slots per item. `MaxSocket` cannot exceed 5.
{% endhint %}

## Common Issues

{% hint style="warning" %}
**Item Not Getting Sockets**: Verify both conditions: the item is listed here with `MaxSocket > 0`, and [ItemOptionRate.xml](/docs/data/item/itemoptionrate.md) SocketOptions has non-zero rates for the applicable index.
{% endhint %}

{% hint style="danger" %}
**Wrong Section/Type**: Values must match [Item.xml](/docs/data/item/item.md) exactly. A mismatch means the item is not recognized as socketable.
{% endhint %}
