Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Studying mob damage Post-BB
#1
Here's what I've come up with so far:

This is what happens if a mob damages you

ORDER OF EVENTS:
  • Check if the mob missed the attack. If so, return 0 damage.
  • The mob's attack is fetched
  • If the mob is affected by Threaten, reduce it's WATK value by the percentage given in the skill OR if a mob is influenced by a damage increasing skill, increase the WATK. Precedence is on Threaten.
  • Constrain mob attack between 29,999 and 1.
  • Calculate mob base damage
    • MobMin = mobAttack * 0.85
    • MobMax = mobAttack
    • return (MobMin - MobMax) * MobMin * 0.000000100000010000001 + MobMax;
  • Calculate Player PDD - this NEVER takes into account StandardPDD.img - this img file is never used.
  • Then perform the following calculation on PDD --> pdd = math.round(totalPDD * 0.25, 0)
  • Subtract pdd from mob base damage
  • Multiply the damage according to damage reduction skills (Achilles, Combo Barrier)
  • Factor in Meso Guard
  • Constrain the damage between 999,999 and 1
  • Return damage
Reply
#2
Are skills like Fake applied before the avoid formula?
Reply
#3
Fiel Wrote:Here's what I've come up with so far:

This is what happens if a mob damages you

ORDER OF EVENTS:
  • Check if the mob missed the attack. If so, return 0 damage.
  • The mob's attack is fetched
  • If the mob is affected by Threaten, reduce it's WATK value by the percentage given in the skill OR if a mob is influenced by a damage increasing skill, increase the WATK. Precedence is on Threaten.
  • Bounds checking - If WATK is less than 0, WATK = 0. If WATK is greater than 30000, WATK = 30000
  • Calculate mob base damage
    • MobMin = mobAttack * 0.85
    • MobMax = mobAttack
    • return (MobMin - MobMax) * MobMin * 0.000000100000010000001 + MobMax;
  • Calculate Player BasePDD (see spoiler #1)

The above bolded is dangerously close to being 1/9,999,999

This is about as far as I've gotten in about 1 hour. X_X

 #1 - Calc_Base_PDD
Reply
#4
It is 1/9,999,999 due to limits of float values. Just compiler-optimization.
Reply
#5
Gotta admit though... I'm a complete nerd. The moment I saw that number... before properly counting the zeros: "hey! isn't that 1/9,999,999".

So... question... what the hell's up with such a weird number being used here 0.o
Reply
#6
Why do mobs get 85% mastery? :<

I'm interested to see how defense factors in now. I hope it's not useless anymore.
Reply
#7
shouri Wrote:Gotta admit though... I'm a complete nerd. The moment I saw that number... before properly counting the zeros: "hey! isn't that 1/9,999,999".

So... question... what the hell's up with such a weird number being used here 0.o

Coder types
a = x/9999999

Compiler converts this to
a = x*0.000000100000010000001

Multiplication is a much faster operation than division. Why they do 9999999? Same reason damage cap is 199,999 I guess... they just like 9s.
Reply
#8
Hm... How higher the mobAttack is, the lower the % of that mobAttack is returned at that 'return'. But at 30k mobAttack, it still returns 99,96% of it (coming to 29988)... Is this info of any relevancy? And why did they use this formula if at the max mobAttack is changed with 0,04% at max? D=
Just testing a bit with numbers as I have no idea how that programming code in the spoiler works... =P
Reply
#9
Since standardPDD is still keep in Base.wz,
I assume pdd formula will not change a lot.

At last NX forget to remove the img file = =
Seems that 4 pdd means 1 HP... So easy XD

Round works everywhere... instead of FLOOR.
Reply
#10
Quote: v2 = this;
v3 = _ZtlSecureFuse((this + 36), *(this + 44));
v4 = _ZtlSecureFuse((v2 + 48), *(v2 + 56));
v5 = _ZtlSecureFuse((v2 + 72), *(v2 + 80));
return (_ZtlSecureFuse((v2 + 60), *(v2 + 68)) * 0.4 + (v5 + v4) * 0.5 + v3 * 1.2);
v3 = str
v4 = dex
*(v2 + 68) = int
v5 = luk
Gives 44 56 68 80 or 36 48 60 72 offsets, a reasonable way to lay out str/dex/int/luk.
Which would mean it's returning
0.4 * INT + (DEX + LUK)*0.5 + STR * 1.2
Reply
#11
-- EDITED OUT ---
Reply
#12
Base Magic and Physical Accuracy are calculated differently:

Base Magic Accuracy = INT + LUK * 1.2
Base Magic Avoid = INT + LUK * 2
Base Magic Defense = STR * 0.4 + (DEX + LUK) * 0.5 + INT * 1.2

Base Physical Accuracy = LUK + DEX * 1.2
Base Physical Avoid = DEX + LUK * 2
Base Physical Defense = INT * 0.4 + (LUK + DEX) * 0.5 + STR * 1.2
Reply
#13
Fiel Wrote:-- EDITED OUT ---

Sorry if this is off-topic, but why did you NOT just delete your post?
Reply
#14
I don't have mod powers and I don't want them.
Reply
#15
Fiel Wrote:Base Magic and Physical Accuracy are calculated differently:

Base Magic Accuracy = INT + LUK * 1.2
Base Magic Avoid = INT + LUK * 2
Base Magic Defense = STR * 0.4 + (DEX + LUK) * 0.5 + INT * 1.2

Base Physical Accuracy = LUK + DEX * 1.2
Base Physical Avoid = DEX + LUK * 2
Base Physical Defense = INT * 0.4 + (LUK + DEX) * 0.5 + STR * 1.2

That definitely makes a whole lot more sense! Finally STR factors into physical defense! =_=

Is it base stats only? Or total?
Reply
#16
Total Stats.
Reply
#17
I finished out the formula.

There are some parts of it that I left out because I couldn't figure it out. For example, I think there are further PDD penalties for being below the mob's level or the mob being a boss. This calculation should prove useful for +90% of mobs, though.

A few things to take from the formula:

1. The mob will never do more damage than its attack value states unless it's being buffed by a friend.
2. Threaten works on enemy attack before any mob calculations are taken place.
3. Achilles and Combo Barrier work after the damage is calculated and reduced.

Another fun fact - Threaten will work on bosses, but the code expressly forbids Threaten from working on any mob that begins with "882". This number represents Pink Bean and, should Nexon ever have the cojones to create it, Chaos Pink Bean.
Reply
#18
Fiel Wrote:Base Magic and Physical Accuracy are calculated differently:

Base Magic Accuracy = INT + LUK * 1.2
Base Magic Avoid = INT + LUK * 2
Base Magic Defense = STR * 0.4 + (DEX + LUK) * 0.5 + INT * 1.2

Base Physical Accuracy = LUK + DEX * 1.2
Base Physical Avoid = DEX + LUK * 2
Base Physical Defense = INT * 0.4 + (LUK + DEX) * 0.5 + STR * 1.2

Brawlers don't get a hax physical avoid formula anymore or just not worth the trouble to scrounge through for one class's mechanics? Somewhat disappoint if it is.
Reply
#19
Now if we can find out how much damage is reduced by defense (assuming it too is changed). Paladins already will have uber defensive since max STR (23 DEX, 4 INT/LUK) provides 1214 weapon defense base according to the formulas above. That's a 607 damage reduction if the system is the same. with crazy potential items, it is possible to get over 4000 defense. Paladins get Shield Mastery which, if it works the way I translated, will triple your defense while wearing a shield. Is there something I'm missing? 12,000 defense is crazy since it would require monsters to have 6,002 attack power to cause more than a point of damage. There's probably a lot I'm wrong with, so I could really use some aid with this.

EDIT:
 Spoiler
With those stats pre-BB, he would have 5,397 weapon defense post-BB at level 200.
Reply
#20
Uhhh, that is included with the original post. PDD = WDEF.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)