Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Data Collecting: Mob Damage/Defense Formula
#1
An attempt to find a concrete formula for the damage any monster can deal, given a character and its defense.

(Greyed fields are without screenshot or assumed values; if no attack is specified, touch damage assumed. Presented in no particular order)

DamageSourceCharacter LevelJob ClassSTRDEF/MDEFContributor
6Blue Snail5Beginner220LightningZLazer
16Blue Snail144Bishop40LightningZLazer
12Blue Snail35Cleric40Russt
25Blue Snail118Hermit100Stereo
62Electrophant64I/L Wizard4191Paracelsus
67Electrophant64I/L Wizard4191Paracelsus
645Electrophant - attack164I/L Wizard4191Paracelsus
681Electrophant - attack164I/L Wizard4191Paracelsus
3Green Snail136Buccaneer67030D3ath
6Blue Snail136Buccaneer67030D3ath
8Red Snail136Buccaneer67030D3ath
24Green Snail136Buccaneer6700D3ath
26Blue Snail136Buccaneer6700D3ath
30Red Snail136Buccaneer6700D3ath
1485Bain200Warrior00Stereo
1566Bain200Warrior00Stereo
1519Bain200Warrior20000Stereo
1604Bain200Warrior20000Stereo
1569Bain200Warrior50000Stereo
1658Bain200Warrior50000Stereo
1453Bain200Beginner00Stereo
1535Bain200Beginner00Stereo
1454Bain200Beginner20000Stereo
1537Bain200Beginner20000Stereo
118Croco65Page257299Loose
131Croco65Page257299Loose
89Croco65Page257339Loose
102Croco65Page257339Loose
74Croco65Page258363Loose
86Croco65Page258363Loose
45Croco65Page258403Loose
57Croco65Page258403Loose
146Dyle (Attack Up)65Page258363Loose
162Dyle (Attack Up)65Page258363Loose
110Dyle (Attack Up)65Page258403Loose
130Dyle (Attack Up)65Page258403Loose


If you'd like to contribute, all you have to do is post a screenshot showing yourself taking damage from any monster, and your stat screen (required, or at the very least state your DEF; without it is worthless). They don't have to be in the same pic as long as they're the same stats.

If you really want to be useful, try and get a range. One pic each for the lowest and highest damages you see from the same thing. But it's not strictly required.

Also, if you've already collected some data (Fiel? Chin), I'll take it. Accompanying screenshots would be nice but I won't require it, however if two data points appear to contradict each other and only one of them has a screenshot... you know which one I'll throw away.

--
I've already imported what's been posted in http://www.southperry.net/forums/showthread.php?t=11013 that thread, if no one objects (though I don't see why one would).
If there are other such threads, point me to them.
Reply
#2
I did some tests that would be difficult to replicate in Global but add useful datapoints...

All with 0 w.def.
Bain vs. lv.200 Warrior (0 str) (White Knight iirc, I didn't write it down though)
1485-1566
Bain vs. lv.200 Warrior (2000 str)
1519-1604
Bain vs. lv.200 Warrior (5000 str)
1569-1658

Bain vs. lv.200 Beginner (0 str)
1453-1535
Bain vs. lv.200 Beginner (2000 str)
1454-1537


I'll get my Paladin to snails soon to take a SS there.


 124 Paladin @ Snails, 0 def = 36 damage
Reply
#3

DamageSourceCharacter LevelJob ClassSTRDEF/MDEFContributor
118Croco65Page257299Loose
131Croco65Page257299Loose
89Croco65Page257339Loose
102Croco65Page257339Loose
74Croco65Page258363Loose
86Croco65Page258363Loose
45Croco65Page258403Loose
57Croco65Page258403Loose
146Dyle (Attack Up)65Page258363Loose
162Dyle (Attack Up)65Page258363Loose
110Dyle (Attack Up)65Page258403Loose
130Dyle (Attack Up)65Page258403Loose


Didn't include Threaten in the table above.
 Spoiler
I'll post my other characters with 0 Weapon Defense on Snails later.
Reply
#4
A few things that might make this a lot easier:

- Edit Base.wz to set StandardPDD values to 0
- According to my research, all stats have some effect one way or another on damage received.
Reply
#5
Apologize for the double post, but I've found these things to be true though some research I just did.

1. The player level has an impact on the amount of damage received.
2. The player level is involved in a multiplier of some sort, but is not a multiplier over the entire equation
Reply
#6
Ive been doing some researches of my own, and i must say that im extremely close to it. From what I have now, i can see that its an extremely complicated forumula, and its something in the style of:
...many other calculations... (level*multiplier + str*multiplier + int*multiplier + dex*multiplier + luk*multiplier)... more calculations...

The only thing im missing is how are the multipliers generated. They are obviously not static because most of them are things like 2.123785135468.

I'm hoping to finish and have a formula by today's evening, but it will possibly take another day depending on how complicated generating the multipliers is.

On my level 1 equipless beginner with 429 str, 429 int, 50 dex, 50 luk, versus a green mushroom, it was something like (not exact, i have some things missing):
variable1 = dex * 0.25 + luk *0.2871941235 + str*0.4 + int * 0.111111111
if (some weird var i dont understand, possibly level < 15)
variable1 = variable1 * 0.00125

variable2 = level * 0.0018 + variable1 + 0.28
0-StandardPDD * 1.3 (i have no idea what to do with this line, i cant understand my own handwriting Stunned)
damage = variable 2 - (some other variable (possibly def) * variable2 * 0.01)

however this always produced a static damage of about 61, not a min-max range. so i assume one of these "multipliers" was actually a randomized value.

aaannnndddd... im back to debugging.
Reply
#7
Note that the formula IS in the client.. if we had a very good debugger..
Reply
#8
Some more info:

Damage RangeSourceCharacter LevelJob ClassStrDexIntLukDEF/MDEFContributor
167 ~ 175Flyeye144Buccaneer7164712120D3ath
159 ~ 167Flyeye144Buccaneer71663121210D3ath
9 ~ 17Flyeye144Buccaneer736802727200D3ath


A pattern I found is that the range for each one was 8, so maybe the weapon attack could affect the damage range.

 167 ~ 175
 159 ~ 167
 9 ~ 17
Reply
#9
D3ath Wrote:Some more info:

Damage RangeSourceCharacter LevelJob ClassStrDexIntLukDEF/MDEFContributor
167 ~ 175Flyeye144Buccaneer7164712120D3ath
159 ~ 167Flyeye144Buccaneer716631212[B]0D3ath[/B]
9 ~ 17Flyeye144Buccaneer736802727[B]0D3ath[/B]


A pattern I found is that the range for each one was 8, so maybe the weapon attack could affect the damage range.

 167 ~ 175
 159 ~ 167
 9 ~ 17

Forgot Zhelm and PAC def/mdef.
Reply
#10
AngelSL Wrote:Note that the formula IS in the client.. if we had a very good debugger..
of course the formula is in the client, and of course im using a debugger. how do you think i got all the data?
Reply
#11
MasPan Wrote:Forgot Zhelm and PAC def/mdef.

Oh right, forgot to change it. Don't have info on here (On PSP)
Reply
#12
Okay guys, im almost finished! below is a beta algorithm I made in c# that calculated the damage recieved based on the character's level, standardPDD,def,str,int,luk,dex and a random value. note that the formula, as I said, is very complicated, and is being splitted into many paths. so for this to succeed, your character's def must be lower than the standardPDD for it.

I tested it on a level 10 beginner with 429 str 50 dex 400 int 57 luk and 7 def. It's recommended to do the same because as i said its still only a first version and there might be some bugs here and there. Ill post it in a new topic along with explanations and non-programmed formulas when im finished with it.

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace defense
{
    class Program
    {
        static int Main(string[] args)
        {
            int def = 7;
            int level = 10;
            int StandardPDD = 19; //can be found in Base.wz. it's 19 for a lvl 10 beginner
            int str = 429;
            int inte = 400; //lol i cant make a variable called "int" =\
            int dex = 50;
            int luk = 57;
            int arg6 = 82; //monster's weapon att
            uint arg3 = 0xBB6CABC0; //randomization value
            int local3 = 0;
            int local5 = 0;
            int arg5 = 0;

            float local6 = arg6;
            float local4 = local6 * (float)0.85;
            float local8 = local6 * (float)0.8;
            //float temp2 = local8;
            //float temp = local4 - local8;
            //int eax = arg3 / 0x989680;
            local8 = (((((local4 - local8) * (arg3 % 0x989680)) / 10000000) + local8) * local6) / 100; //or in other words, local8 = ((((((watt * 0.85) - (watt * 0.8)) * (random % 0x989680)) / 10000000) + (watt * 0.8)) * watt) / 100
            arg6 = def;
            if (arg6 > 0x7df)
                arg6 = 0x7df; //apperantly max defense possible is 0x7df (2015)...
            int value = 0; //one of these values i have no idea what they mean
            int local1 = 0; //i have no idea what is that one too... seems like its always 0
            if (local1 == 1)
            {
                //some different formula here, will extract it if i see a case when local1 != 0
            }
            else
            {
                local3 = str;
                local5 = dex;
                local1 = inte;
                arg5 = luk;
                arg5 = (int)((arg5 * 0.25) + (local5 * 0.2857142857142857) + (local3 * 0.4) + (local1 * 0.1111111111111111));
            }
            int arg1 = 15; //lolwut? i have no idea what is it again.
            if (def >= StandardPDD)
            {
                //some different formula here, will extract it later
            }
            else
            {
                if (level < arg1)
                {
                    local6 = (float)(arg5 * 0.00125);
                    int edi = def - StandardPDD;
                    float temp = (float)(((level * 0.001818181818181818 + local6 + 0.28) * edi * 1.3) + ((local6 + 0.28) * def));
                    float FinalDamage = local8 - temp;
                    return (int)FinalDamage;
                }
                else
                {
                    //more annoying formulas...
                }
            }
            return 0;
        }
    }
}
Reply
#13
Why in the world would the formula be like that? Are you serious that the formula works like that in-game? O.o

(Uh. How am I going to get a character with those stats without hacking or having a pserver?)
Reply
#14
Devil's Sunrise Wrote:Why in the world would the formula be like that? Are you serious that the formula works like that in-game? O.o

(Uh. How am I going to get a character with those stats without hacking or having a pserver?)
No, the formula is MUCH, MUCH more complicated (as i commented in the source, there are scenarios that have completely different formulas, for example if def > standardpdd). You want me to post the ripped assembler code here? I think it's beyond the max post size.

EDIT: lol, its 5 times bigger than the max post size.
Reply
#15
You'd think with such a complicated formula they would have made defense more useful Rolleyes

"We've perfected the defense formula! It is balanced and will now react to even the most subtle change in stats!"
"Great. So how much damage should we make Pink Bean do?"
Reply
#16
Dusk Wrote:You'd think with such a complicated formula they would have made defense more useful Rolleyes

"We've perfected the defense formula! It is balanced and will now react to even the most subtle change in stats!"
"Great. So how much damage should we make Pink Bean do?"

Actually if you look at the formula, stats barely do anything at all. and as suspected, str is the most "critical" stat, followed by dex, then luk in an extremely small difference, and int. int is about 4 times less than str.
Reply
#17
Kortestanov Wrote:No, the formula is MUCH, MUCH more complicated (as i commented in the source, there are scenarios that have completely different formulas, for example if def > standardpdd). You want me to post the ripped assembler code here? I think it's beyond the max post size.

EDIT: lol, its 5 times bigger than the max post size.

Does it include the avoidability/miss formula in that? I think it would be useful to at least get a ballpark figure for that, right now the only thing people know is "more avoid = more misses".
Reply
#18
Stereo Wrote:Does it include the avoidability/miss formula in that? I think it would be useful to at least get a ballpark figure for that, right now the only thing people know is "more avoid = more misses".

There's another fact - No matter how much avoid you have, a 100% miss rate is not possible.
Reply
#19
Stereo Wrote:Does it include the avoidability/miss formula in that? I think it would be useful to at least get a ballpark figure for that, right now the only thing people know is "more avoid = more misses".
Yes, it does. I'm almost finished with creating a damage simulator (will probably finish in the next 10 mins and take an hour to test it) and then ill go for the miss formula.
Reply
#20
couldn't you post all of the code by enveloping it in the 'code' code? or maybe set it up as a spoiler?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)