Jump to content

Average Damage Roll Probabilities


Recommended Posts

Hello guys. I have a question I hope somebody can help me about this.

 

How does average damage bonus rolls work? I mean is the probability of rolling %60 average damage is equal to rolling %12 average damage? Or probability of rolling %27 is equal to probability of rolling %-10?

 

When a average damage bonus is rolling, does every number have the same probability with others? Or rolling %10 is easier than %58? If not, can you share te formula?

 

Thanks for your attention! :)

 

 

Edited by FlyHunter
Link to comment
Share on other sites

  • Premium

Skill Damage gets calculated before Average Damage, the latter is based on the result of the first.

 

This is the default formula:

iSkillBonus = MINMAX(-30, (int) (gauss_random(0, 5) + 0.5f), 30);

if (abs(iSkillBonus) <= 20)
    iNormalHitBonus = -2 * iSkillBonus + abs(number(-8, 8) + number(-8, 8)) + number(1, 4);
else
    iNormalHitBonus = -2 * iSkillBonus + number(1, 5);

 

de facto, Max Avg Dmg should be 65% and Max Skill Dmg is 30%, but since values lower than 20 Skill Damage cause the Avg Damage to take into account the second calculation, it's impossible to get more than 60 Avg Damage, Max Skill Damage is still 30.

Obviously, the formula is heavily weighted towards minimum values, so getting 50% Avg. Damage is significantly harder than getting 10% Avg Damage, and obviously the same goes for Skill Damage.

The "+0.5f" has the purpose to round the value to the nearest integer.

Edited by Syreldar
  • Good 2
  • Love 1

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • 1 year later...
  • Bronze
4 hours ago, Gajos said:

Bro, I have no idea how the MINMAX function look like.. why there are 3 parameters? Where can I find the missing code?

 

int MINMAX(int min, int value, int max)
{
    register int tv;

    tv = (min > value ? min : value);
    return (max < tv) ? max : tv;
}

 

Edited by Tekanse
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 0

      I just implemented some costumes and they are not visible

    2. 0

      Skill Tree Problem

    3. 97

      Ulthar SF V2 (TMP4 Base)

    4. 5

      Client Crashes through Offline Shop (Ikarus)

    5. 5

      VIVY-WORLD2 - FARM TO THE TOP

    6. 0

      ToolTip Bug?

    7. 0

      Skill tree build erorr

    8. 0

      Visual Bug | How to fix this visual bug inside the Special Storage feature?

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.