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

# 380ItemType

This configuration file defines which items can receive 380-level enhancement options and maps them to specific option types from 380ItemOption.xml.

## File Location

```
Data/Item/380ItemType.xml
```

## Dependencies

| Depends On                                            | Purpose                                    |
| ----------------------------------------------------- | ------------------------------------------ |
| [Item.xml](/docs/data/item/item.md)                   | Item definitions by Category/Type          |
| [380ItemOption.xml](/docs/data/item/380itemoption.md) | Option type definitions and default values |

## How It Works

1. Player obtains a 380-enhanced item (carries the 380 flag on its extended option byte, bit 0x80)
2. Server looks up the item in 380ItemType by the combined item index (Category \* 512 + Type)
3. Retrieves OptionIndex1/2 (option types) and OptionValue1/2 (raw values)
4. `*` in OptionValue is stored internally as -1 and triggers fallback to the default Value in [380ItemOption.xml](/docs/data/item/380itemoption.md); any other string is parsed as an integer (non-numeric strings become 0)
5. Applies each option that has a non-zero index and a matching entry in 380ItemOption.xml

## Structure

```xml
<Item380TypeList>
    <Item Category="0" Type="22" OptionIndex1="2" OptionValue1="*" OptionIndex2="1" OptionValue2="*"/>
</Item380TypeList>
```

## Attributes

| Attribute      | Type   | Description                                                                                                        |
| -------------- | ------ | ------------------------------------------------------------------------------------------------------------------ |
| `Category`     | int    | Item category (0-11 are standard equipment slots; higher categories are valid if the item index resolves)          |
| `Type`         | int    | Item type index within category                                                                                    |
| `OptionIndex1` | int    | First option type (0 = none, otherwise an index defined in [380ItemOption.xml](/docs/data/item/380itemoption.md))  |
| `OptionValue1` | string | First option value (`*` = use default from 380ItemOption, otherwise an integer)                                    |
| `OptionIndex2` | int    | Second option type (0 = none, otherwise an index defined in [380ItemOption.xml](/docs/data/item/380itemoption.md)) |
| `OptionValue2` | string | Second option value (`*` = use default, otherwise an integer)                                                      |

### Item Index Calculation

```
ItemIndex = Category * 512 + Type
```

### Category Reference

| Category | Item Type      |
| -------- | -------------- |
| 0        | Swords         |
| 1        | Axes           |
| 2        | Maces/Scepters |
| 3        | Spears         |
| 4        | Bows/Crossbows |
| 5        | Staffs         |
| 6        | Shields        |
| 7        | Helms          |
| 8        | Armor          |
| 9        | Pants          |
| 10       | Gloves         |
| 11       | Boots          |

### Option Types

See [380ItemOption.xml](/docs/data/item/380itemoption.md) for the authoritative list and default values.

| Index | Name                         | Effect                                            |
| ----- | ---------------------------- | ------------------------------------------------- |
| 1     | Add Attack Success Rate PvP  | Adds value to PvP attack success rate             |
| 2     | Add Damage PvP               | Adds value to PvP damage                          |
| 3     | Add Defense Success Rate PvP | Adds value to PvP defense success rate            |
| 4     | Add Defense PvP              | Adds value to PvP defense                         |
| 5     | Add Max HP                   | Adds value to maximum life                        |
| 6     | Add Max SD                   | Adds value to maximum shield                      |
| 7     | Set SD Recovery Type         | Assigns the SD recovery type field (not additive) |
| 8     | Add SD Recovery Rate         | Adds value to SD recovery rate                    |

## Standard Option Assignments

Default assignments shipped in the stock 380ItemType.xml:

| Equipment Slot           | OptionIndex1         | OptionIndex2         |
| ------------------------ | -------------------- | -------------------- |
| Weapons (Cat 0, 2, 4, 5) | 2 (Damage PvP)       | 1 (Attack Rate PvP)  |
| Helms (Cat 7)            | 8 (SD Recovery Rate) | 3 (Defense Rate PvP) |
| Armor (Cat 8)            | 7 (SD Recovery Type) | 3 (Defense Rate PvP) |
| Pants (Cat 9)            | 4 (Defense PvP)      | 3 (Defense Rate PvP) |
| Gloves (Cat 10)          | 5 (Max HP)           | 3 (Defense Rate PvP) |
| Boots (Cat 11)           | 6 (Max SD)           | 3 (Defense Rate PvP) |

{% hint style="info" %}
The stock config only ships weapon entries for Categories 0, 2, 4, and 5 (swords, maces/scepters, bows/crossbows, staffs). Axes (Cat 1), Spears (Cat 3), and Shields (Cat 6) have no default 380 entries but can be added.
{% endhint %}

## Examples

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

```xml
<!-- Rune Blade (Section 0, Type 22) - PvP damage bonuses -->
<Item Category="0" Type="22" OptionIndex1="2" OptionValue1="*" OptionIndex2="1" OptionValue2="*"/>
```

* OptionIndex1=2: Add Damage PvP (default value from 380ItemOption)
* OptionIndex2=1: Add Attack Success Rate PvP (default value)
  {% endtab %}

{% tab title="Armor Piece" %}

```xml
<!-- Dark Phoenix Helm (Section 7, Type 29) - SD recovery bonuses -->
<Item Category="7" Type="29" OptionIndex1="8" OptionValue1="*" OptionIndex2="3" OptionValue2="*"/>
```

* OptionIndex1=8: Add SD Recovery Rate
* OptionIndex2=3: Add Defense Success Rate PvP
  {% endtab %}

{% tab title="Custom Value Override" %}

```xml
<!-- Custom weapon with specific values instead of defaults -->
<Item Category="0" Type="22" OptionIndex1="2" OptionValue1="15" OptionIndex2="1" OptionValue2="10"/>
```

* OptionValue1=15: +15 Damage PvP (overrides default)
* OptionValue2=10: +10 Attack Rate PvP (overrides default)
  {% endtab %}
  {% endtabs %}

## Important Behavior

{% hint style="info" %}
**Wildcard Value**: Using `*` for OptionValue tells the server to use the default Value from [380ItemOption.xml](/docs/data/item/380itemoption.md) for that option index. This allows centralized value management.
{% endhint %}

{% hint style="info" %}
**380 Item Flag**: Items must have bit 0x80 set on the extended option byte to be recognized as 380 items. The flag is set at item creation time.
{% endhint %}

{% hint style="info" %}
**Two Option Slots**: Each entry exposes exactly two option slots. Set an OptionIndex to 0 to leave a slot empty. Both non-zero slots are applied whenever the item is equipped.
{% endhint %}

{% hint style="info" %}
**Duplicate Entries**: The loader stores entries in a map keyed by item index. If the same Category/Type appears twice, the last entry wins.
{% endhint %}

{% hint style="warning" %}
**PvP Focus**: Options 1-4 only affect PvP combat. Options 5-8 affect general gameplay (HP, SD, recovery).
{% endhint %}

## Common Issues

{% hint style="warning" %}
**Item Not Getting 380 Options**: Verify the item has bit 0x80 set on its extended option byte AND is listed in this file with matching Category/Type.
{% endhint %}

{% hint style="warning" %}
**Wrong Category/Type**: Values must exactly match [Item.xml](/docs/data/item/item.md). Use ItemIndex = Category \* 512 + Type to verify.
{% endhint %}

{% hint style="danger" %}
**Invalid OptionIndex**: Using an OptionIndex not defined in [380ItemOption.xml](/docs/data/item/380itemoption.md) results in no bonus being applied to that slot.
{% endhint %}

## See Also

* [380ItemOption.xml](/docs/data/item/380itemoption.md) - Option type definitions and default values
* [Item.xml](/docs/data/item/item.md) - Base item definitions by Category and Type
* [ItemOption.xml](/docs/data/item/itemoption.md) - Standard level-based option stat bonuses
* [ItemOptionRate.xml](/docs/data/item/itemoptionrate.md) - Rate tables for option generation
