royals exp calculation

Discussion in 'General Discussion' started by nomade, Oct 8, 2024.

  1. nomade
    Offline

    nomade Well-Known Member

    Joined:
    Jun 22, 2021
    Messages:
    234
    Likes Received:
    332
    Location:
    Forest of Dead Trees IX
    --------------------------------------------------------------------------------------------------
    This is a personal experiment in order to find out how in general the exp sharing works.
    The results are listed below as formulas case by case, all without Holy Symbol(1.5x if there're at least 2 people alive in party, 1.1x otherwise). All final exp go through a Floor(exp), this step is omitted in formulas.
    --------------------------------------------------------------------------------------------------
    • I recommend you to first have a look at this thread by which this project was largely inspired.​
    • There is sometimes a tiny exp discrepancy (+- 1-2) between the calculation result and the real exp you get. I'm guessing this is some sort of precision loss that can be derived from the cascaded calculations / date type conversion in the server code.​
    • There're situations that haven't been tested, such as:
      What if the mob recovers hp, for example Krex and Vikerola, how to calculate dmg% in this case. (#16)
      If you're below -5 levels of the mob and do damage. (#5)
      If you're below -5 levels of the mob and leeching from an attacker within 5 levels gap.​
    • Leech Conditions after Update #94 28/01/25 :
      1. leecher level >= -5 mob level : ok
      2. leecher level < -5 mob level and >= -5 damage dealer level : damage dealer needs to be >= -29 mob level (therefore minimum leech level requirement is >= -34 mob level)
      * any damage dealer that's < -29 mob level won't get exp​
    --------------------------------------------------------------------------------------------------


    Definition

    mobexp
    a mob's base exp * 3.2 server rate
    for example mobexp = 14400 for Skelegon

    cptsize
    factor of party size =
    (a) (1.1 + 0.05 * N) / (N + 1) if N >= 2 (N := party size)
    (b) 0.5 if N = 1 (1-person party)

    or
    Code:
    0.5    when N = 1
    0.4    when N = 2
    0.3125 when N = 3
    0.26   when N = 4
    0.225  when N = 5
    0.2    when N = 6
    
    lv
    leecher's level (who did 0 damage)

    avglv
    Floor(average party level)

    dmg%
    damage dealt by an attacker / (max hp + regened hp)

    party total dmg%
    sum of dmg% among all attackers in pt


    EXP Formulas

    1. mob killed by only 1 party (special case of 2.)

    for damage dealer:
    exp = mobexp * cptsize * (1 + dmg%)

    for leecher:
    exp = mobexp * cptsize * Min(lv/avglv, 1)

    damages
    pt1:
    attacker Lv139 54221/80000 (10699 + 16667 + 12537 + 14308)
    attacker Lv200 25779/80000 (80000 - 54221)
    leecher Lv190
    leecher Lv200
    leecher Lv142

    exp gain (theoretical / real exp)
    pt1:
    cptsize = 0.225
    avglv = Floor( (139 + 190 + 142 + 200 + 200) / 5 ) = 174
    attacker Lv139 14400 * 0.225 * (1 + /80000) = 5435.95 / 5435
    attacker Lv200 14400 * 0.225 * (1 + /80000) = 4284.04 / 4283
    leecher Lv190 14400 * 0.225 * Min(190/174, 1) = 3240 / 3239
    leecher Lv200 14400 * 0.225 * Min(200/174, 1) = 3240 / 3239
    leecher Lv142 14400 * 0.225 * Min(142/174, 1) = 2644.13 / 2643

    2. mob killed by by multiple parties

    for damage dealer:
    exp = mobexp * cptsize * (party total dmg% + dmg%)

    for leecher:
    exp = mobexp * cptsize * Min(lv/avglv, 1) * party total dmg%

    damages
    pt1:
    attacker Lv200 46025/80000
    attacker Lv139 17075/80000

    pt2:
    attacker Lv190 2063/80000 (609 + 1454)
    leecher Lv142

    pt3:
    attacker Lv200 14837/80000 (80000 - 46025 - 2063 - 17075)

    exp gain (theoretical / real exp)
    pt1:
    cptsize = 0.4
    avglv = Floor( (139 + 200) / 2 ) = 169
    attacker Lv200 14400 * 0.4 * (63100/80000 + 46025/80000) = 7857.00 / 7856
    attacker Lv139 14400 * 0.4 * (63100/80000 + 17075/80000) = 5772.60 / 5771

    pt2:
    cptsize = 0.4
    avglv = Floor( (190 + 142) / 2 ) = 166
    attacker Lv190 14400 * 0.4 * (2063/80000 + 2063/80000) = 297.07 / 297
    leecher Lv142 14400 * 0.4 * Min(142/166, 1) * 2063/80000 = 127.06 / 127

    pt3:
    cptsize = 0.5
    attacker Lv200 14400 * 0.5 * (14837/80000 + 14837/80000) = 2670.66 / 2670

    3. If you are not in any party
    exp = mobexp * 0.8 * dmg%

    4. If you are not in any party and do the last hit
    exp = mobexp * (0.8 * dmg% + 0.2)

    damages
    pt1:
    attacker Lv190 4202/80000 (113 + 1883 + 2206)
    leecher Lv139
    leecher Lv142

    unpt'd:
    Lv200 40441/80000
    Lv200 Last hit 35357/80000 (80000 - 4202 - 40441)

    exp gain (theoretical / real exp)
    pt1:
    cptsize = 0.3125
    avglv = Floor( (139 + 190 + 142) / 3 ) = 157
    attacker Lv190 14400 * 0.3125 * (4202/80000 + 4202/80000) = 472.72 / 472
    leecher Lv139 14400 * 0.3125 * Min(139/157, 1) * 4202/80000 = 209.26 / 209
    leecher Lv142 14400 * 0.3125 * Min(142/157, 1) * 4202/80000 = 213.78 / 213

    unpt'd:
    Lv200 14400 * (0.8 * 40441/80000) = 5823.50 / 5823
    Lv200 Last hit 14400 * (0.8 * 35357/80000 + 0.2) = 7971.40 / 7971

    5. If someone in party dies and stays in the map

    N of cptsize and average party level degrade to those who are alive.
    e.g. In a 3 man pt 1 member is dead, cptsize is 0.4 instead of 0.3125
    e.g. In a 4 man pt 3 members are dead, cptsize = 0.5

    dmg% and party total dmg% remain unchanged (meaning, dead attacker's dmg% still contributes to party total dmg%)

    damages
    pt1:
    attacker Lv139 1/80000 (80000 - 79999)
    attacker Lv190 dead 79999/80000
    leecher Lv142

    exp gain (theoretical / real exp)
    pt1:
    cptsize = 0.4
    avglv = Floor( (139 + 142) / 2 ) = 140
    attacker Lv139 14400 * 0.4 * (80000/80000 + 1/80000) = 5760.07 / 5759
    leecher Lv142 14400 * 0.4 * Min(142/140, 1) = 5760 / 5759

    6. If someone in party left the map
    Anyone leaving the map is seen as outside pt. N of cptsize decreases and his dmg% is deducted from party total dmg%.


    damages
    pt1
    attacker Lv200 dead 16547/80000 (6016 + 10531)
    attacker Lv142 leave map 4709/80000
    leecher Lv139 +HS

    pt2
    attacker Lv200 +HS 9612/80000
    attacker Lv190 +HS leave pt and Last hit 49132/80000 (80000 - 16547 - 4709 - 9612)

    exp gain
    pt1
    cptsize = 0.5
    avglv = 139
    leecher Lv139 14400 * 0.5 * Min(139/139, 1) * 16547/80000 * 1.1 = 1638.15 / 1638
    pt2
    cptsize = 0.5
    attacker Lv200 14400 * 0.5 * (9612/80000 + 9612/80000) * 1.1 = 1903.17 / 1903

    unpt'd
    Lv190 Last hit 14400 * (0.8 * 49132/80000 + 0.2) * 1.1 = 10950.50 / 10950


    Extra
    no extra what extra


    In your dream, beside a fire in a great hall you start dancing with balrog. You think about those people you met who have quit, who are banned, who are still active on the field, their words, those times you've made together, and the exp formulas. Sometimes Rich Text Editor comes to your dream, throwing you unexpected BBcode tags. When you see those weird Spoilers out of nowhere you realize it's not reality. You wake up, open the BBcode Editor, say shiiit and start to remove those dummy tags one by one manually.
     
    Last edited: Mar 12, 2026 at 4:39 AM
    XuXuBaoBao, LichWiz, Crags and 4 others like this.
  2. Zenoooo
    Offline

    Zenoooo Donator

    Joined:
    Apr 2, 2015
    Messages:
    1,640
    Likes Received:
    1,241
    Gender:
    Female
    Location:
    the Apollo basin
    Country Flag:
    IGN:
    Apr 2015
    Level:
    -
    Guild:
    Oct 2017
    should be in Guides forum
     
    Last edited: Oct 8, 2024
  3. NehZu
    Offline

    NehZu Donator

    Joined:
    Dec 10, 2023
    Messages:
    585
    Likes Received:
    1,196
    Gender:
    Male
    Country Flag:
    you two would make a nice couple.
     
  4. nomade
    Offline

    nomade Well-Known Member

    Joined:
    Jun 22, 2021
    Messages:
    234
    Likes Received:
    332
    Location:
    Forest of Dead Trees IX
    because it's not accurate and I hope there will be some discussion

    ??
     
  5. nomade
    Offline

    nomade Well-Known Member

    Joined:
    Jun 22, 2021
    Messages:
    234
    Likes Received:
    332
    Location:
    Forest of Dead Trees IX
    1-1-a. 3 attackers pt, 1 attacker lower than -5 level of mob
    tested on NMM with error of ~1%
    tested on Plow Ox with error of 1-2 (1%-5%)
    +HS (1.5)

    main attacker:
    cptsize = 0.4
    exp = mobexp * cptsize * ( (0.8*[dmg of low level attacker]*1.5 + [dmg of another attacker]*1.5 + dmg*1.5 )/mobhp + dmg*1.5/mobhp ) * event bonus

    low level attacker:
    cptsize = 0.4
    exp = mobexp * cptsize * ( 0.8*dmg*1.5/mobhp + 0.8*dmg*1.5/mobhp ) * event bonus


    1-1-b. 2 attackers pt, 1 attacker lower than -5 level of mob
    tested on Plow Ox with error of 0-1
    tested on Dunas v2 with error of 1 (< 0.001%)
    +HS (1.5, 1.1)

    main attacker:
    cptsize = 0.5
    exp = mobexp * cptsize *( (0.8*[dmg of low level character]*1.5 + dmg*1.1)/mobhp + dmg*1.1/mobhp ) * event bonus

    low level attacker:
    cptsize = 0.5
    exp = mobexp * cptsize * ( 0.8*dmg*1.5/mobhp + 0.8*dmg*1.5/mobhp ) * event bonus


    Edit:
    This is very weird one, and i hope more experiments can be done for this case
     
    Last edited: Feb 16, 2026
    chainyu0220 likes this.
  6. LichWiz
    Offline

    LichWiz Well-Known Member

    Joined:
    Jun 21, 2016
    Messages:
    2,129
    Likes Received:
    4,668
    IGN:
    IronShichika
    Level:
    200
    Guild:
    Ironman
    Small insight regarding the slight inconsistency of the results:
    While I made myself a sheet to calculate player range, I discovered that the game basically rounds down numbers at almost all steps of the calculation [yes, specifically down]. Before I just did normal rounding, but after applying rounding down to all my equations, the numbers came out exactly as they were in-game.
    For example, when you have Echos active, the game takes your total WA, multiplies it by 1.04, then rounds the result down. Even the final range result is rounded down in the end.
    So maybe if you'll write all these formulas in excel, and use "ROUNDOWN" command on all calculations with multiplications or divisions, it will result in numbers closer to results in game?
     
    Kheb, nomade and Sylafia like this.
  7. Green Mind
    Online

    Green Mind Donator

    Joined:
    Jan 11, 2022
    Messages:
    694
    Likes Received:
    1,024
    Gender:
    Male
    So if you have a part of attackers + bishop (who does no damage)
    all attackers suicide except only one that needs exp
    Is it correct that bishop should stay in party alive with HS active rather than leave, since party size is treated as 2 in this case (so HS gives more %)? Because bishop leaving will essentially turn it into a 1 man party?

    I did two rounds of NMM like this
    level 200 attackers x2, level 177 attacker that needs exp, bishop

    day 1: level 200 attackers suicide, bishop HS and stays in party, 32m exp
    day 2: level 200 attackers suicide, bishop HS and leaves party, 29m exp

    Wondering if this makes sense based on your experience.
     
  8. Sylafia
    Offline

    Sylafia Donator

    Joined:
    Jan 2, 2022
    Messages:
    2,035
    Likes Received:
    7,995
    Gender:
    Female
    Location:
    Lion King's Castle - Audience Room
    Country Flag:
    IGN:
    Sylafia
    Level:
    200
    Guild:
    Northern
    Technically what would be optimal is to suicide on all but one besides the one that needs exp, and leave party on bishop I believe. Otherwise yes you'll want bishop in party to make HS 150% instead of 110%
     
    Green Mind likes this.
  9. nomade
    Offline

    nomade Well-Known Member

    Joined:
    Jun 22, 2021
    Messages:
    234
    Likes Received:
    332
    Location:
    Forest of Dead Trees IX
    yes in this case you'll want to have bishop in pt for more exp
    and the exps you provide match the math, assuming your level 177 attacker did 100-110m damage(, or 23%-25% damage)
    (if you have exact exp, we can know exact damage % from level 177 attacker)

    Code:
    let mobexp = 43_000000;
    let mobhp = 430_000000;
    let cptsize = (N) => {
        return N === 1 ? 0.5 : (1.1 + 0.05*N)/(N+1);
    }
    
    // day1
    let hs = 1.5;
    let dmg_lv177 = 110_000000;
    console.log( mobexp * cptsize(2) * ( (mobhp*hs)/mobhp + dmg_lv177*hs/mobhp) );
    
    // day2
    hs = 1.1;
    dmg_lv177 = 110_000000;
    console.log( mobexp * cptsize(1) * ( (mobhp*hs)/mobhp + dmg_lv177*hs/mobhp) );
    
    Code:
    32400000.000000007
    29700000.000000004
    
     
    Green Mind likes this.
  10. Green Mind
    Online

    Green Mind Donator

    Joined:
    Jan 11, 2022
    Messages:
    694
    Likes Received:
    1,024
    Gender:
    Male
    Thanks for the replies! I also need to try Sylafia's suggestion and see if I've been doing it wrong for MONTHS... -.-'
     
    Sylafia likes this.
  11. Crags
    Offline

    Crags Donator

    Joined:
    Aug 21, 2023
    Messages:
    247
    Likes Received:
    390
    Country Flag:
    IGN:
    Crags
    Level:
    200
    Guild:
    Rogue
    if you attack on the character that needs exp it's trivial:

    mobexp*cptsize(1)*(1 + dmg%)*hs(1) < mobexp*cptsize(2)*(1 + dmg%)*hs(2)
    0.5*1.1 < 0.4*1.5
    true for all dmg%

    but if both do no damage:

    mobexp*cptsize(1)*1*hs(1) < mobexp*cptsize(2)*(lv/partylv)*hs(2)
    0.5*1.1 < 0.4*(lv/partylv)*1.5
    lv > 0.91*partylv

    so it's better if you're above 91% the average party level on the character that needs exp

    also it's always better exp to attack than to leech, for any party size and level
     
    Last edited: Jan 30, 2025
    Green Mind and Sylafia like this.
  12. nomade
    Offline

    nomade Well-Known Member

    Joined:
    Jun 22, 2021
    Messages:
    234
    Likes Received:
    332
    Location:
    Forest of Dead Trees IX
    note that bishop contributes to average party level too so left hand / right hand average party level will be 2 different terms
    well actually I was mistaking something
     
    Last edited: Jan 30, 2025
    Crags likes this.
  13. Crags
    Offline

    Crags Donator

    Joined:
    Aug 21, 2023
    Messages:
    247
    Likes Received:
    390
    Country Flag:
    IGN:
    Crags
    Level:
    200
    Guild:
    Rogue
    you were right, i just edited (lv/partylv) to 1 (party of 1) on the left-hand side to make things clearer
     
    nomade likes this.
  14. nomade
    Offline

    nomade Well-Known Member

    Joined:
    Jun 22, 2021
    Messages:
    234
    Likes Received:
    332
    Location:
    Forest of Dead Trees IX
    Proposal of calculating VL party damages

    If you ever look into the exp formula for damage dealers, you can find that if adding up every party member's exp from killing a mob, we get the sum = mobexp * cptsize(N) * (N+1) * party damage %, in which N = # damage dealers in the party

    From this equation we are able to calculate:
    The damage dealed by a party (in percentage) = exp sum{from every member's screenshot, need to /1.5 if there's HS} / (mobexp * cptsize(N) * (N+1))
     
    Zenoooo likes this.
  15. Zenoooo
    Offline

    Zenoooo Donator

    Joined:
    Apr 2, 2015
    Messages:
    1,640
    Likes Received:
    1,241
    Gender:
    Female
    Location:
    the Apollo basin
    Country Flag:
    IGN:
    Apr 2015
    Level:
    -
    Guild:
    Oct 2017
    I was wondering if the leecher does some damage (even 1 damage), what exp formula would be cuz it seems to be different.

    So I did experiment on Shao leech.

    Not hitting yaoseng: exp ~ 27m (day 1 exp gain on 163 se and 157 bucc)
    Hitting yaoseng: exp ~ 30m (day 2 exp gain on 163 se and 157 bucc)
    Party 1: 200 NL, 199 hero, 163 SE
    Party 2: 200 shad, 189 bucc, 157 bucc
    200 NL and Shad commit suicide.

    Formula 1 gives them about 10% more exp. So indeed if you hit the boss/mob (could be doing 1 damage), you could get more exp.
     
    Last edited: May 14, 2025
  16. nomade
    Offline

    nomade Well-Known Member

    Joined:
    Jun 22, 2021
    Messages:
    234
    Likes Received:
    332
    Location:
    Forest of Dead Trees IX
    Updated definition of dmg% to reflect a newly tested case regarding mob hp regen (tested on Jr.Balrog)
    Old: damage dealt by single attacker / total monster hp
    New: damage dealt by single attacker / (max hp + regened hp)
     
    Crags, Kheb and Sylafia like this.

Share This Page