We have moved to www.exootlab.com

Saturday, November 14, 2009

Developers Resource : MapleStory Formula Compilation

Developers can use the following formulas and evaluate it at runtime. Assign a value to a variable based on its current value in order to use it. Guide on programming available at Developer Center.

Order of Operations
For the uninitiated: integer simply means "whole number".
The order in which damage is calculated is as follows:

1.) Calculate min and max damage from the appropriate damage formula (see Weapon/Special Damage Formulas).
2.) Multiply by any applicable skill modifiers (see Modifiers), including elemental bonuses.
3.) Calculate defense (see Defense Reduction).
4.) Select a random number from the damage range (not necessarily integer). Call this X, set it aside for a couple of steps.
5.) Find the appropriate damage multiplier (typically expressed as a percentage in the skill description, which should be converted to decimal). Default attack and spell-based skills count as 100%, or 1.
6.) Add any applicable critical bonuses (typically expressed as a percentage in the critical skill description, which should be converted to decimal). Sharp Eyes on physical attacks adds an additional 100% or 1; when combined with Stun Mastery, a further 100% or 1 (totalling to Stun Mastery + Sharp Eyes + 200%; yes, it's true). Also, add Corsairs' Elemental Boost if applicable (max level adds 2).
7.) Take that value and multiply it with X, the number selected in Step 4.
8.) Check if the damage is within the range of [1, 199999] and if not, restrict them to 1 or 199999 respectively.
9.) Multiply by any After-Modifiers (see Modifiers). Most of these apply to skills where each successive hit deals more/less damage than the last.
10.) Take the integer part of the result.


Weapon Damage Formulas
(credit to HS.net, though it's probably general knowledge by now)


General Formula
MAX = (Primary Stat + Secondary Stat) * Weapon Attack / 100
MIN = (Primary Stat * 0.9 * Skill Mastery + Secondary Stat) * Weapon Attack / 100

Stats and Multipliers:

One Handed Sword
Primary: STR * 4.0
Secondary: DEX

One Handed Axe/BW/Wand/Staff (Swinging)
Primary: STR * 4.4
Secondary: DEX

One Handed Axe/BW/Wand/Staff (Stabbing)
Primary: STR * 3.2
Secondary: DEX

Two Handed Sword
Primary: STR * 4.6
Secondary: DEX

Two Handed Axe/BW (Swinging)
Primary: STR * 4.8
Secondary: DEX

Two Handed Axe/BW (Stabbing)
Primary: STR * 3.4
Secondary: DEX

Spear (Swinging)
Primary: STR * 3.0
Secondary: DEX

Spear (Stabbing)
Primary: STR * 5.0
Secondary: DEX

Polearm (Swinging)
Primary: STR * 5.0
Secondary: DEX

Polearm (Stabbing)
Primary: STR * 3.0
Secondary: DEX

Dagger (Non-Thieves)
Primary: STR * 4.0
Secondary: DEX

Dagger/Throwing Stars (Thieves)
Primary: LUK * 3.6
Secondary: STR + DEX

Bow
Primary: DEX * 3.4
Secondary: STR

Crossbow
Primary: DEX * 3.6
Secondary: STR

Knuckle
Primary: STR * 4.8
Secondary: DEX

Gun
Primary: DEX * 3.6
Secondary: STR


Special Damage Formulas
Note: Formulas for skills with a damage percentage list the skill's base damage, i.e. before the damage percentage is applied.


Spell Damage:
MAX = ((Magic²/1000 + Magic)/30 + INT/200) * Spell Attack
MIN = ((Magic²/1000 + Magic * Mastery * 0.9)/30 + INT/200) * Spell Attack

Lucky Seven/Triple Throw (credit to HS.net / LazyBui for recent verification):
MAX = (LUK * 5.0) * Weapon Attack / 100
MIN = (LUK * 2.5) * Weapon Attack / 100

Venom (damage per second, credit to Joe Tang):
MAX = (18.5 * [STR + LUK] + DEX * 2) / 100 * Basic Attack
MIN = (8.0 * [STR + LUK] + DEX * 2) / 100 * Basic Attack

Ninja Ambush (credit to Fiel):
Damage per second tick = 2 * [STR + LUK] * Skill Damage Percentage

Shadow Web (credit to LazyBui):
Damage per 3-sec tick = Monster HP / (50 - Skill Level)

Shadow Meso:
Damage = 10 * Number of mesos thrown (in skill description)
Normal critical does not apply, instead it has its own built-in critical listed in skill description

Assaulter ignores defense if at or above the monster’s level

Dragon Roar (credit to Stereo):
MAX = (STR * 4.0 + DEX) * Weapon Attack / 100
MIN = (STR * 4.0 * Skill Mastery * 0.9 + DEX) * Weapon Attack / 100

Power Knock Back (both weapons, credit to AGF/Fiel):
MAX = (DEX * 3.4 + STR) * Weapon Attack / 150
MIN = (DEX * 3.4 * Mastery * 0.9 + STR) * Weapon Attack / 150
Mastery is 0.1 at all levels

Claw (punching):
MAX = (LUK * 1.0 + STR + DEX) * Weapon Attack / 150
MIN = (LUK * 0.1 + STR + DEX) * Weapon Attack / 150

Blank Shot:
Speculated to be calculated without bullet attack or Gun Mastery

Bare Hands:
MAX = (STR * J + DEX) * Weapon Attack / 100
MIN = (STR * J * 0.1 * 0.9 + DEX) * Weapon Attack / 100
ATT equals floor((2*level+31)/3) and is capped at 31.
J equals 3.0 for Pirates and 4.2 for all 2nd+ job Pirates.

Flamethrower (credit to blitzkrieg):
Damage per second tick: Damage of initial hit * (5% + Amp Bullet Damage %)

Heal Damage (credit to Russt//Devil's Sunrise for Target Multiplier function):
MAX = (INT * 1.2 + LUK) * Magic / 1000 * Target Multiplier
MIN = (INT * 0.3 + LUK) * Magic / 1000 * Target Multiplier
The % listed in the skill description (300% at max) acts as the skill percent (see Order of Operations above).

Heal Recovery
MAX = something * Magic * Heal Level * Target Multiplier
MIN = something * Magic * Heal Level * Target Multiplier

old formula (credit to Nekonecat):
MAX = (1.132682429*10^-7*luk^2 + 3.368846366*10^-6*luk + 1.97124794*10^-3) * magic * int * healSkillLevel * multiplier
MIN = MAX*0.8

Heal Target Multiplier: 1.5 + 5/(number of targets including yourself)
For reference-
1 - 6.5
2 - 4.0
3 - 3.166
4 - 2.75
5 - 2.5
6 - 2.333

Poison Brace/Poison Mist/Fire Demon/Ice Demon:
Damage per second tick = Monster HP / (70 - Skill Level)

Phoenix/Frostprey/Octopus/Gaviota (credit to Sybaris/KaidaTan):
MAX = (DEX * 2.5 + STR) * Attack Rate / 100
MIN = (DEX * 2.5 * 0.7 + STR) * Attack Rate / 100
Ignores defense


Defense Reduction


Weapon Defense - credit to AGF/Stereo
MAX damage = (MAX before defense) * (1 - 0.01*D) - WDEF*.5
MIN damage = (MIN before defense) * (1 - 0.01*D) - WDEF*.6
where D is (monster level - player level) if (monster level) > (player level), and 0 otherwise.

Magic Defense - credit to Russt/Paracelsus
MAX damage = (MAX before defense) - MDEF*.5 * (1 + 0.01*D)
MIN damage = (MIN before defense) - MDEF*.6 * (1 + 0.01*D)


Modifiers


Skill Modifiers

Combo Attack (credit to RFSurg):
Combo Multiplier, 1-5 orbs = [Advanced] Combo Attack % + floor((orbs - 1) * (Combo level / 6)%)
Combo Multiplier, 6-10 orbs = [Advanced] Combo Attack % + 20% + (orbs - 5) * 4%
Finishers = Skill Description % * Combo Multiplier * Orb multiplier
The orb multipliers are:
1 orb = 100%
2 orbs = 120%
3 orbs = 154%
4 orbs = 200%
5 - 10 orbs = 250%

Fire/Ice/Lightning Charge element:
Advantage = Base damage * (105% + Charge level * 1.5%)
Disadvantage = Base damage * (95% - Charge level * 1.5%)

Holy Charge element:
Advantage = Base damage * (120% + Charge level * 1.5%)
Disadvantage = Base damage *(80% - Charge level * 1.5%)

Inferno/Blizzard element::
Advantage = Base damage * (110% + Skill level * 0.5%)
Disadvantage = Base damage * (90% - Skill level * 0.5%)

Arrow Bomb:
Impact Hit = 50% damage * Critical Multiplier
Splash Hits = Skill damage * Critical Multiplier
(Arrow Bomb's critical replaces the standard critical bonus, which is normally inserted into the skill damage %, as shown in Order of Operations above. It still uses the same value for critical, however.)

Charge/tap damages for Big Bang/Pierce/Screw Punch:
Needing this. We think it's somewhere between 10-15% with no charge

After-Modifiers

'Ordinal number of hit' refers to, e.g., 1 for the first hit, 2 for the second, etc.

Slash Blast FA (credit to Devil's Sunrise): 2 * (1/3) ^ (ordinal number of hit - 1)
Cumulative damage = 3 * (1 - (1/3) ^ (total number of hits))

Iron Arrow (credit to AGF): 0.9 ^ (ordinal number of hit - 1)
Cumulative damage = 10 * (1 - 0.9 ^ (total number of hits))

Pierce (credit to AGF, and Truemark for 100% corfirmation): 1.2 ^ (ordinal number of hit - 1)
Cumulative damage = 5 * (-1 + 1.2 ^ (total number of hits))

Chain Lightning: 0.7 ^ (ordinal number of hit - 1)
Cumulative damage = 3.333 * (1 - 0.7 ^ (total number of hits))

Energy Orb: 2/3 ^ (ordinal number of hit - 1)
Cumulative damage = 3 * (1 - (2/3) ^ (total number of hits))

Barrage, last 2 hits only (credit to Fiel): 2 ^ (ordinal number of hit - 4)
Total damage multiplier: 10


Accuracy


Chance to Hit = Accuracy/((1.84 + 0.07 * D) * Avoid) - 1
(D = monster level - your level. If negative, make it 0.)

Magical Accuracy:
Thikket and Nekonecat's version:
Quote:
Let x = (trunc(INT/10) + trunc(LUK/10))/(Avoid+1)*(1+0.0415*D), where D is the level difference between the player and the monster.
Then
hitrate% = -2.5795x^2 + 5.2343x - 1.6749
Stianweij's version:
Quote:
Magic Accuracy = trunc(total int/10)+ trunc(luk/10) (source: Sleepywood forum)

Accuracy to hit 100% = (Avoid+1)(1+D/24) = (34+1)*(1+(100-68)/24) = 81.67 (** this formula is simplified by myself, slighly differs from the one found in SW thread)
Min Accuracy to hit at all = Max Accuracy *10/24

D = level difference


EXP Splitting


Leech conditions: Only one of the following must be met in order to share a cut of party EXP
1. Deal at least 1 damage to the monster.
2. Be within 5 levels of the monster.
3. Be within 5 levels of a party member that fulfills 1 or 2.

EXP received by the highest damager = Monster EXP * (0.2 + 0.8 * Player level / Total party level) * Party's portion of EXP {see 'When not partied'} * Party bonus
(Total party level = sum of the levels of all players that satisfy leech conditions. When not partied, you count as your own party.)

EXP received by other party members = Monster EXP * (0.8 * Player level / Total party level) * Party's portion of EXP * Party bonus

When not partied:
EXP received by the last hit = Monster EXP * (0.2 + 0.8 * Damage dealt / Monster HP)
EXP received by other damagers = Monster EXP * (0.8 * Damage dealt / Monster HP)


EXP Required to Next Level


Character
1 ≤ level ≤ 3:
exptnl(level) = 2*level^2 + 13*level

3 ≤ level ≤ 5:
exptnl(level) = 4*level^2 + 7*level

6 ≤ level ≤ 50:
if level%3 = 0, exptnl(level) = (level^4 + 57*level^2)/9
otherwise, exptnl(level) = (level^4 + 55*level^2 - 56)/9

51 ≤ level:
exptnl(level) = floor(1.0548*exptnl(level-1))

Monster Book (credit to Chris from Kryptodev)
numCardsNeeded = (5 * MBLevel) * (MBLevel + 1)


AP-related


Everything relating to HP/MP:
See LazyBui's Guide to HP and MP, no need to have info twice.

Base Accuracy:
Warriors/Magicians/Beginners = DEX * 0.8 + LUK * 0.5
Brawlers = DEX * 0.9 + LUK * 0.3
Bowmen/Thieves/Pirates/Gunslingers = DEX * 0.6 + LUK * 0.3

Base Avoid:
Warriors[/Magicians/Bowmen/Thieves/Beginners] = DEX * 0.25 + LUK * 0.5
Pirates = DEX * 0.25 + LUK * 0.5
Brawlers = DEX * 1.5 + LUK * 0.5
Gunslingers = DEX * 0.125 + LUK * 0.5

Hands = DEX + INT + LUK (used for Maker skill in KMS, thanks GW2000 for pointing that out)


Misc/Constants


Caps: (most of these are trivially common knowledge, but they're here for reference anyway)
Level: 200
HP/MP: 30000
STR/DEX/INT/LUK: 999
Weapon/magic attack/defense: 1999
Accuracy/avoid: 999
Meso: 2147483647 (or 2^31-1, the maximum value of a signed int)

All of the above also apply to mobs, if the stat applies.

Cast times can be found in LazyBui's Attack Speed Reference

Base HP Recovery: 10 / 10 seconds while inactive
Base MP Recovery: 3 / 10 seconds

Mages' Improving MP Recovery skill: Character level * MP Recovery level / 10

EXP lost on death:
Warriors/Mages/Pirates' = (5 + 20 / Base LUK)%
Bowmen/Thieves' = (5 + 8 / Base LUK)%

Battleship Durability: (Battleship level * 2 + (Character level - 120)) * 200
Each point of durability is equivalent to 10 HP.

Energy Charge:
10000 units = 1 fully charged meter
Charge rate: Skill % * 100 units per monster per hit. In other words, at maximum level, it charges 192 units per monster per hit.
Energy Charge decay: 200 units / 10 seconds while inactive



EXP Gained from Party
2 players = 10% party bonus exp
3 players = 15% party bonus exp
4 players = 20% party bonus exp
5 players = 25% party bonus exp
6 players = 30% party bonus exp

Minimum level to leech
Minimum level to leech passively = Mob’s level – 5
Note: leech passively = get EXP without hitting the mobs at all.

Formula for Battleship Endurance [HP] Skill by Captain/Corsair 4th Job
The durability formula is lowered every time you get hit.
[(Skill Level * 4000)] + [(Character Level - 120) * 2000]

Magician Mp Recovery Formula
Amount of Mp Recovered = 3 + (Skill level * Character Level * 0.1)
If you sit on a Relaxer or Palm Chair, MP recovery is = 1.5 * (3 + (Skill level * Character Level * 0.1))

Damage Protection Formula
Protection against monster attack = (Your total weapon or magic defense)/3

100% Hit Accuracy Formula
Non-warriors/non-mages 0.6 for DEX and 0.3 for LUK. For others: 0.8 DEX and 0.5 LUK.
Accuracy Required for 100% hit without Miss = (55+2*lvl difference)*mob avoid/15
Character Current Accuracy = (DEX*0.8) + (LUK*0.5) + accuracy from mastery and equipment

Weapon Attack Formula
For Warrior: 3 STR (strength) is equivalent to 1 weapon attack (3 STR = 1 WA)
For Thief: 5 LUK (luck) is equivalent to 1 weapon attack (5 LUK = 1 WA)
For Magician: 1 INT (intelligent) is equivalent to 1 magic attack (1 INT = 1 Magic Attack)

MP Gain Formula
Formula for MP Gain Per Level = 15 + (total int * 0.1) +/- 1
So, let’s say you are a level 120 Pure INT magician with base stats of 608 INT (without any additional INT boost from equipments), you gained 74.8-75.8 Max MP tnl (to next level 121). (+/-1 is the fluctuation, tested and proven through 100 levels of mp gain data : Chronology’s, playpark member).

Minimum MP you can wash Formula
HP washing is used to channel Mana Points into Hit Points (life) so you would have more life to withstand against monster powerful attack that can kill your character in 1 blow. This technique can only be done if you use NX Cash to buy tickets to reset your AP OR before you reach level 200, you spend your AP into HP instead of your primary attribute (e.g. thief primary attribute is LUK, but thief channel AP to HP instead of LUK to get more HP). Formula for minimum MP that you can wash = (Lvl – 1)*14 + 148 = lvl*14 + 134.

Hp+Mp Recovery Equipments
If worn inside the hotel sauna, the recovery rate for HP and MP will be 1.5x faster.
This hotel sauna can be found in Sleepywood Sauna Shop + Zipangu Spa (cost meso, not NX Cash)
Recovery Equipments: Bathrobe for Men / Blue Sauna Robe / Red Sauna Robe / Bathrobe for Women

However, chair recovery does not stack with the equipments that can be worn for recovery.
Amorian Relaxer, Beach Chair, Blue Seal Cushion, Fishing Chair, Green Chair, Moon Star Chair, Pink Seal Cushion, Red Chair, Red Round Chair, Sky-Blue Wooden Chair, The Relaxer, The Red Relaxer, The Yellow Relaxer, Warrior Throne, White Seal Cushion, Yellow Chair.

Damage Formula Calculation
Skill Mastery’s percentage and Damage Percentage should be converted to decimal points; ie: 10% = 0.1
Max = maximum damage | Min = minimum damage | Mastery = (default is 0.1) if level 0 mastery
.
All Classes (Max)
One Handed Sword = [(STR * 4.0 + DEX) / 100] * Weapon Attack
One Handed Axe = [(STR * 4.4 + DEX) / 100] * Weapon Attack
One Handed Blunt Weapon = [(STR * 4.4 + DEX) / 100] * Weapon Attack
Two Handed Sword = [(STR * 4.6 + DEX) / 100] * Weapon Attack
Two Handed Axe = [(STR * 4.8 + DEX) / 100] * Weapon Attack
Two Handed Blunt Weapon = [(STR * 4.8 + DEX) / 100] * Weapon Attack
Spear = [(STR * 5.0 + DEX) / 100] * Weapon Attack
Polearm = [(STR * 5.0 + DEX) / 100] * Weapon Attack

All Classes (Min)
One Handed Sword = (STR * 0.9 * 4.0 * Skill Mastery + DEX) / 100 * Weapon Attack
One Handed Axe = (STR * 0.9 * 3.2 * Skill Mastery + DEX) / 100 * Weapon Attack
One Handed Blunt = (STR * 0.9 * 3.2 * Skill Mastery + DEX) / 100 * Weapon Attack
Two Handed Sword = (STR * 0.9 * 4.6 * Skill Mastery + DEX) / 100 * Weapon Attack
Two Handed Axe = (STR * 0.9 * 3.4 * Skill Mastery + DEX) / 100 * Weapon Attack
Two Handed Blunt = (STR * 0.9 * 3.4 * Skill Mastery + DEX) / 100 * Weapon Attack
Spear = (STR * 0.9 * 3.0 * Skill Mastery + DEX) / 100 * Weapon Attack
Polearm = (STR * 0.9 * 3.0 * Skill Mastery + DEX) / 100 * Weapon Attack

(Bowman) Hunter / Archer
Max : Bow = [(DEX * 3.4 + STR) / 100] * Weapon Attack
Min : Bow = (DEX * 0.9 * 3.4 * Skill Mastery + STR) / 100 * Weapon Attack

(Bowman) Crossbowman
Crossbow – [(DEX * 3.6 + STR) / 100] * Weapon Attack
Min : Crossbow = (DEX * 0.9 * 3.6 * Skill Mastery + STR) / 100 * Weapon Attack

(Magician) Cleric, Fire/Poison, Ice/Lightning
Max : Any Weapon = {[{MAG * 0.8) + (LUK/4)]/18} * Spell Magic Attack * 0.8
Min : Any Weapon = {[(MAG * 0.8) + (LUK/4)]/18} * Spell Magic Attack * 0.8 * Mastery

(Thief) Bandit
Max : Dagger & Throwing Stars = [(LUK * 3.6 + STR + DEX) / 100]* Weapon Attack
Min : Dagger and Throwing Stars = (LUK * 0.9 * 3.6 * Skill Mastery + STR + DEX) / 100 * Weapon Attack

(Thief) Assassin
Max (per star) : Lucky Seven = [((5.0*LUK)/100)*(Weapon Attack)*Damage Percentage]
Min (per star) : Lucky Seven = [((2.5*LUK)/100)*Weapon Attack)*Damage Percentage]

Non thief
Max : Dagger = [(STR * 4.0 + DEX) / 100] * Weapon Attack
Min : Dagger = (STR * 0.9 * 4.0 * Skill Mastery + DEX) / 100 * Weapon Attack

(Pirate) Infighter
Max : [(STR * 4.8 + DEX) / 100] * Weapon Attack
Min : (STR * 0.9 * 4.8 * Skill Mastery + DEX) / 100 * Weapon Attack

(Pirate) Gunslinger
Max : [(DEX * 3.6 + STR) / 100] * Weapon Attack
Min : [(DEX * 0.9 * 3.6 * Skill Mastery + STR) / 100] * Weapon Attack

Speed of Fire Rate

Pirate: Gunslinger Skills
Double Fire = 144 shots/minute
Invisible Shot = 88 shots/minute
Triple Fire = 88 shots/minute
Rapid Fire = 500 shots/minute (approx. 8 bullets/second)
Battleship Cannon = 100 shots/minute
Battleship Torpedo = 77 shots/minute

Bowman Skills: Hunter + Crossbowman
Strafe speed
For rangers – 84 per min
For snipers – 84 per min
Hurricane
Fires 500 arrows per minute (8.33 arrows per second)
Is unaffected by Bow speed or Booster

Thief: Assassin Skills
Triple Throw
Throws 3 stars per attack animation
Throws 6 stars per attack animation with Shadow Partner
Claws attack 1.5 times per second
6*1.5 = 9
TT + SP throws 540 stars per min

Source
SouthPerry Forum
Pirate Damage Formula
A Comprehensive Guide to Gunslingers by Takeback3r and KazooTheBat.
Hurricane Vs. TT + SP (Which is faster?)
MapleStory Exp Calculator
MapleStory Potion Calculator
Damage Calculator for Warrior, Bowman, Thief, Magician
Archer Damage Calculator
Magician’s Accuracy & Casts per min
ArundRainger’s Magician Damage Calculator
BM and NL damage comparison

1 comment: