How the DPS Calculator Works

Formulas and logic used by the TAKP DPS Calculator (mirroring server behavior).

← DPS Calculator Class Rankings

Overview

Total DPS is:

(Melee DPS + Kick DPS + Backstab DPS) × (1 + Crit chance) + Proc DPS (MH) + Proc DPS (OH)

Melee DPS = Hit chance × (MH damage per swing × MH swings/sec + OH damage per swing × OH swings/sec). Each component is derived from server-style formulas for offense, mitigation, hit chance, damage bonus, haste, and special attacks.

Weapon proc DPS and threat

Proc DPS (main- and off-hand) is read from data/weapon_procs.json by normalized weapon name. Those numbers are built to align with the TAKP server proc pipeline (proc rate, spell damage, and swings) rather than third-party spreadsheets.

Threat per second (melee + proc hate) shown in results comes from data/weapon_threat_server.json: precomputed values that mirror attack.cpp per-swing hate and aggro.cpp CheckAggroAmount for weapon procs, under the assumptions documented in data/DPS_CALCULATOR_THREAT.md (Warrior baseline for the table build, fixed haste/DEX/target HP). Bard: main-hand melee hate is scaled down (no warrior innate damage bonus on hate); proc hate uses bard-specific columns when present. If a weapon is missing from that file, the calculator falls back to legacy columns in weapon_procs.json.

Parse DPS vs calculator: Log “total DPS” often divides damage by the whole encounter clock; the sheet assumes continuous melee—see data/DPS_CALCULATOR_THREAT.md (DPS vs parses).

Target: Mitigation & Avoidance

NPCs have mitigation (reduces your damage roll) and avoidance (reduces your hit chance). Both are derived from mob level; mitigation also uses mob AC when it matters.

Mitigation

Level < 15: mit = level×3 (+2 if level<3) Level ≥ 15: mit = min(200, floor(level×41/10 − 15)); if mit=200 and AC>200 then mit=AC Result: max(1, mit)

Higher mitigation lowers the expected damage roll (see below). You can override this in the calculator with the Mitigation field.

Avoidance

a = level×9 + 5 If level≤50 and a>400 then a=400 If a>460 then a=460 Avoidance = max(1, a)

Higher avoidance lowers hit chance. You can override with the Avoidance field to match a parse.

Offense & To-Hit

Offense is used for both damage (higher offense → higher roll) and is part of To-Hit. It is computed from weapon skill, STR or DEX, and all ATK sources.

Base offense (by skill)

Stat = DEX for archery, STR otherwise Stat bonus = floor((2×stat − 150)/3) if stat≥75, else 0 Offense base = weapon_skill + stat_bonus

Rangers 55+ using archery get an extra 65×4 − 216 added to offense base.

Total offense

Offense = Offense base + Worn ATK + Spell ATK + (Ferine Avatar 140 if on) + (Ferocity 140 if on) + (Predator's/Tunare 140 if on).

To-Hit

ToHit = 7 + Offense_skill + Weapon_skill + Accuracy_AA

Hit chance is then computed from ToHit vs Avoidance (see below).

Hit chance

Server-style hit chance (before any modifiers):

toHit' = toHit + 10 avoidance' = avoidance + 10 If toHit'×1.21 > avoidance': Hit chance = 1 − avoidance' / (toHit'×1.21×2) Else: Hit chance = (toHit'×1.21) / (avoidance'×2)

Result is clamped to [0, 1]. Higher ToHit or lower Avoidance increases hit chance.

For archery, the server applies HitChanceEffect[Archery] (e.g. Eagle Eye AA) before the +10 step: toHit = toHit × (100 + toHitPct) / 100 in Mob::AvoidanceCheck. The calculator has an optional Eagle Eye checkbox (default on for ranger bow) using +40 for that modifier.

Damage per swing (melee)

Damage is built in stages: a d20-style roll from offense vs mitigation, then optional multiplier, then additive bonuses.

Expected roll (d20)

The server rolls attack and defense; the effective “roll” is 1–20. The calculator uses the expected value:

E[roll] = 1 + 20×(offense+5) / (offense + mitigation + 10) Clamped to [1, 20]

Base damage from roll

damage = floor((roll × baseDamage + 5) / 10) Min hit = baseDamage (for normal swings; server uses GetMeleeMinDamageMod) If damage < minHit then damage = minHit If damage < 1 then damage = 1

baseDamage is the weapon’s DMG (for ranger bow, base is halved for the roll; ammo DMG is added to base before that).

Roll damage multiplier (all classes)

On the server, Client::RollDamageMultiplier can proc on any client melee. When it procs, damage is multiplied by (100 + rand(0, baseBonus))/100, capped at a level/class-dependent max. The calculator uses an expected multiplier (probability × average multiplier when it procs + (1−prob)×1). Tiers depend on level and whether the class is Monk (Monks get better tiers). Warriors using 2H use a 0.92× scale on this multiplier to align with parses (e.g. Vanazir max 652).

Damage bonus (warriors only)

Warriors (and knights) get an additive damage bonus from level and, for 2H, weapon delay.

1H: If level ≥ 28: bonus = 1 + floor((level−28)/3). Otherwise 0.

2H: Same base; then if delay ≤ 27 return base+1. If level > 29, add level-based bonus; if level > 50, add extra from (level−50) and delay. If delay ≥ 40, add delay-based bonus (e.g. (delay−40)/3 + 1, with extra at 43 and 45).

Item damage bonus

Weapon “Dmg Bonus” (and off-hand Dmg Bonus) is added directly to the swing damage after the roll multiplier.

Final damage per swing (MH)

rollPart = calcMeleeDamage(baseDamage, offense, mitigation, isRanged) [Archery: rollPart × archery modifier for Ranger if applicable] damagePerSwing = floor(rollPart × rollMultiplierExpected) + damageBonus + itemDmgBonus

Off-hand uses the same roll + multiplier + item bonus (no warrior damage bonus on OH).

Haste & attack speed

Weapon delay is in tenths of a second (e.g. 40 = 4.0 s). Melee uses effective delay with a 0.4 s floor (4 tenths). Bow matches Client::SetAttackTimer in milliseconds: GetHaste (100 + spell haste capped at 100 + overhaste), then quiver reduction, then min 400 ms, then −100 ms client correction for bows.

Melee: reduced = delay × 100 / (100 + combinedHaste), combinedHaste = min(100, spell%) + overhaste% Melee effective delay (tenths) = max(4, floor(reduced)) Melee swings/sec = 10 / effectiveDelay

Bow: speedMs = floor((delay / (GetHaste/100) + (HundredHands/100)×delay) × 100). With a quiver, reduction = floor(quiverHaste × speedMs + 1) where quiverHaste = (BagWR / QuiverWRHasteDiv) / 100 (Fleeting Quiver uses BagWR 60, divisor 4 → 0.15). Apply reduction only if speedMs − reduction > 1000 (Sony rule). Timer = max(400, speedMs) − 100 ms; swings/sec = 1000 / timer.

Double attack, dual wield, triple attack

Double attack

Chance from skill, level, and AAs (e.g. Give Double Attack, Double Attack Chance). Formula: chance = (skill + level + AA terms) / 5, capped at 100. For melee, applied as extra MH swings: swings × (1 + doubleAttack%/100). Bow archery does not use double attack on TAKP (RangedAttack calls DoArcheryAttackDmg once per shot).

Dual wield

Off-hand swing chance: (skill + level + Ambidexterity) × 100 / 375. Knights cannot dual wield (0% OH). OH swings per second = (10/effDelayOH) × (dwChance/100).

Triple attack (Warrior, Monk 60+)

13.5% extra primary swing from triple attack. Warriors with Flurry AA get an additional 13.5% × Flurry% × 1.1.

Extra 2H attack (Warrior)

Punishing Blade / Speed of the Knight: ExtraAttackChance% chance per round for one extra 2H primary swing.

Kick (Monk)

Kick uses a skill-based base damage (3–6 by tier), then the same melee roll and RollDamageMultiplier. Kick rate = 1/6 per second. Kick DPS = hit% × kickDamage × (1/6).

Backstab (Rogue)

Backstab base = ((skill×0.02)+2) × weaponDMG. Min hit by level (e.g. level×2 at 60+). Damage uses the same offense/mitigation roll. Backstab rate 1/3 per second; if “behind target” and level > 54, two stabs per cycle. Backstab DPS = hit% × backstabDamage × (1/3) × stabs.

Critical hits

Warriors: 6.6% crit with Critical Hit AA, 2.8% without. Other classes: 2.8% with the AA, 0% without. Crits double damage; the calculator applies totalDPS × (1 + critChance).

Ranger-specific

Summary

Inputs (class, weapons, mob level/AC, haste, ATK, AAs) drive offense, mitigation, avoidance, hit chance, damage per swing, and swings per second. Melee DPS plus Kick and Backstab when applicable, multiplied by (1 + crit chance), plus proc DPS from main hand and off hand (weapon_procs.json), gives the reported Total DPS. The results table shows hate/sec from the server-model table (weapon_threat_server.json) where available. Formulas match TAKP server logic where documented; some caps (e.g. RollDamageMultiplier for non-monks, 2H warrior scale) are tuned to align with parses.