So if stat is HP, X = 0? And What exactly is N?
And I'm not so familiar with math programming, like floor and ceiling stuff. Care to explain what floor is here?
If the stat is HP, X = Level + 10. N is the bonus Nature has on that stat. It's always either 0.9, 1.0, or 1.1.
Floor means that you always round the number in parenthesis down. Floor( 2.999999 ) = 2.
I'm a Natu.
OK, I wasn't sure about floor.
I remember seeing a similar formula when I first started, and I know about the increase stats.
I Believe, If You use "Math.Floor" (w/o Quotations) At The Beginning Of The Entire Equation, It Applies To The Whole Thing.Originally Posted by codemonkey85
Stat = Math.floor((((2 * BS + I + (EV/4)) * Level / 100) + X) * N)
I Find That Alot Easier.
I think math.floor will round the answer if you place it there. You need to round several times during the equation. It seems to me as though they would have already tried that.
greentea is right about that. You need to do the floor on several parts of the equation separately for the whole thing to come out right. ;p
I ran into a problem. The file I'm mainly working with, the hex goes up to 0x87. That code relies on myself having the level of the Pokemon, which is 0x8C. I'm currently programming it to work on the met at level but I'll definitely run into touched stuff.
The level is also calculated on the fly for PC storage Pokémon (Pokémon that are only 136 bytes, or 0x88 in hex). What you need to do is determine the growth rate of the PKM you are looking at, read its EXP, and find that value (or the next one down) in an EXP table.
See here for more info.
So basically I'm going to have to understand those formulas =(. Confusing enough, this is gonna take some time. I'm pretty much lost with the formula.
But aside from understanding it, I check to see which formula the pokemon uses, return the value, and check in a table of exp values.
So then I can take http://www.upokecenter.com/games/rs/guides/exptable.php and code it, likely as a record of arrays from an input txt file. Then check the exp, 0x10-0x13, and convert it to long. Check where it lies on the chart and determine the level. Sites like Serebii have the info for which exp one they use.
Sounds good to me. Point of scaring me with those formulas?
Again, I don't recommend using Long. Use UInt32.
And I didn't show you the page to scare you with the formulas, just to show you the EXP tables and my source.
Well, either way. It's going to take a while, well actually, I've been getting people to do them for me all along so yea =P.
Thanks yet again you guys, after getting all the text files and a few hours of programming (because it took a while just to put all the information in), I've got the stats up =P
Just wanted to tell you that I produced a beta version of this. I plan to add a lot more to it later on, but the things I plan on doing, I am capable of doing them myself, it's mostly simple checks and an output to a file. Thanks for all of your help, without it, I would not have been able to create this program.