Forums · Damage Calculator for the Libelldra Forge (beta version)

Please help me find any bugs.

Fantasty

0 +0

Mar 18 '08

With a lot of help from aldaron and Ruesap, I've written a damage calculator (in PHP, for anyone who cares) for Pokemon. It can be found here: http://www.ownpurpose.com/damage_calculator.php
My goal is to make this the most accurate damage calculator for pokemon on the internet, so I'd appreciate it if you'd send me any bugs/errors you may encounter, even if it's an oh so small one, via PM or IRC or, and this is probably the most beneficial way, post in this topic (this prevents people from sending me the same error twice or something like that). Either way will work.

What it does at the moment is it asks you for some data (attacking pokemon's (Sp)Atk, defending pokemon's (Sp)Def, base power of the move, etc...). Just fill in these boxes correctly and you'll be alright. Next there are some dropdown menus with things that can affect the damage calculation, like hold items, abilities, stat boosts, you name it. There's also a separate box for the opponent's HP stat and the opponent's weakness to Stealth Rock. These fields are used to calculate the odds of your attack OHKOing, 2HKOing or 3HKOing the opponent with the given stats.

If you really want to get familiar with it, I'd suggest just playing around with it a little bit.

Now, if you do encounter some bugs or errors and you've decided to notify me, please make sure to include the exact data you filled in. Please don't just say "the calc seems to calculate 2HKO odds improperly". It'd be much easier for me to fix any bugs if I know what input you used, so please, include that in your PM or in your message on IRC.
What I'd also like to ask you is to try the exact same calculation that caused an error with the calculator found in the link above here: http://www.ownpurpose.com/damage_calc.php
Why? Because the first calculator in this topic is a newer version, it's been upgraded from the one I just posted, but as such, it's highly possible that I've made things that worked previously generate errors now. If your calculation seems to be correct when you tried it with the second damage calculator, that will narrow down the amount of possible mistakes in the coding and thus it'll be easier for me to fix said mistakes.

Thanks for now, and have fun with this thing.

PS: there's a stat calculator on the site too, but at the moment, I'm more interested into fixing the damage calculator. If you find some bugs in the stat calculator, do notify me anyway, because I can always just archive those bug reports or do something about it right away if I have some spare time (which I won't have plenty of the coming weeks, sadly :().
Rating: 0

Ominous Doom

0 +0

Mar 18 '08

Seems nice and useful. I still have to try it, though...
Rating: 0

Fantasty

0 +0

Mar 18 '08

Well what are you waiting for then?! :P
Rating: 0

Fantasty

0 +0

Mar 19 '08

Small update: it now also shows the odds of your attack OHKOing, 2HKOing and 3HKOing when both Stealth Rock is out and the opponent is holding Leftovers, as this is a very common situation.

Things I'm planning to add/fix/remove/do in the near future:
- Add a box that specifies whether or not the attacked pokemon is a Rock pokemon during Sandstorm (ie: if it gets a SpDef boost or not)
- More input fields where you can specify each Mod that has a meaning in the damage formula yourself by typing the final multiplier (or each multiplier for itself) instead of having to check boxes all the time.
- Add a box that tells you how many more Atk points you need to guaranteedly OHKO, 2HKO or 3HKO (if you aren't doing so already), under normal circumstances (no hold items or things like that taken into account; maybe I'll do that some day as well, but not now).
- Add a box that tells you how many more Def points you need to guaranteedly survive the attack for X amount of turns under normal circumstances.

It's probably going to take a while to implement all of these things, but better late than never :)

If you have any suggestions yourself, please post them here, PM them to me or message me on IRC. I'd prefer the former, but any method is fine by me. Thanks :)
Rating: 0

Fantasty

0 +0

Mar 30 '08

Ok, three updates made since my last post:
[quote]
- Add a box that specifies whether or not the attacked pokemon is a Rock pokemon during Sandstorm (ie: if it gets a SpDef boost or not)
[/quote]
To add to that quote: there are now also extensive damage results for Sandstorm, taking into account pretty much everything that can be taken into account (for example, it doesn't include the 50% SpDef boost in the OHKO/2HKO/3HKO odds boxes that don't say "Sandstorm", because the boost simply isn't present. You'll also see a separate table specifically for the damage results in Sandstorm, aside from the one that displays the damage results in a "normal" situation (no Sandstorm)).

[quote]
- Add a box that tells you how many more Atk points you need to guaranteedly OHKO, 2HKO or 3HKO (if you aren't doing so already), under normal circumstances (no hold items or things like that taken into account; maybe I'll do that some day as well, but not now).
[/quote]
This has been done as well. The amount of Atk points you still need is based on the amount of Atk EVs you have left (which is now a new input field that you HAVE to fill in if you want this part of the damage calculation to show up). In the table that has all the odds of OHKOing, 2HKOing and 3HKOing, it will show right next to the percentage in a cell the amount of Atk points you need to add on top of your current Atk stat to guaranteedly XHKO the opponent. Note that for the time being, it only works in normal circumstances, but I'm planning to implement it for all the other cells as well (seeing as how it's much easier than I had previously anticipated). Hover over the numbers for detailed information (for example, hovering over them will tell you the exact Atk stat you need, instead of just saying how much more Atk you need. Minor, I know, but handy nonetheless).

Then something else: Pretty much everything now has explanations popping up as you hover over the element. Hovering over the "Level" text above the appropriate input box will give you info on what kind of data should be filled into that input field (even though that's rather self-explanatory, but whatever).

Just play with all these new features a bit :)

I have to say that I am sort of disappointed by the very limited amount of suggestions/testers and whatnot I have here, so please, if you have the time, I'd really appreciate it if you could help me out with this project in one way or another. Again, any suggestions can be posted here (preferably), or sent to me over IRC (use MemoServ if I'm offline).

Hope these things help!
Rating: 0

Fantasty

0 +0

Mar 31 '08

Major update (I guess): The calculator now shows the amount of Atk EVs you still to need to make the attack a guaranteeded XHKO for all circumstances :)

There's only one bug atm that I know of, but that one only occurs at extremely low HP stats (think 16 HP or less), so that shouldn't be too big of an issue for the time being. Of course I'm still looking for a way to fix it though!
Rating: 0

Fantasty

0 +0

Apr 3 '08

More news: the Damage Calculator and Stat Calculator have been separated and have both been sent - along with all the other necessary files - to polite, who will, after the two of us have gone over the entire code a few times to see if there's anything that can still be improved as to save the server processing time, upload it to the actual main site, so no longer will you have to visit another website to gain access to this damage calculator. Just a few more moments (can't say how long exactly this is going to take, but it shouldn't be more than a few days (I DO NOT MAKE ANY PROMISES THOUGH)) and this site will have one of the most advanced damage calculators on the internet available to all its users :)

Updates will still follow though - even after the current file has been double-checked for unnecessary code and whatnot - only less frequent than now. The calculator as a whole is pretty much finished now, but you can expect some more, nice, new features as time goes by. You'll just have to wait and see :P

In the meantime, I'm STILL very much open to suggestions and of course, comments are greatly appreciated as well :) Just look at one of my 5 other posts in this topic for info on where to contact me.
Rating: 0

gameboy

0 +0

Apr 3 '08

Oh god thank you fant. Finally a good calculator ( i never liked metalkids, idk why >_>) i think you should have a seperate section where you can get the base stats of each poke. it could be helpful for lazy people, or ppl that don't go on irc.
Rating: 0

Fantasty

0 +0

Apr 3 '08

That's a good idea actually. I'll see what I can do with it.
Rating: 0

Fantasty

0 +0

Apr 3 '08

Okay, that section has been added. There is a dropdown menu now from which you can select any pokemon, and it'll instantly give you that pokemon's Base Stats. It's written in Javascript for ease of access: the page doesn't refresh each time you look up some pokemon's Base Stats. It just updates whenever you select a new pokemon.

Hope this helps!
Rating: 0

Ominous Doom

0 +0

Apr 3 '08

nvm...
Rating: 0

Ruesap

0 +0

Apr 4 '08

Shouldn't that base stats tool be in the stat calculator?
Rating: 0

Fantasty

0 +0

Apr 4 '08

Well since they're being separated now, it's probably a good idea to have a copy of it in the damage calculator as well, seeing as you're going to frequently need base stats for a quick reference when doing damage calculations as well (at least, I do). That's basically why I chose to add it as a feature.
Rating: 0

Ruesap

0 +0

Apr 4 '08

It's going to be solely in the stat calc in the future, right?
Rating: 0

Fantasty

0 +0

Apr 4 '08

Uhm, I'm not sure. I think it's a pretty handy tool to have immediately at your disposal, without having to open another page to find this data. I might have to think of a way to re-orden the calc because at the moment this dropdown menu looks a bit out of place, but I am planning on keeping it in there.
Rating: 0

MillionDaggers

0 +0

Apr 4 '08

It looks a lot better than metalkid's and it's much more streamlined (at least from a computer illiterate person like myself it does <_<).

Two questions:

Would it eventually have the names of the attacks, as opposed to you looking up the Base Powers?

And two, would it work offline?

P.S. Apologies if the questions are obvious and/or stupid.

P.P.S. Great job Fant =D
Rating: 0

Fantasty

0 +0

Apr 4 '08

To answer your questions:

1) Yes, I plan to add a section where you can select everything you need for the damage calculation to be accurate so you don't have to look everything up (select a pokemon, select an attack, things like that). I just prefer the current way, because just entering numbers is way faster than selecting all these things from a dropdown menu etc, but I can certainly understand why people would prefer dropdown menus.

2) Not sure yet. polite and I are planning to eventually rewrite this in Javascript, but if it'll work offline in its entirety, I can't say yet.
Rating: 0

Masterofidiots

0 +0

Apr 5 '08

If you were too add dropdown lists before the switch to javascript, make it so the PHP retains the value of the drop down menu after every calculation
Rating: 0

Fantasty

0 +0

Apr 5 '08

I was planning on doing that. I've done it with every other dropdown menu so far so I don't see why I would make these dropdown menus any different.
Rating: 0