Jump to content
  • 0

Damage formula doing strange things


Khaikaa

Question

Hi everyone,

 

I'm trying to find the best damage formulas for my game, but when I try the formula, the expected damage isn't equal to the real damage. I'll try to explain what I'm doing so maybe someone can help me a bit.

 

The damage formula I'm trying is this one(yup, too many parenthesis xD):

<PhysicalDamage>Random(((((A_Attack+A_Defense+A_Speed+A_AbilityPwr+A_MagicResist)-57)/3)+BaseDamage)*((ScaleFactor*ScalingStat)/V_Defense)*.975, ((((A_Attack+A_Defense+A_Speed+A_AbilityPwr+A_MagicResist)-57)/3)+BaseDamage)*((ScaleFactor*ScalingStat)/V_Defense)*1.025)</PhysicalDamage>

 

How does this work(or how this should work)?

First of all I need to calculate the lvl of the character/monster. This is as easy as adding all attacker's stats, substract 57 and divide by 3 (as the total initial stats are 60, when you substract 57 you get 3, which is also the total points you win each level, so dividing by 3 give you the current character/monster level [3/3 = 1, so you are lvl1, 6/3 = 2, so you are lvl2... etc]).

 

Now that you have the character/monster level, you add the base damage of the hit. If your character is on level 6, and your base damage is 1, this is equals to 7. So the formula now is:

 

<PhysicalDamage>Random(7*((ScaleFactor*ScalingStat)/V_Defense)*.975, (7*((ScaleFactor*ScalingStat)/V_Defense)*1.025)</PhysicalDamage>

 

Next step is calculating scalingstat * scalefactor. I'm using attack as scaling stat. On my lvl6 character, the attack stat is equal to 33(puted a big amount of points just on attack). Also, scaling factor is equals to 100%. So... 33*1 = 33.

 

The damge formula now is:

 

<PhysicalDamage>Random(7*(33/V_Defense)*.975, (7*(33/V_Defense)*1.025)</PhysicalDamage>

 

The monster I'm hitting is a crapy snake with just 5 def stat points. So:

 

<PhysicalDamage>Random(7*(33/5)*.975, (7*(33/5)*1.025)</PhysicalDamage>

 

Solving the operations:

 

<PhysicalDamage>Random(45.045, 47.355)</PhysicalDamage>

 

But, when I hit that damn snake... it takes 53 damage points. Am I calculating wrong? What is happening here?

I thought it may be because the server didn't update well, so tried restarting it, but nothing changed.

 

Hope someone can help me with this.

 

Good luck!

 

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

I think your initial formula is inherently flawed because the formula that determines the character's level isn't going to account for any gear that they have equipped that gives them stats.

 

In the case that you're attacking the snake unarmed, I would make sure you're not overlooking the base damage of the weapon or the stats that you gave the snake. The math seems to checkout from what I can tell, so your the character attacking must be overtuned in some way.

Link to comment
Share on other sites

  • 0
49 minutes ago, mcadams said:

I think your initial formula is inherently flawed because the formula that determines the character's level isn't going to account for any gear that they have equipped that gives them stats. 

 

In the case that you're attacking the snake unarmed, I would make sure you're not overlooking the base damage of the weapon or the stats that you gave the snake. The math seems to checkout from what I can tell, so your the character attacking must be overtuned in some way. 

 

This was a long time ago and I havn't messed with damage formulas for a while to be honest, so at this momment I don't remember how was I testing that. I will make this again and will tell here if this still happens to me. Thanks for the answer!

Link to comment
Share on other sites

  • 0
On 1/2/2018 at 12:04 AM, Khaikaa said:

<PhysicalDamage>Random(7*(33/5)*.975, (7*(33/5)*1.025)</PhysicalDamage>

 

I'm curious as to how this might work as your damage formula, if the values turn out as expected it will help isolate the problem.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...