# Thread: Help with some new stuff; trash bytes?

1. ## Re: Does anyone have any simple lists for moveset?

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?

2. ## Re: Does anyone have any simple lists for moveset?

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.

3. ## Re: Does anyone have any simple lists for moveset?

OK, I wasn't sure about floor.

I remember seeing a similar formula when I first started, and I know about the increase stats.

4. ## Re: Does anyone have any simple lists for moveset?

Originally Posted by codemonkey85
Stat = floor((floor((2 x BS + I + floor(EV/4)) x Level / 100) + X) x N)
I Believe, If You use "Math.Floor" (w/o Quotations) At The Beginning Of The Entire Equation, It Applies To The Whole Thing.

New Equation:

Stat = Math.floor((((2 * BS + I + (EV/4)) * Level / 100) + X) * N)
I Find That Alot Easier.

5. ## Re: Does anyone have any simple lists for moveset?

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.

6. ## Re: Does anyone have any simple lists for moveset?

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

7. ## Re: Does anyone have any simple lists for moveset?

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.

8. ## Re: Does anyone have any simple lists for moveset?

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.

9. ## Re: Does anyone have any simple lists for moveset?

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.

10. ## Re: Does anyone have any simple lists for moveset?

Originally Posted by codemonkey85
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.
Originally Posted by greentea
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.
That's basically what I said. Incidentally, the games themselves don't use those formulas as far as I know; to save performance time, they simply use lookup tables (just like I've been doing, and just like I suggest you do).

11. ## Re: Wtf at on fly level coding

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?

12. ## Re: Wtf at on fly level coding

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.

13. ## Re: Wtf at on fly level coding

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.

14. ## Re: Wtf at on fly level coding

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

15. ## Re: Wtf at on fly level coding

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.

Page 5 of 6
First 1 2 3 4 5 6 Last