Keywords
VAL0 = X
VAL1 = Y
VAL2 = Z
etc. It's algebra. Please complete primary school.
m = read-only value. e.g.
m stands for 見る, the kanji for seeing (miru/mimasu)
• mSTR = the stat points you have invested in STR
• mATK = the ATK value you can see in your stats page
• mLv = the Lv of your character that you can see
b = the total ± value you are receiving (commonly referred to as your "flat" value). e.g.
b stands for basic / base
• bSTR = the flat STR± you are receiving from any source (excluding +%)
• bATK = the flat ATK± you are receiving from any source (excluding +%)
important note: the idea of "base ATK" and "base MATK" do not actually exist.
Even if you wear trash gear to remove as much +% and bATK as you possibly can, the remaining mATK is still being gained from somewhere, such as your Lv or Stat+ from job bonus.
It is important to make this distinction between the m value and b value, because most formulae uses your m value.
here are some examples.
e.g. the code for Delusion Icebow's "DEX+20%" when you have 400 mDEX
VAL0 becomes mDEX x 0.2
bDEX up by VAL0
therefore,
mDEX = 400 (this m value can never change, unless you change the stat points invested in DEX)
bDEX = 80
e.g. the code for Injaria II's Changes part of DEX to STR
VAL0 = mDEX x 0.4
bSTR up by VAL0
VAL1 = [(mDEX x 0.5) x -1]
bDEX up by VAL1
In this formula, your mDEX is used to manipulate your bSTR and bDEX.
e.g. the code for Wandering Clothes' Converts half of STR to CRT
VAL0 = mSTR / 2
bCRT up by VAL0
VAL1 = VAL0 x -1
bSTR up by VAL1
Here, your mSTR is used to manipulate your bCRT and bSTR.
Because Injaria II and Wandering Clothes both use your m value, their formulae do not affect each other when you wear both.
mMaxHP Formula
VAL0 = 40 + ( mLv * 7 ) + (( mVIT * mLv ) * 0.8 )
VAL1 = VAL0 + bMaxHP + (( bVIT * mLv ) * 0.8 )
mMaxHP = VAL1 + (( VAL1 * bMaxHP±% ) / 100 )
mMaxMP Formula
VAL0 = 10 + ( mLv * 2 ) + (( mINT * mLv ) * 0.2 )
VAL1 = VAL0 + bMaxMP + (( bINT * mLv ) * 0.8 )
mMaxMP = VAL1 + (( VAL1 * bMaxMP+% ) / 100 )
bExp Formula
VAL0 = (( mLv * 10 ) + ( mLv * mLv * mLv * mLv ) * 0.4) - 4
bExp = VAL0 / 10
mDEF Formula
VAL0 = bDEF + ( mVIT + bVIT ) * 1.5 ) + Body DEF + Add DEF + Weapon DEF
mDEF = VAL0 + (( VAL0 * bDEF±% ) / 100 )
mMDEF Formula
VAL0 = mINT + bINT + bMDEF + (( mVIT + bVIT ) / 2 )
mMDEF = VAL0 + (( VAL0 * bMDEF±% ) / 100 )
mHIT Formula
VAL0 = mLv + mDEX + bDEX + bAccuracy
mHit = VAL0 + (( VAL0 * bAccuracyRate±% ) / 100 )
mEVA Formula
VAL0 = mLv + mAGI + bAGI + bEvasion
mEVA = VAL0 + (( VAL0 * bEvasionRate±% ) / 100 )
mASPD Formula
VAL0 = 1 if sword, 2 if bow, 3 if rod, 4 if claw, 5 if throw ※※※correction from in-game testing: 1 if claw?
VAL1 = ( 10 + ( VAL0 * 2 )) - ((( mAGI + bAGI ) / 12 ) + (bASPD% / 10)
mASPD = VAL1 - (( VAL1 * bASpdAddRate ) / 100 )
mCSPD Formula ※needs additional clarification
VAL0 = 10 if Rod, 20 if not Rod
VAL1 = ( VAL0 - (( mDEX + bDEX ) / 10 ))
VAL2 = VAL1 - (( VAL1 * bCastTime±% ) / 100 ) [if VAL2 would become < 0, VAL2 becomes 0 instead]
mCSPD = VAL2 + 10
Enemy Secondary Stats
Enemy ATK = [( Enemy STR * 3 ) + ( Enemy DEX * 3 ) + Enemy Lv ]
Enemy MATK = [( Enemy INT * 3 ) + ( Enemy DEX * 3 ) + Enemy Lv ]
Enemy HIT = [ Enemy DEX + Enemy Lv ]
Enemy EVA = [ Enemy AGI + Enemy Lv ]
Damage you deal Formula (only by autoattack?)
For this section, you must know the enemies EVA stat
to find this numbers quickly, you can also search for your monster in https://irunawiki.com/
please remember that boss HP% parameters can change their base stats, which will also change their secondary stats!
Accuracy flag
tmpHit = ( mHIT + 80 ) - Enemy EVA
if tmpHit < 5, tmpHit becomes 5
if tmpHit > 95, tmpHit becomes 95
Critical calculation
VAL0 = ((( mCRT + bCRT ) / 3 ) + 5 ) + bCriticalRate
tmpCri = VAL0 + (( VAL0 * bCriticalRate+% ) / 100 )
if tmpCri > 95, tmpCri becomes 95
if a randomly generated number from 0-100 is < tmpCri, mCrtFlag becomes 1
Accuracy calculation (if your attack did not crit)
if mCrtFlag = 0,
if a randomly generated number from 0-100 is > tmpHit, your attack misses
Damage calculation
mAtk1 = Weapon ATK
mAtk2 = mAtk1 * 0.7 [rounded to nearest whole number]
tmpAtk = a randomly generated number between 0 and ( mAtk1 - mAtk2 ) [if calculation errors for any reason, tmpAtk becomes 1]
dmg = ( mAtk + mAtk1 + tmpAtk ) - ((Enemy DEF * 1.5 ) - ( mLv - Enemy Lv ))
if dmg < 0, dmg becomes 1
if mCrtFlag = 1, dmg becomes ( dmg * ( 150 + (( mCRT + bCRT ) / 2 ))) / 100
Damage you receive from enemy attack Formula
For this section, you must know the enemies HIT stat, enemies CRT stat, and enemies ATK/MATK stat.
to find these numbers quickly, you can also search for your monster in https://irunawiki.com/
please remember that boss HP% parameters can change their base stats, which will change their secondary stats!
Enemy Accuracy flag
tmpHit = ( Enemy HIT + 80 ) - ( Players mEVA + 20 )
if tmpHit < 5, tmpHit becomes 5
if tmpHit > 95, tmpHit becomes 95
Enemy Critical calculation
tmpCri = (( Enemy CRT / 3 ) + 5 ) - ( Players mAgi / 10 )
if tmpCri < 5, tmpCri becomes 5
if a randomly generated number from 0-100 is < tmpCri, Enemy CrtFlag becomes 1
Enemy Accuracy calculation (if enemy attack did not crit)
if Enemy CrtFlag = 0,
if a randomly generated number from 0-100 is > tmpHit, enemy attack misses
Enemy Damage calculation
If the attack is a magic attack, replace Enemy ATK with Enemy MATK
tmp1 = Enemy ATK
tmp2 = Enemy ATK * 0.8 [rounded to nearest whole number]
tmpAtk = a randomly generated number between 0 and ( tmp1 - tmp2 ) [if calculation errors for any reason, tmpAtk becomes 1]
AddDefR = Add Def + Add Refinement
BodyDefR = Body DEF + Body Refinement
WeaponDef = Weapon DEF
tmpLv = Players mLv - Enemy Lv [If tmpLv would become > 0, tmpLv becomes 0]
dmg = (((( Enemy ATK + tmpAtk ) * ( 1 - (( BodyDefR + AddDefR + WeaponDef ) / 100 )) - Players mDEF - tmpLv )))
if dmg would become below 1, dmg becomes 1
if Enemy CrtFlag = 1, dmg becomes ( dmg * ( 150 + (( Enemy CRT + 1 ) / 2 ))) / 100