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

# SkillSpeedScale

The SkillSpeedScale plugin allows fine-tuning how attack speed affects individual skills, enabling precise balance control for multi-hit abilities that become overpowered at high attack speeds.

## File Location

```
Data/Plugins/Characters/SkillSpeedScale.xml
```

## Dependencies

| Depends On                                   | Purpose                                                                                                                                        |
| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| [Common.dat](/docs/gameserver/common-dat.md) | Uses global timing values from the Skill Timing / Attack Speed block: `MaxAttackSpeed`, `BaseSkillDelay`, `SpeedGrowthFactor`, `MinSkillDelay` |
| [Skill.txt](/docs/data/skill.md)             | References skill IDs (Index) from the skill database. Skills with `Delay > 0` in Skill.txt use fixed cooldowns and ignore speed scaling.       |

## Configuration Structure

```xml
<SkillSpeedScale>
    <Skill Index="238" Name="Chaotic Diseier" SpeedScale="0.55" MinDelay="200" />
    <Skill Index="9" Name="Evil Spirit" SpeedScale="1.0" MinDelay="50" />
</SkillSpeedScale>
```

Each `<Skill>` entry overrides the default speed scaling behavior for a specific skill.

## Attributes

| Attribute    | Type   | Default  | Range   | Description                                                            |
| ------------ | ------ | -------- | ------- | ---------------------------------------------------------------------- |
| `Index`      | int    | Required | 0-299   | Skill ID from Skill.txt                                                |
| `Name`       | string | Optional | -       | Skill name for readability (not used by server, documentation only)    |
| `SpeedScale` | float  | 1.0      | 0.0-3.0 | How much attack speed affects this skill's delay (see below)           |
| `MinDelay`   | int    | 0        | 0+      | Per-skill minimum delay in milliseconds (0 = use global MinSkillDelay) |
| `MaxDelay`   | int    | 0        | 0+      | Per-skill maximum delay cap in milliseconds (0 = no cap)               |

### SpeedScale Values Explained

The `SpeedScale` attribute controls how much the character's attack speed stat affects the skill's casting delay:

| Value | Effect                                       | Use Case                                                        |
| ----- | -------------------------------------------- | --------------------------------------------------------------- |
| `0.0` | Speed has **NO effect** (fixed delay)        | Utility skills like Teleport that shouldn't be spammable        |
| `0.5` | Speed has **HALF effect** (nerfed)           | Multi-hit skills that become overpowered at high speed          |
| `1.0` | **Normal** speed scaling (default)           | Balanced single-hit skills                                      |
| `1.5` | Speed has **150% effect** (buffed)           | Underpowered skills that need speed scaling boost               |
| `2.0` | Speed has **DOUBLE effect** (heavily buffed) | Skills that should benefit greatly from attack speed investment |

{% hint style="info" %}
**Skills NOT listed in this config file default to `SpeedScale="1.0"` (normal speed scaling).**
{% endhint %}

## Timing Formula

The plugin modifies the skill delay calculation formula used by the server:

### Step-by-Step Calculation

```
1. If skill has Delay > 0 in Skill.txt -> return that delay (fixed cooldown, no speed scaling)
2. Get character's attack/magic speed (physical skills use PhysiSpeed, magic skills use MagicSpeed)
3. Cap speed: speed = min(speed, MaxAttackSpeed)
4. Apply per-skill scaling: effectiveSpeed = speed * SpeedScale
5. Calculate raw delay: rawDelay = BaseSkillDelay * 1000 / (1000 + effectiveSpeed * SpeedGrowthFactor)
6. Apply max cap: if MaxDelay > 0 then rawDelay = min(rawDelay, MaxDelay)
7. Apply min floor: finalDelay = max(rawDelay, MinDelay or global MinSkillDelay)
```

### Default Global Values

These live in the Skill Timing / Attack Speed block of [Common.dat](/docs/gameserver/common-dat.md):

| Global Setting      | Default | Purpose                                             |
| ------------------- | ------- | --------------------------------------------------- |
| `MaxAttackSpeed`    | 290     | Maximum effective speed before formula (0 = no cap) |
| `BaseSkillDelay`    | 1000 ms | Starting delay at speed 0                           |
| `SpeedGrowthFactor` | 23      | APS gain per speed point (higher = faster scaling)  |
| `MinSkillDelay`     | 100 ms  | Absolute minimum delay floor                        |

{% hint style="info" %}
The actual values in your server's config file may differ. These are the shipped defaults from Common.dat.
{% endhint %}

### Formula Example

**Chaotic Diseier** with `SpeedScale="0.55"`, `MinDelay="200"` (using defaults BaseSkillDelay=1000, SpeedGrowthFactor=23, MaxAttackSpeed=290):

**Low-speed character (speed = 200):**

```
effectiveSpeed = 200 * 0.55 = 110
rawDelay = 1000 * 1000 / (1000 + 110 * 23) = 1000000 / 3530 = 283 ms
finalDelay = max(283, 200) = 283 ms
```

**High-speed character (speed = 290, capped):**

```
effectiveSpeed = 290 * 0.55 = 159
rawDelay = 1000 * 1000 / (1000 + 159 * 23) = 1000000 / 4657 = 214 ms
finalDelay = max(214, 200) = 214 ms
```

**Compare to normal scaling (`SpeedScale="1.0"`) at speed 290:**

```
effectiveSpeed = 290 * 1.0 = 290
rawDelay = 1000 * 1000 / (1000 + 290 * 23) = 1000000 / 7670 = 130 ms
finalDelay = max(130, 100) = 130 ms
```

By reducing `SpeedScale` to 0.55, the skill casts at 214 ms instead of 130 ms at max speed, preventing spam of this powerful multi-hit AoE.

## Important Behavior

{% hint style="info" %}
**Skills with Fixed Delay**: If a skill has a non-zero `Delay` value in `Skill.txt`, that delay is used as a **fixed cooldown** and attack speed scaling is **completely ignored**. Only skills with `Delay=0` in Skill.txt are affected by the speed scaling formula and this plugin.
{% endhint %}

{% hint style="info" %}
**Per-Skill Overrides**: The `MinDelay` attribute in this config **overrides** the global `MinSkillDelay` from [Common.dat](/docs/gameserver/common-dat.md) for the specified skill only.
{% endhint %}

{% hint style="info" %}
**Clamping**: Invalid `SpeedScale` values are automatically clamped:

* Values below 0.0 → clamped to 0.0
* Values above 3.0 → clamped to 3.0
  {% endhint %}

{% hint style="info" %}
**Physical vs Magic Skills**: Physical skills (melee attacks, bow skills) use **PhysiSpeed** for timing calculations, while magic skills use **MagicSpeed**. This means the same character may have different casting speeds for different skill types based on their equipment and stats.
{% endhint %}

{% hint style="info" %}
**Reload Support**: Configuration can be reloaded at runtime using the `/reload plugins` GM command without restarting the server.
{% endhint %}

{% hint style="warning" %}
**Negative Values Ignored**: Negative values for `MinDelay` or `MaxDelay` are treated as 0 (use global/no cap).
{% endhint %}

## Common Use Cases

### Multi-Hit Skills - Nerf Speed Scaling

Multi-target or multi-hit skills become overpowered when spammed at high attack speed:

```xml
<!-- Evil Spirit: 10-target AoE -->
<Skill Index="9" Name="Evil Spirit" SpeedScale="0.5" MinDelay="350" />

<!-- Chaotic Diseier: 2-hit directional AoE -->
<Skill Index="238" Name="Chaotic Diseier" SpeedScale="0.55" MinDelay="200" />

<!-- Chain Lightning: Multi-target chain -->
<Skill Index="215" Name="Chain Lightning" SpeedScale="0.5" MinDelay="400" />
```

By reducing `SpeedScale` below 1.0, these skills remain powerful but can't be spammed continuously.

### Channeled Skills - Heavy Nerf

Skills with continuous or hold effects should be heavily rate-limited:

```xml
<!-- Force: Channeled push skill -->
<Skill Index="60" Name="Force" SpeedScale="0.2" MinDelay="600" />
```

A very low `SpeedScale` (0.2) combined with high `MinDelay` (600ms) ensures this utility skill cannot be spammed.

### Utility Skills - Fixed Delay

Teleport and buff skills should have fixed delays regardless of attack speed:

```xml
<!-- Teleport: Should not be spammable -->
<Skill Index="6" Name="Teleport" SpeedScale="0.0" MinDelay="1000" />

<!-- Soul Barrier: Defensive buff -->
<Skill Index="16" Name="Soul Barrier" SpeedScale="0.0" MinDelay="500" />
```

Setting `SpeedScale="0.0"` makes attack speed completely ineffective, using only the `MinDelay` value.

### Single-Hit Burst Skills - Buff Speed Scaling

Underpowered single-hit skills can benefit MORE from attack speed:

```xml
<!-- Twisting Slash: Benefits greatly from attack speed -->
<Skill Index="41" Name="Twisting Slash" SpeedScale="1.5" MinDelay="50" />
```

A `SpeedScale` above 1.0 makes attack speed investment more rewarding for this skill.

## Examples

{% tabs %}
{% tab title="Balanced Multi-Hit" %}

```xml
<SkillSpeedScale>
    <!-- Multi-hit skills nerfed to 50-60% speed scaling -->
    <Skill Index="78" Name="Fire Scream" SpeedScale="0.5" MinDelay="350" />
    <Skill Index="237" Name="Gigantic Storm" SpeedScale="0.5" MinDelay="400" />
    <Skill Index="238" Name="Chaotic Diseier" SpeedScale="0.55" MinDelay="200" />
    <Skill Index="215" Name="Chain Lightning" SpeedScale="0.5" MinDelay="400" />
    <Skill Index="230" Name="Lightning Shock" SpeedScale="0.5" MinDelay="350" />
</SkillSpeedScale>
```

{% endtab %}

{% tab title="Fixed Utility Delays" %}

```xml
<SkillSpeedScale>
    <!-- Utility skills with fixed delays (speed has no effect) -->
    <Skill Index="6" Name="Teleport" SpeedScale="0.0" MinDelay="1000" />
    <Skill Index="16" Name="Soul Barrier" SpeedScale="0.0" MinDelay="500" />
    <Skill Index="60" Name="Force" SpeedScale="0.0" MinDelay="800" />
</SkillSpeedScale>
```

{% endtab %}

{% tab title="Mixed Balance" %}

```xml
<SkillSpeedScale>
    <!-- Multi-hit AoE: nerfed -->
    <Skill Index="9" Name="Evil Spirit" SpeedScale="0.5" MinDelay="350" />

    <!-- Single-hit burst: normal -->
    <Skill Index="42" Name="Rageful Blow" SpeedScale="1.0" MinDelay="200" />

    <!-- Underpowered skill: buffed -->
    <Skill Index="41" Name="Twisting Slash" SpeedScale="1.5" MinDelay="50" />

    <!-- Utility: fixed -->
    <Skill Index="6" Name="Teleport" SpeedScale="0.0" MinDelay="1000" />
</SkillSpeedScale>
```

{% endtab %}

{% tab title="Class-Specific: Rage Fighter" %}

```xml
<SkillSpeedScale>
    <!-- Rage Fighter skills - multi-hit combos nerfed -->
    <Skill Index="260" Name="Killing Blow" SpeedScale="0.6" MinDelay="300" />
    <Skill Index="261" Name="Beast Uppercut" SpeedScale="0.6" MinDelay="300" />
    <Skill Index="262" Name="Chain Drive" SpeedScale="0.5" MinDelay="350" />
    <Skill Index="263" Name="Dark Side" SpeedScale="0.5" MinDelay="400" />
    <Skill Index="264" Name="Dragon Roar" SpeedScale="0.6" MinDelay="350" />
    <Skill Index="265" Name="Dragon Slasher" SpeedScale="0.5" MinDelay="400" />
</SkillSpeedScale>
```

{% endtab %}
{% endtabs %}

## Common Issues

{% hint style="danger" %}
**Skills Still Too Fast**: If a skill is still being spammed at high speed, check:

1. Is the skill's `Index` correct? Verify against Skill.txt
2. Is the config file loaded? Check server logs for "SkillSpeedScale" entries
3. Try increasing `MinDelay` or decreasing `SpeedScale` further
   {% endhint %}

{% hint style="warning" %}
**Skills Too Slow**: If a skill feels unresponsive:

1. Increase `SpeedScale` value (closer to 1.0)
2. Decrease `MinDelay` value
3. Check that global `MaxAttackSpeed` isn't too restrictive
   {% endhint %}

{% hint style="warning" %}
**Config Not Reloading**: Use `/reload plugins` command. If issues persist, restart the GameServer. Check logs for XML parsing errors.
{% endhint %}

{% hint style="info" %}
**Testing Changes**: Use characters with different attack speed values to verify the scaling behaves as expected:

* Low speed (\~100): Tests base delay
* Medium speed (\~200): Tests scaling curve
* High speed at or near the `MaxAttackSpeed` cap: Tests minimum delay floor
  {% endhint %}

## Finding Skill IDs

Skill IDs (`Index` attribute) come from [Skill.txt](/docs/data/skill.md). Each line represents a skill:

```
// Format: Index   Name   ...other attributes...
0    Energy Ball
1    Poison
...
238  Chaotic Diseier
```

Alternatively, check in-game or in the client's skill data.

## Related Configurations

* [Common.dat](/docs/gameserver/common-dat.md): Global attack speed settings (`MaxAttackSpeed`, `BaseSkillDelay`, `SpeedGrowthFactor`, `MinSkillDelay`)
* [Skill.txt](/docs/data/skill.md): Base skill definitions, IDs, and fixed delays (Delay column)
* Server-side skill validation and timing enforcement applies the speed scaling formula automatically; no separate config file beyond SkillSpeedScale.xml itself

## Reload Command

```
/reload plugins
```

This command reloads all plugin configurations including SkillSpeedScale.xml without restarting the server.
