1. Hello!

    First of all, welcome to MapleLegends! You are currently viewing the forums as a guest, so you can only view the first post of every topic. We highly recommend registering so you can be part of our community.

    By registering to our forums you can introduce yourself and make your first friends, talk in the shoutbox, contribute, and much more!

    This process only takes a few minutes and you can always decide to lurk even after!

    - MapleLegends Administration-
  2. Experiencing disconnecting after inserting your login info? Make sure you are on the latest MapleLegends version. The current latest version is found by clicking here.
    Dismiss Notice

Maplelegends avoidability formula?

Discussion in 'General Discussion' started by akashsky, Oct 29, 2019.

  1. akashsky
    Offline

    akashsky Horntail

    2,038
    851
    495
    Jun 10, 2017
    Male
    United States
    4:54 AM
    Disparity
    Corsair
    200
    Pasta
    Is there a formula that lets you determine the percent change a monster has to hit you?

    I've tried to search online but there doesn't seem to be anything concrete about it. Perhaps one of our developers knows more about this?
    shotshot
     
  2. ahotbanana
    Offline

    ahotbanana Capt. Latanica Retired Staff

    361
    126
    278
    Sep 27, 2015
    Male
    UK
    12:54 PM
    I was under the impression it used the same formula as the hit rate for players against monsters:
    Chance to Hit = Accuracy/((1.84 + 0.07 * D) * Avoid) - 1
    (D = monster level - your level. If negative, make it 0.)

    I believe there is a minimum hit % for monsters to players, though.

    I could also be completely wrong about this, but this is what I thought. Might be worth measuring in-game data to see if this checks out before blindly believing me
     
  3. Selquin
    Offline

    Selquin Headless Horseman

    732
    265
    376
    May 28, 2018
    5:54 AM
    Serperior
    Bowmaster, Night Lord, Buccaneer
    200
    Pasta
    In the limit where accuracy/avoid goes to 0 it suggests that the hit % is negative. This isn't too surprising since it probably just means that below some minimum accuracy the attacker cannot hit the target. It probably makes sense to assume that if the argument is negative the hit chance is 0, and when the argument is greater than 1 the hit chance is 100%.
    I counted hit/miss on horntail preheads a couple of times, and it worked out to roughly ~35% dodge rate for a high level char with ~400 avoid. In this case the first term in that formula is less than 1, which suggests that the entire expression is negative and that horntail should never be able to hit me. This could be corrected by assuming there is some minimum % for monsters to hit players, however if that is the case why do higher avoid characters such as NLs and dex buccs clearly dodge more attacks than my BM?
    As much as I would love to know the true formula for hit chance, this does not quite look right to me.
     
  4. shot
    Offline

    shot Capt. Latanica Retired Staff

    332
    124
    278
    Oct 31, 2017
    Male
    6:54 AM
    sh0t/Davi
    Buccaneer
    185
    Honor
    Here's the avoid formula I have created directly from the game client. Feel free to play around with the variables yourself :D
    Keep in mind though, this formula only applies for touch damage, meaning a separate formula is used for magic damage. I did attempt to make one for magic attacks but realized that client didn't seem to output the result using percentages, making things a bit more complicated. If anyone is good at reading C code, feel free to take a look at it yourself here and see if you can possibly translate it to a formula!

    Anyways, here is the link.
    Enjoy!
     
    • Great Work Great Work x 4
    • Like Like x 1
    • Funny Funny x 1
    • Informative Informative x 1
  5. OP
    OP
    akashsky
    Offline

    akashsky Horntail

    2,038
    851
    495
    Jun 10, 2017
    Male
    United States
    4:54 AM
    Disparity
    Corsair
    200
    Pasta
    Thank you so much! This solves the mystery behind avoidability! I glanced briefly at the code, and it seems to me what ends up happening here is that a random integer is generated and then compared against a calculated value depending on your stats to determine if you get missed or not. I'll try to make it into a formula later if possible.
     
    • Like Like x 2
  6. iPippy
    Offline

    iPippy Nightshadow

    661
    344
    345
    May 19, 2019
    Male
    7:54 AM
    iPippy
    Been a while since there was any updates on this topic, and finally getting around to posting my findings. I'm a forum novice, so forgive my formatting. First, if anyone tried using the touch dodge rate calculator, there's actually an error in line 30, where the avoid bonus from buffs overwrites your base avoid. Got around that by just putting total avoid (base + buffs) during the "avoid from buffs: " prompt. Second, I took a look at the magic damage code shot provided for magic damage, and it seems for the most part to be applying a random scaling factor [0,1] to 90% of your avoidability, and adding 10% of your avoidability to compare to the accuracy of the monster. Pastebin seems to be down while writing this, but I do recall seeing a few nuances about the code (and I'm by no means a C expert): what are the functions of the two char values that were declared but never initialized? I'm not sure what they do, nor the impact they have on the overall calculation (the results are fairly nonsensical if you dont call zswap or skip directly to LABEL13:).

    That said, I have derived simple formulas for the dodge rates for touch and magic attacks and a few implications to be tested anecdotally:

    i. First calculate a level adjusted avoidability, for cases where you are lower level than the monster. Simply subtract your half your level difference (monster level - char level)/2 to get a new avoidability, used in the later checks for touch and magic dodge rates.
    ii. Touch damage dodge rate (expressed as decimal) appears to be simply Avoid/(4.5*Monster Accuracy), bounded between 2% and 80% dodge rates for non-thieves and 5% and 95% for thieves.
    iii. Magic damage dodge rate (for the normal cases), appears to be modeled by the formula [10/9 - Monster Accuracy/(0.9*Avoid)], without any class related adjustments that I'm aware of.

    There are a few details of note with these formulas. The derivative of the Touch dodge rate is 1/(4.5*Monster Accuracy), implying a linear increase of dodge rate per point of avoid. For many bosses such as Zakum, Horntail, Scarlion with 250 accuracy (NT bosses have slightly higher accuracy, but not by much), 1 avoid should correspond to a .089% increase in dodge rate up to the cap. This implies that stoppers (60 avoid) would give a 5.3% increased dodge rate absent other buffs, and a GM Bless (100 avoid) gives an 8.9% dodge rate increase.

    Magic dodge rate doesnt appear to adjust its dodge rate for high/low avoid scores. In fact, if you dont have at least as much avoid as Monster Accuracy, you *shouldnt* ever be able dodge magic damage at all. Additionally, if you have at least 10 times avoid as Monster Accuracy, you should never get hit. This can be tested with a 500 avoid char at Scarlion I and a 750 avoid char at Scarlion II. The dodge rate increase for magic damage per point of avoid are not linear, instead increasing dodge rate by [Monster Accuracy/(0.9*Avoid^2)]. A max avoid character should have a 83.3% magic dodge rate at places like Zakum and HT.

    If anyone is able to corroborate the values/formulas I've presented, or determine the importance of the IF statement in the code provided, that would be greatly beneficial. I've been interested in avoidability for a good while, and would like to see these answers finally come to light.
     
    • Great Work Great Work x 7
    • Like Like x 1
  7. Selquin
    Offline

    Selquin Headless Horseman

    732
    265
    376
    May 28, 2018
    5:54 AM
    Serperior
    Bowmaster, Night Lord, Buccaneer
    200
    Pasta
    I can't thank you enough for this, bless your soul.
     
    • Funny Funny x 3
    • Friendly Friendly x 1

Share This Page