Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pre-BB] MapleStory Formula Compilation
Stereo Wrote:I'm not sure what Pirates use (same as warriors?)
I lose 10ish% when I die, so I assume we use the warrior formula. Kinda sucks since Corsairs have, arguably, the worst survivability around. Slightly higher HP than Bowman, but much less avoid >.<

Where's my 1.5 avoid per point? Stupid Buccs.
Reply
Added mob damage (including a StandardPDD table), EXP lost on death, and cleaned up the weapon modifiers by turning it into a table.
Reply
Russt Wrote:Added mob damage (including a StandardPDD table), EXP lost on death, and cleaned up the weapon modifiers by turning it into a table.
There are also the chance to be hit by a mob formulas you can add.
Reply
I have insignificant, but interesting information about rounding. As some of you may know, damage range rounding definitely happens before critical is added, as shown here.
 Spoiler
If the game had rounded the random number within my range to an integer after applying crit, then it could have hit odd numbers. However, the damage range was clearly rounded before crit, which results in nothing but even numbers after it was doubled.

See this screenshot of me using Powerstrike at level 8 (200%) and being able to get odd numbers.
 Spoiler
Why does it hit odd numbers? I expected it to round your range to an integer before adding any % mods, thus making any attack that does 200% damage only hit even numbers as well. As you can see, that did not happen.

See also this screenshot of a friend using a regular attack with max berserk. This should be 200% damage, no?
 Spoiler
Still hits odds. My first conclusion was that crit is added after all calculations and rounding is done. However, this cannot be true since crit is added before Berserk is.

 More Info

This is supplemented by some further testing I did. I made a pure dex bandit, got a point in double stab and got SE from a friend. My damage range ended up being 19-22, four numbers (19, 20, 21, 22). If rounding happens before SE, the only possible damage I could do is any of those four numbers +140% -- so I should have only 4 different possible crits on zero defense monsters. After some testing on blue and green snails (both have zero def), I found that I did 5 different crit numbers before SE ran out -- ranging from 47 to 53. I can upload the video if you want to see it for whatever reason.

This leads me to believe that SE is calculated in a different place than any innate critical a class may have. Or perhaps an entirely different formula is used for classes that have innate crit when they get SE.

For any class that doesn't have innate crit, rounding happens after all % mods (including SE). For classes with innate crit without SE, rounding happens before crit, but after the rest of the % mods. For classes with innate crit and SE, rounding happens after crit is applied. This was tested by being able to see odd numbers on Arrow Rain with SE (which is 400% damage).

Major thanks to Lachrymus for help and brainstorming~

By the way Fiel, is it possible for you to extract things like the heal formula from the client? Maybe you could crack this type of thing more easily than we can.
Reply
Formulas can be retrieved by a debugger... that's how Kortestanov got defense. I don't know the details behind it so I can't say what is plausible and what is not.

Is it proven that 200% criticals only hit even numbers? What about something like a 60% skill + 140% critical?
Reply
Russt Wrote:Formulas can be retrieved by a debugger... that's how Kortestanov got defense. I don't know the details behind it so I can't say what is plausible and what is not.

Is it proven that 200% criticals only hit even numbers? What about something like a 60% skill + 140% critical?
I guess I could make another low level char and get use Arrow Blow plus a low level of crit to find out. But my first SS of my Bowmaster hitting only even crits has been true forever.
Reply
That is certainly strange.
Reply
KaidaTan Wrote:I guess I could make another low level char and get use Arrow Blow plus a low level of crit to find out. But my first SS of my Bowmaster hitting only even crits has been true forever.

I believe critical is simply added in a function separated from the actual damage one, unlike other skills which are inputted to the damage function as skill modifiers.

Also, what do you mean the heal formula? how much mobs are damaged by heal?
Reply
Kortestanov Wrote:I believe critical is simply added in a function separated from the actual damage one, unlike other skills which are inputted to the damage function as skill modifiers.

Also, what do you mean the heal formula? how much mobs are damaged by heal?
That can't be entirely true since SE proved itself to not round until after it was added, while innate crit clearly adds after. I think the crits are calculated at different parts in the function, or the addition of SE changes where crit is added entirely.

The only time I even said "heal formula" was asking Fiel if he could get such things. I don't know crap about heal.
Reply
KaidaTan Wrote:That can't be entirely true since SE proved itself to not round until after it was added, while innate crit clearly adds after. I think the crits are calculated at different parts in the function, or the addition of SE changes where crit is added entirely.
Critical and SE were added to the game in different times, so it is possible that they are coded differently (as we know Nexon aren't all that awesome when it comes to writing actual code)
KaidaTan Wrote:The only time I even said "heal formula" was asking Fiel if he could get such things. I don't know crap about heal.
If even I can get such things, I'm sure Fiel can.
Reply
Okay, so after some more testing, I have no idea. I made a newb archer and did two different tests.

1) 195% Arrow Blow + 105% crit. I was able to get odd numbers
2) 120% Double Shot + 180% crit. I was still able to get odd numbers

I must ask then -- why is it that a 100% attack with +100% for crit can only get even numbers, while every other combination you can use to get to 200% does not?
Reply
KaidaTan Wrote:Okay, so after some more testing, I have no idea. I made a newb archer and did two different tests.

1) 195% Arrow Blow + 105% crit. I was able to get odd numbers
2) 120% Double Shot + 180% crit. I was still able to get odd numbers

I must ask then -- why is it that a 100% attack with +100% for crit can only get even numbers, while every other combination you can use to get to 200% does not?

KaidaTan Wrote:Okay, so after some more testing, I have no idea. I made a newb archer and did two different tests.

1) 195% Arrow Blow + 105% crit. I was able to get odd numbers
2) 120% Double Shot + 180% crit. I was still able to get odd numbers

I must ask then -- why is it that a 100% attack with +100% for crit can only get even numbers, while every other combination you can use to get to 200% does not?

[Image: y9wlp8c.png]

ASSUME that the function works like this. l is the skill-damage, k is the crit-damage. For your data, we have

[Image: ykvyt9h.png]

Those weird pipes are the floor function. That is, round down to closest integer.

As you might see, those fractions inside cannot return a multiple of two for all integers. Therefore, f, which is an integer, may return both odd and even integers. But that's not true if the fraction turns out to be 2!

Again, I would like to specifically state that this is true IF and only IF this function works like this.

Noah
Reply
This is assuming that both f(l) and g(l, k) are both ints, right?

That's actually a plausible theory. Integer division automatically floors the result. And if they use integer percentages for skill damage (which I think they do), it would end up using integer division.

And if it was to do something like l*frand(), where frand returns a random floating point value in damage range, the result could turn out to be odd even if l is 2, if frand is 1.5 or something.

Why they would switch from floats to ints arbitrarily like that, though, is beyond me.
Reply
Russt Wrote:This is assuming that both f(l) and g(l, k) are both ints, right?

That's actually a plausible theory. Integer division automatically floors the result. And if they use integer percentages for skill damage (which I think they do), it would end up using integer division.

And if it was to do something like l*frand(), where frand returns a random floating point value in damage range, the result could turn out to be odd even if l is 2, if frand is 1.5 or something.

Why they would switch from floats to ints arbitrarily like that, though, is beyond me.

both f(l) and g(l, k) return integers:

[Image: ybqzuly.png]

By definition, those pipes return the integer closest to positive infinity lower than or equal to the argument.

Noah
Reply
Noah Wrote:both f(l) and g(l, k) return integers:

[Image: ybqzuly.png]

By definition, those pipes return the integer closest to positive infinity lower than or equal to the argument.

Noah
What's the point of dividing by 1 in that float? EDIT: Oh wait, those are L's.

Also, very clever figuring. I praise you for that which boggled me.
Reply
Noah Wrote:[Image: y9wlp8c.png]

ASSUME that the function works like this. l is the skill-damage, k is the crit-damage. For your data, we have

[Image: ykvyt9h.png]

Those weird pipes are the floor function. That is, round down to closest integer.

As you might see, those fractions inside cannot return a multiple of two for all integers. Therefore, f, which is an integer, may return both odd and even integers. But that's not true if the fraction turns out to be 2!

Again, I would like to specifically state that this is true IF and only IF this function works like this.

Noah

Wow, quite a clever to solution to this little conundrum. If I may ask, what hinted towards this? Basically, I'm interested in what tipped you towards this solution (whether correct or incorrect is irrelevant).

Edit:

Also, alex... fail :3
Reply
shouri Wrote:Wow, quite a clever to solution to this little conundrum. If I may ask, what hinted towards this? Basically, I'm interested in what tipped you towards this solution (whether correct or incorrect is irrelevant).

Edit:

Also, alex... fail :3

I'm just used to see formulas and patterns. That's all to it, really.

For this problem specifically, we know that:
Critical-multiplier is either applied with the skill-multiplier, before the skill-multiplier or after the skill-multiplier. The "problem" here, is that the multiplier is additive.

Now, from the posts in this thread, it seems like multiplier is not applied at the same time the skill-multiplier is. That must mean that the crit-multiplier is either added before or after the skill-multiplier. (doh) Now, I think it makes the most sense that it was added afterwards, therefore I tried that out. Then including simple computation-mathematics, e.g. integers are always rounded down (floored) if they are converted into ints, turned out to be something that worked.

As I said in the paragraph above, I'm not entirely sure whether the critical multiplier is applied before or after the skill-multiplier. However, it's not hard to find out: If you have 100% critical hit and 300% damage, or a 1/3 (or 3/1) crit/skill ratio, then the following will occur:
[Image: y9rhxqs.png]
(Top is skill-mult before crit, bottom is crit-mult before skill-mult)

That is, in English:
If you manage to get odd numbers if you have 100% skill% and 300% crit% when critting, then skill-mult is calculated first. If it's impossible to get odd numbers, then crit-mult is calculated first(!)

Again, assuming this is the correct formula.

Noah
Reply
Hm... I imagine it could be something roughly similar to this snippet (which would produce just the results Noah outlined):

Code:
// C++
int getDamage(int min, int max, int skillPercent, int critPercent, bool crit)
{
  int damage = (min + randFloat()*(max-min+1)) * skillPercent / 100;
  if (crit)
  {
    damage = damage * (skillPercent + critPercent)/skillPercent;
  }
  return damage;
}

Assuming randFloat() is a function that produces random floats in the interval [0, 1).

Also, I am fairly sure the skill mult is calculated first, because what if the crit mult is 0? You'd have a divide by 0 error there.
Reply
Well I'm glad we could figure this out. One less mystery about this game to worry about. Now someone finally decode the magic damage and heal formula, will ya? We've only been wondering about this stuff... forever.
Reply
They're basically good. There's almost no way the heal formula can be off, and magic damage fits pretty well too.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)