Which file contains the dmg formula?

10/12/2010 03:57 Relaxation#1
I remember someone saying that one of the files contained the formula to determine how dmg is calculated.

Which file is it?
10/12/2010 04:19 pro4never#2
depends on source.

Usually something like

Calculations>Damage.cs or something like that.

attack, damage, etc. Totally depends on where you decide to place it.
10/12/2010 05:35 Relaxation#3
I wanna see it to know how the calculations work, potency, rebirth etc, how they are calculated by the server.

I'm not a pro. If someone can do it for me, or at least explain how, that would be awesome.
10/12/2010 05:55 Arcо#4
Well what source is it?
10/12/2010 06:09 Relaxation#5
Quote:
Originally Posted by Аrco View Post
Well what source is it?
Don't got a specific source in mind.

Are there any sources that include talismen/artifacts/dragonsouls into the equation, the way TQ does them?

If there is one, I could try with it.
10/12/2010 07:09 Arcо#6
Possibly, only way to find out is to look through em.
10/12/2010 07:15 pro4never#7
Obviously no sources contain that as there is no public source running a new patch (That has calculations done)

The only servers with semi finished calculations are lotf, coemu and MAYBE one or two other older sources.


Lotf is known for HORRIBLE dmg calculations at time though... Elitecoemu and such iirc has proper calculations but that's long before any artifacts or any of the new stuff (just plus, bless, quality and base item stats + talis)
10/12/2010 07:18 Relaxation#8
How do they implement talismen then? Do they just make up their own formula?
10/12/2010 08:13 pro4never#9
Of course. Everything related to pservers is simply "made up"

The only exception to that is when you are reading existing files (such as client itemtype or dmap files)

IIRC it goes something like...



Damage += Attacker.Pdmg - Attacked.Pdef;
if(Attacked.Bless > 0)
Damage -= Damage * (Attacked.Bless/100);
if(Attacked.TortPct > 0)
Damage -= Damage * (Attacked.TortPct/100);
if(Attacker.DragPct > 0)
Damage += Damage * (Attacker.DragPct /100);//this boost overal dmg by dragon gems or w/e other PERCENTAGE damage you are dealing
if(Attacker.Stigged)
Damage += Damage * (boost from stig level / 100);
if(Attacked.ManaShield)
Damage -= Damage * ( boost from mana shield / 100);
if(Attacked.XpShield)
Damage /= 3;
Damage += Attacker.TaliPdmg - Attacker.TaliPdef;

uint RebDiff = (uint)(Attacked.Reborn - Attacker.Reborn);
if(RebDiff > 0)
{
if(RebDiff == 1)
{
Damage *= .7;
}
else if(RebDiff == 2)
{
Damage *= .5;
}
}

if(Damage < 1)
Damage = 1;

return Damage;


Something along those lines. Don't think I forgot everything... Tali comes LAST (not effected by things like pdef and shield) Bless comes near the start, as do torts. Reborn comes near the end of calc.

May not be PERFECT but is damned close.

Note: just wrote this off the top of my head. Is not related to any source or pre-written code.
10/12/2010 19:05 Relaxation#10
Quote:
Originally Posted by pro4never View Post
Of course. Everything related to pservers is simply "made up"

The only exception to that is when you are reading existing files (such as client itemtype or dmap files)

IIRC it goes something like...



Damage += Attacker.Pdmg - Attacked.Pdef;
if(Attacked.Bless > 0)
Damage -= Damage * (Attacked.Bless/100);
if(Attacked.TortPct > 0)
Damage -= Damage * (Attacked.TortPct/100);
if(Attacker.DragPct > 0)
Damage += Damage * (Attacker.DragPct /100);//this boost overal dmg by dragon gems or w/e other PERCENTAGE damage you are dealing
if(Attacker.Stigged)
Damage += Damage * (boost from stig level / 100);
if(Attacked.ManaShield)
Damage -= Damage * ( boost from mana shield / 100);
if(Attacked.XpShield)
Damage /= 3;
Damage += Attacker.TaliPdmg - Attacker.TaliPdef;

uint RebDiff = (uint)(Attacked.Reborn - Attacker.Reborn);
if(RebDiff > 0)
{
if(RebDiff == 1)
{
Damage *= .7;
}
else if(RebDiff == 2)
{
Damage *= .5;
}
}

if(Damage < 1)
Damage = 1;

return Damage;


Something along those lines. Don't think I forgot everything... Tali comes LAST (not effected by things like pdef and shield) Bless comes near the start, as do torts. Reborn comes near the end of calc.

May not be PERFECT but is damned close.

Note: just wrote this off the top of my head. Is not related to any source or pre-written code.
Thats awesome. I wanna test it out. This one isn't found on any CO files, right?

I'm honestly curious about the m-def formula too.

edit: NVM found it.
10/12/2010 20:44 pro4never#11
Damage is server side. Client has no effect on the damage done really. The only damage it knows about is the calculation for damage which is put in your stat window... It never knows any of the stats for a person you are targeting.

Ooh and I should correct that in that the initial damage is a random number between mindmg-max dmg.