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

# Effect.xml

Defines all buff and debuff effects in the game, including potions, scrolls, seals, skill effects, and debuffs. Each effect specifies its index, group, duration behavior, persistence, and associated stat values.

## File Location

`Data/Effect.xml`

## Dependencies

| Depends On                      | Purpose                                     |
| ------------------------------- | ------------------------------------------- |
| [Item](/docs/data/item/item.md) | Effects linked to specific ItemIndex values |
| Skills                          | Many effects are applied by skill usage     |

**Referenced by:**

* [Monster](/docs/data/monster/monster.md) - monster abilities that apply debuff effects
* [Event](/docs/data/event.md) - event rewards and state effects (Crywolf, Castle Siege, seasonal buffs)

## Configuration Structure

### Effect Element

Each `<Effect>` element defines a single buff or debuff effect.

| Attribute     | Type   | Description                                                                                                                                                                                                                                                      |
| ------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Index`       | int    | Unique effect identifier (1-204 in shipping data). Server storage supports up to 256. Referenced by skills, items, and game mechanics.                                                                                                                           |
| `Group`       | int    | Effect group number. Only one effect per group can be active at a time. Same group effects replace each other.                                                                                                                                                   |
| `ItemIndex`   | int/\* | Item that grants this effect (e.g., 6699 for Seal of Ascension). Use `*` if not item-based.                                                                                                                                                                      |
| `Name`        | string | Display name of the effect. Stored for admin reference; not sent to the client.                                                                                                                                                                                  |
| `Save`        | 0/1    | Whether effect persists after logout. `1` = save to database, `0` = clear on disconnect.                                                                                                                                                                         |
| `Type`        | int    | Effect timing mode. `0` = regular countdown (counts down in seconds, can be cleansed), `1` = special countdown (counts down in seconds, cannot be cleansed), `2` = persistent countdown (counts down in seconds, cannot be cleansed, saves as Unix timestamp).   |
| `Flag`        | 0/1    | Debuff flag. `0` = buff (beneficial), `1` = debuff (removable by cleanse effects).                                                                                                                                                                               |
| `Count`       | int/\* | Effect duration in seconds. For Type 0/1: counts down each second. For Type 2: added to the current Unix time at activation to set the absolute expiration timestamp; the per-second counter still decrements alongside it. Use `*` for skill-provided duration. |
| `Value1`      | int/\* | Effect-specific value 1. Meaning varies by effect (damage bonus, stat modifier, etc.). Use `*` for skill-provided value.                                                                                                                                         |
| `Value2`      | int/\* | Effect-specific value 2. Often used for secondary bonuses or timing parameters. Use `*` if unused.                                                                                                                                                               |
| `Value3`      | int/\* | Effect-specific value 3. Used by complex effects with multiple parameters. Use `*` if unused.                                                                                                                                                                    |
| `Value4`      | int/\* | Effect-specific value 4. Used by complex effects with multiple parameters. Use `*` if unused.                                                                                                                                                                    |
| `Cancelable`  | 0/1    | Optional. `1` = the player can manually cancel this effect by right-clicking its buff icon. `0` (default, also used when the attribute is absent) = cannot be manually canceled.                                                                                 |
| `Description` | string | Optional admin-facing annotation. Not sent to the client; useful for documentation and log context.                                                                                                                                                              |

## Important Behavior

{% hint style="info" %}
**Group-Based Replacement**: When a new effect is added with the same `Group` as an existing effect, the old effect is removed and replaced. This prevents stacking multiple buffs of the same category.
{% endhint %}

{% hint style="info" %}
**Value Inheritance**: When an attribute is set to `*` (asterisk), the value is provided at runtime by the skill or item that applies the effect. When set to a number, that value is always used regardless of the source.
{% endhint %}

{% hint style="info" %}
**Type Differences**:

* **Type 0**: Countdown in seconds. Can be removed by cleanse skills. Best for temporary combat buffs/debuffs.
* **Type 1**: Countdown in seconds. Cannot be cleansed. Used for event states and special effects.
* **Type 2**: Countdown in seconds with absolute expiration time. Cannot be cleansed. The server stores both the absolute expiration timestamp and a seconds-remaining counter that decrements each second. The absolute timestamp persists to the database so effects expire at the correct time across server restarts.
  {% endhint %}

{% hint style="warning" %}
**Save Flag Impact**: Effects with `Save="0"` are cleared when players log out. This includes most debuffs and temporary PvP effects. Effects with `Save="1"` persist in the database and are restored on login. For Type 2 effects with `Save="1"`, the exact expiration timestamp is preserved, so effects will expire at the correct time even if the player logs out and back in.
{% endhint %}

### Effect Value Meanings

The `Value1-4` attributes have different meanings depending on the effect:

* **Damage/Defense Buffs**: Value1 = amount to add (e.g., +30 damage)
* **Percentage Buffs**: Value1 = percentage boost (e.g., 50 = +50% experience)
* **Stat Elixirs**: Value1 = stat points to add temporarily
* **DoT (Poison) Effects**:
  * Value1 = attacker object index (who applied the effect)
  * Value2 = tick interval in seconds (damage applied every N seconds)
  * Value3 = damage percentage of victim's current HP (e.g., 5 = 5% of current HP per tick)
  * Value4 = damage cap (max damage per tick, 0 = no cap)
* **Multi-Stat Buffs**: Value1 = primary stat, Value2 = secondary stat, etc.

## Examples

{% tabs %}
{% tab title="Item-Based Buff" %}

```xml
<!-- Seal of Ascension - +50% Experience for 30 minutes -->
<Effect Index="29" Group="60" ItemIndex="6699" Name="Seal of Ascension"
        Save="1" Type="2" Flag="0" Count="1800"
        Value1="50" Value2="*" Value3="*" Value4="*"/>
```

**Breakdown**:

* `Type="2"` with `Count="1800"` = duration of 1800 seconds (30 minutes). The server stamps an absolute expiration 1800 seconds from activation.
* `Save="1"` = persists through logout (expiration timestamp saved to database)
* `Value1="50"` = +50% experience rate
* `Value2-4="*"` = unused for this effect
  {% endtab %}

{% tab title="Skill-Based Debuff" %}

```xml
<!-- Poison - Applied by skills, duration and damage from skill -->
<Effect Index="55" Group="27" ItemIndex="*" Name="Poison"
        Save="0" Type="0" Flag="1" Count="*"
        Value1="*" Value2="*" Value3="*" Value4="*"/>
```

**Breakdown**:

* `Flag="1"` = debuff (can be cleansed)
* `Save="0"` = cleared on logout
* All values `*` = provided by the skill that applies poison
* `Type="0"` = countdown timer in seconds
  {% endtab %}

{% tab title="Multi-Value Buff" %}

```xml
<!-- Elf Buffer - Adds damage and defense -->
<Effect Index="3" Group="3" ItemIndex="*" Name="Elf Buffer"
        Save="1" Type="0" Flag="0" Count="*"
        Value1="*" Value2="*" Value3="*" Value4="*"/>
```

**Breakdown**:

* Group 3 = Elf Buffer category
* Values provided by Elf's buff skill
* `Value1` = damage bonus, `Value2` = defense bonus
  {% endtab %}

{% tab title="Stat Elixir" %}

```xml
<!-- Elixir of Strength - +50 Strength for 30 minutes -->
<Effect Index="50" Group="26" ItemIndex="7246" Name="Elixir of Strength"
        Save="1" Type="2" Flag="0" Count="1800"
        Value1="50" Value2="*" Value3="*" Value4="*"/>
```

**Breakdown**:

* `Group="26"` = All stat elixirs share this group (only one active)
* `Value1="50"` = +50 temporary Strength points
  {% endtab %}
  {% endtabs %}

## Common Effect Categories

### Experience Boosters (Groups 60-61)

* Seal of Ascension (Group 60): +50-100% experience
* Seal of Wealth (Group 61): Experience + item drop rate

### Stat Elixirs (Group 26)

* All 5 stat elixirs (STR/AGI/VIT/ENE/CMD) share Group 26
* Only one can be active at a time

### Combat Buffs (Groups 1-10)

* Greater Damage (Group 1)
* Greater Defense (Group 2)
* Greater Critical Damage (Group 5)
* Greater Life (Group 8)
* Greater Mana (Group 9)

### Debuffs (Flag=1)

* Poison (Group 27)
* Ice (Group 28)
* Ice Arrow (Group 29 - immobilize)
* Fire Slash (Group 30 - defense debuff)
* Stern (Group 33 - stun)
* Order of Restraint (Group 37 - immobilize)
* Sleep/Blind (Group 40 - shared, both debuffs)
* Neil (Group 41 - DoT)
* Sahamutt (Group 42 - DoT)
* Lesser Damage (Group 43)
* Lesser Defense (Group 44)
* Sword Slash (Group 46)
* Lightning Storm (Group 47)
* Red Storm (Group 48)
* Frozen Stab (Group 49 - slow)

### Guild/Castle States (Groups 13-17, 20)

* Castle Gate State (Group 13) - also used by Seal of Life/Mana
* Guild States 1-4 (Group 14 - shared by states 1-4)
* Invisibility (Group 15)
* Guild State 5 (Group 16)
* Guild State 6 (Group 17)
* Castle Crown State (Group 20)

### Event States (Groups 18-19, 22-23, 38)

* Crywolf States 1-6 (Group 18 - shared)
* Crywolf State 7 (Group 19)
* Crywolf States 8-12 (Group 38 - shared)
* Order Effects (Group 22 - Speed/Sublimation/Protection shared)
* Seasonal Events (Group 23 - Halloween/Cherry Blossom/Christmas shared)

## Common Issues

{% hint style="warning" %}
**Effect Not Persisting**: Check that `Save="1"` is set for effects that should survive logout. DataServer must also be configured to save effects.
{% endhint %}

{% hint style="warning" %}
**Effects Stacking Incorrectly**: Verify the `Group` attribute. Effects in the same group replace each other instead of stacking.
{% endhint %}

{% hint style="danger" %}
**Type 2 Effects Not Expiring**: Ensure `Count` value is in seconds. Common mistake is using minutes (multiply by 60) or forgetting that Type 2 adds to Unix timestamp.
{% endhint %}

{% hint style="info" %}
**Index Range**: Effect indices in the shipping Effect.xml run up to 204. The server's in-memory table holds up to 256 entries, so indices 0-255 are storable, but only those with a matching configuration entry load and apply.
{% endhint %}
