2009-11-14, 12:34 PM (This post was last modified: 2009-11-14, 12:37 PM by Nikkey.)
MissingLink Wrote:The links for the Kortestanov's source and executable are in the first post of this thread, no need to hunt for it.
Dusk's version has str/7 and dex/7, original has str * 0.2857142857142857 and dex * 0.2857142857142857, which is whatever *2/7
Dusk's version has 'if level < 15', original has 'if (level < mobLevel)'
There may be other differences, i didn't look at it that long. Very hard to read dissassembled stuff.
The increase in damage when levelling to a multiple of 5 is only noticeable for low levels taking modest damage from low level monsters.
Isn't capped StandardPDD a good thing? If it went larger past level 100, then the reduction would be smaller, and the damage greater. But its all irrelevant for high level monsters anyway.
It's actually quite simple to shorten the code. Just rationalize the decimal-values, and you get that they all turn into real fractions.
Spoiler
For me, the whole expression was turned into the following in LISP:
Where the value s-pdd is found from an array by calling the function s-pdd (Don't mind that those have both the same name. It's Lisp, and weird like that.)
If you want to shorten it even more, you could always just use J. Compresses everything insanely much.
Devil's Sunrise Wrote:It's actually quite simple to shorten the code. Just rationalize the decimal-values, and you get that they all turn into real fractions.
Spoiler
For me, the whole expression was turned into the following in LISP:
Where the value s-pdd is found from an array by calling the function s-pdd (Don't mind that those have both the same name. It's Lisp, and weird like that.)
If you want to shorten it even more, you could always just use J. Compresses everything insanely much.
I know how to do that, but I'd rather leave them like that because the result of "int * 0.11111111111" is a double fraction, but the result of "int / 9" is a rounded integer and re-casting my integers to double after every calculation is annoying (it might has something to do with me casting everything to int32, but is still related to what I said above).
2147483647 Wrote:I meant the ones you mentioned but didn't post:
"Updated the damage calculator, now there are radio buttons that choose between physical damage and magical damage. In magic damage mode the mob's level and the player's int are disabled because they are not needed for the formula."
These are the formulas for W.Def\M.Def (not avoidability). I didn't post them because they are too complicated, you can look at the source code if you want.
2147483647 Wrote:Anego does 12K touch damage. Anego's slap does 18K damage. Anego's gun-thing does 5.4K damage. :f6:
Because physical "attacks" can have a WATT of their own.
Kortestanov Wrote:Because physical "attacks" can have a WATT of their own.
Ok. This is really interesting. If physical attacks can have a WATT of their own, how come it never shows up in extractations? I never see it on the data Fiel posts, haha01haha posts, nor even on hidden-street. o_o
Is that data somehow stored elsewhere or something?
2009-11-14, 05:59 PM (This post was last modified: 2009-11-14, 06:06 PM by Russt.)
Kortestanov Wrote:I know how to do that, but I'd rather leave them like that because the result of "int * 0.11111111111" is a double fraction, but the result of "int / 9" is a rounded integer and re-casting my integers to double after every calculation is annoying (it might has something to do with me casting everything to int32, but is still related to what I said above).
Can't you do "int / 9.0" or "int / 9.0d" or something like that? I don't know C# but I'm fairly sure it has some sort of facility for double division.
@ above
They're in the Mob.wz data and I have them extracted as of about 20 patches ago. It's just that neither Fiel's nor haha01's scripts output them. I actually don't know why; it's fairly relevant information.
For example, here's an XML fragment of the data for Anego: (note that this is not "PServer format," it is my own thing that I derived from it)
Yes, mostly you just see the default Matt and Watt posted. I believe most of the ranged attacks use the defaults, but you can't tell from the appearance of the attack whether it is magical or physical.
For example, both the Red Kent's stamping and spear throw attacks are classed as magical, even though you would think that they are physical. So I assume you would use the magical formula to estimate damage from those attacks. These attacks do not have a Matt specified, so whatever HS shows for Matt is probably valid.
On the other hand, Jr Newties attacks are classed as physical, even though they look magical. So I assume you would use the physical formula for those. Also both attacks specify a PADamage value different from the default one as shown on HS.
Sorry, I don't know anywhere that shows complete extractions.
Russt Wrote:For example, here's an XML fragment of the data for Anego: (note that this is not "PServer format," it is my own thing that I derived from it)
That's very interesting and helpful. It's my first time ever seeing this kinda data in the code, since I can't extract.
L> rest of them: Zakum, Pap, Pianus, Newties, Skeles, TT mobs, and every other popular mob.
Kortestanov Wrote:I know how to do that, but I'd rather leave them like that because the result of "int * 0.11111111111" is a double fraction, but the result of "int / 9" is a rounded integer and re-casting my integers to double after every calculation is annoying (it might has something to do with me casting everything to int32, but is still related to what I said above).These are the formulas for W.Def\M.Def (not avoidability). I didn't post them because they are too complicated, you can look at the source code if you want.
That's one thing, but the other thing is that it might give another result than multiplying by 0.11111111111 (Obviously depends on the implementation).
For me, "int / 9." is easier and would most likely include such a small error-margin that it wouldn't be noticeable.
2009-11-15, 11:58 AM (This post was last modified: 2009-11-15, 12:12 PM by Kortestanov.)
Devil's Sunrise Wrote:That's one thing, but the other thing is that it might give another result than multiplying by 0.11111111111 (Obviously depends on the implementation).
For me, "int / 9." is easier and would most likely include such a small error-margin that it wouldn't be noticeable.
Okay, I changed that. No reason to re-post the application though, because it doesn't make any difference.
(Done as an exercise more than anything else, really. I think there are probably much better/straightforward/READABLE ways to code this in J rather than recklessly chain together a whole bunch of functions like I did, but I'm not really familiar with it so I brainpineapple'd myself doing it this way. Nevertheless, considering that the number of operations needed to be performed is the same, syntax differences won't change the length too much.)
(Done as an exercise more than anything else, really. I think there are probably much better/straightforward/READABLE ways to code this in J rather than recklessly chain together a whole bunch of functions like I did, but I'm not really familiar with it so I brainpineapple'd myself doing it this way. Nevertheless, considering that the number of operations needed to be performed is the same, syntax differences won't change the length too much.)
i can make a readable function understood by "newbies" once i understand how each formula works.
edit : russt check out the maplestory formula thread, i post a question there
2010-01-10, 02:11 AM (This post was last modified: 2010-01-10, 02:16 AM by Kevvl.)
Hey guys, just a heads up: Aran have a different multiplier than the others. Using the calculator for Warriors killed my friend, he can't take a hit from Zak's Arms unless he has roughly 300 more HP than he should need. =/
Hazzy Wrote:Maybe I did something wrong, but when I compiled the source in the OP, there was no icon. :|
"Error, cannot find ___.ico"
Yea, I didn't include the icon. Just remove it from the project properties.
Kevvl Wrote:Hey guys, just a heads up: Aran have a different multiplier than the others. Using the calculator for Warriors killed my friend, he can't take a hit from Zak's Arms unless he has roughly 300 more HP than he should need. =/
Aran take way more damage.
When I created this program basing on a v60 client, I remember it used modulus and division in order to get the job ID, meaning 100 (warriors) and 2100 (aran) should be the same. It might have changed, though, I'll check it on my aran sometime in the next few months.