PDA

View Full Version : PRNG question



greentea
Nov 30th, 2009, 03:28 PM
I've been looking over the guides and talking with some people. I'm concerned about how they can tell which formula the Pokemon was generated with. From what I know, certain formulae (Wild NDS, Common GBA etc), toss out results from the PRNG. If it tosses out two or three, how do you know? The value isn't stored anywhere, it's just a garbage value. Could someone help explain this to me? I understand the coding behind it, just not how I'm supposed to apply the PRNG to get results. Like how Pokemon X is from formula Z.

codemonkey85
Dec 4th, 2009, 11:05 AM
This is something I had to look into for one of my program ideas. When I get to my source code, I'll look it up again and get back to you on that.

Otherwise, I would advise hopping on the IRC research chat and asking there.

greentea
Dec 4th, 2009, 09:20 PM
Cool. I'm hoping to ultimately achieve something like in Legal.exe, where it determines the algorithm used to generate the Pokemon. Cool thing to do that doesn't seem too difficult if you know all the stuff to do (which someone knows). Just a matter of knowing what to do.

codemonkey85
Dec 5th, 2009, 02:38 AM
Okay, first off there's this: The Process of PID and IV Creation of Non-Bred Pokemon (http://www.smogon.com/forums/showthread.php?p=1440097#post1440097), by X-Act: X-Act explains the different "methods", which are basically all sequential PRNG calls, in which one call at some point is "ignored".

Some IRNG stuff is discussed here: All Generation PRNG Help / Information (http://www.smogon.com/forums/showthread.php?p=1821878#post1821878), by mingot: the IRNG is part of what you need to understand to get the method used to create a Pokémon.

To be honest, if you can get in touch with mingot, he's your best bet at explaining this crazy stuff.

greentea
Dec 5th, 2009, 08:09 AM
Well, I'll take a whirl at it when I get back from work. I'm sure I'll end up contacting him eventually, but lets see how far I get first. Thanks.

greentea
Dec 6th, 2009, 10:55 AM
X-Act always says, given the seed _____, but in my case, I want to determine the original seed, you know, work backwards.

codemonkey85
Dec 7th, 2009, 08:33 AM
That's what the section on the IRNG is for. Truthfully, I tried to write a program to do this, but I was almost completely unsucessful. I definitely suggest giving mingot a holler.

EDIT: D'oh, that's how rusty I am. Forget the IRNG, that's apparently for eggs.