Past Gen RNG Research

mingot

free agent
is a Site Content Manager Alumnusis a Battle Simulator Admin Alumnusis a Top Researcher Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis an Administrator Alumnus
Other stuff --

So I started to get back into this today and noticed there are two extra RNG calls when I load up the game. My guess is that since it is a new day there are a few calls to decide on things like that the swarm is and likely something else.

The first call produces a number between 2 and 100.

The second call produces a number between 0 and 29.

Not a huge deal, since this very likely only happens when the game legitimately rolls over a day (screwing with your date doesn't count), but I thought it was interesting nonetheless.
 
I was trying to get my roaming Latios shiny and it didn't work even when I verified and advanced the seed through the Elm method. Everything I did was right, assuming Latios starts at frame 1, so this leads me to believe he starts at something other than that. The nonshiny Latios died on me to struggle though, so I couldn't see which frame I hit.

Target was frame 22, I started from the fanclub and advanced the RNG by 21 before walking outside to meet Steven. I assume this would've led me to frame 22. So as such I can conclude that roaming Latios doesn't start on method 1 frame 1.
 

Nexus

Forever the Recusant
is a Site Content Manager Alumnusis a Senior Staff Member Alumnusis a Contributor Alumnus
I was trying to get my roaming Latios shiny and it didn't work even when I verified and advanced the seed through the Elm method. Everything I did was right, assuming Latios starts at frame 1, so this leads me to believe he starts at something other than that. The nonshiny Latios died on me to struggle though, so I couldn't see which frame I hit.

Target was frame 22, I started from the fanclub and advanced the RNG by 21 before walking outside to meet Steven. I assume this would've led me to frame 22. So as such I can conclude that roaming Latios doesn't start on method 1 frame 1.
yeah most people found that out a while for some it starts on frame 9 others frame 8 are the more common cases.
 
And update about my little project
# of time I call wade before I generate an egg
(I did each method 3 times)
1x then generate an egg = frame 3, 6, then 9
2x then generate an egg = frame 5, 10, then 15
3x then generate an egg = frame 7, 14, then 21
4x then generate an egg= frame 9, 18, then 27
......
10x then generate an egg = 3+2+2+2+2+2+2+2+2+2 = 21
So first calling wade would advance the IRNG(I guess that what it called) by 3 and then by 2 for each additional call before you generate an egg.
Update Liz Picniker
Anthony Hiker
Joey Youngster
Ralph Fisherman
Calling these people will advance the frames as above. (I dont have anyone registered trainers so I cant confirm more).

Something I learn about this, if you call 1 person then call other, the frame will still advance as if you call 1 person twice: 3 for the first, then 2 for each additional call.

Frame = 3(1st call) + 2*(# each additional call)

To find out how many call you need to do to get a frame

If the frame was 1000

1000-3(for the first call) =997
997/2 = 498.5 calls needed after the 1st call with a reminder of 1.

And for the reminder of 1 just generate an egg before you call or after you call. Edit: Since I cant really go any further Can someone please verify this on a HG cart game or help improve this Thanks

EDIT: 4/20
To sum up what I think about this from today trial:
If you call a trainer that you can rebattle--then when you call them the frame will advance by the above text
If you call anyone else the IRNG wont advance at all.


 
Other stuff --

So I started to get back into this today and noticed there are two extra RNG calls when I load up the game. My guess is that since it is a new day there are a few calls to decide on things like that the swarm is and likely something else.

The first call produces a number between 2 and 100.

The second call produces a number between 0 and 29.

Not a huge deal, since this very likely only happens when the game legitimately rolls over a day (screwing with your date doesn't count), but I thought it was interesting nonetheless.
Dunno how much it helps, but I was RNG abusing for a spread at 23:58:59, meaning as I would advance my frames, a day would rollover. Through several attempts, I deduced that DS date rollover caused an advancement of 4 frames, at least for me.
 
Ease in advancing frames through radio

I noticed an easier way to advance frames utilizing the radio by accidentally switching pokegear functions when advancing 667 frames for Entei at Lance.

It's pretty much the same thing as before, except you don't need to drag the cursor back every time:

Start from the center of the radio app. Tap the lower right or desired radio station. Then tap another app, like the map. Then tap the radio app afterwards. Going back to the radio will restart the broadcast, thus causing you to advance however many frames that broadcast usually advances, like 1 frame if Pokemon search party.

Say I want to advance 2 frames. I'd start w/ the center. Then I'd tap the lower right station when Search party is on. So far, I've advanced one frame. I'd tap the map button, to move away from radio, then tap the radio button. Doing this causes the broadcast to start from the beginning, triggering another frame advancement. So now I've advanced two frames. Make sure you drag the cursor back to the center when finished advancing desired # of frames, especially before commercial breaks come on.

I noticed I spent half an hour advancing 667 frames utilizing the old fashioned way of radio advancement, where you drag the cursor back and forth from the radio broadcast to the center (with 1 frame advanced per detuning). With this method, you minimize risk of triggering another radio station and you don't need precision for fine hand gestures. It's also faster b/c you don't have to keep dragging the cursor back. It's just either tapping or using the D-pad to switch back and forth between pokegear apps.
 

mingot

free agent
is a Site Content Manager Alumnusis a Battle Simulator Admin Alumnusis a Top Researcher Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis an Administrator Alumnus
Whoa! Calling all translators!

source code here: http://github.com/oupo/sid-search
blog about here: http://blog.livedoor.jp/ktxad/archives/1199800.html

We also need folks to help research the two items above!

Levitation said:
Dear Mingot

I'm one foreigner who have used RNG Reporter. thank you for making that program.

lecently, I found the way to finding someone's SID easily in HGSS.

look at this page.

http://oupo.xrea.jp/sid-search/

this tool finds SID by using 3 series lottery number of radiotower.

But storyline must have done somewhat.

first, go radio tower and get first lottery number. and save game.
Next, set DS time to 23:59 and load the game.
and after 1 minute. I mean, 00:00, get next lottery number. and save game. And do it again.

I got 12475, 04972, 20411

then type 3 series lottery number at top box like these

12475, 04972, 20411 or
12475 04972 20411

and type TID at 2rd box.
my TID is 63244

then if click button, SID is calculated.
56532

I confirmed this by hatching shiny egg.

I've found that this tool doesn't work in my korean language Platinum version, but, this works in my korean language SoulSilver. So I think that this also works american version.

But.. it seems that this tool doesn't always calculate SID according to developer of this tool.

can you add this function to next version of RNG Reporter? that makes people more easily find their SID.
And a bit more:



Levitation said:
First, sorry for my bad english skill..

anyway, I also found the way of pokewalker loop in japanese blog.

site link:
http://pokemonemperorenvoy.blog36.fc2.com/blog-entry-1205.html

it's not perfect way to abuse pokewalker IVs but, I think this could help abusing pokewalker.

this site contain ways to get pretty IV pokemon by pokewalker. (selfdestruction trickroom munchlax or surf pikachu.)

I don't know much about japanese, but blog said that delay is not measured in abusing pokewalker. and connection error makes pokemon's PID changed. And if you got bad ability pokemon different to your thought, blog says that change soft and take pokemon one more time by another soft.

I wish this information could help you guys :)
 
I know this is basically not the way we would express al the process there, but I respected the author and tried to translate it the way he wanted it to.

Also I'm at work now and will update this at breaks. This is what I have so far.

About Pokewalker RNG
The Nature and IVs of Pokewalker generated Pokemon, are generated when the Pokemon is transfered from the Pokewalker. The method is treated as Delivery. Therefore, it is not possible to abuse for Shinyness and as there are basically no reports, Pokewalker Pokemon can't be shiny.
However, the hidden content "20XX(year) X Time X Position Pokemon was sent in" has the same HP and Speed and character Values, which brings us to the conclusion that the corresponding specifications quite resemble the emerald loop phenomen.
Therefore, if you don't change the DS clock, and since you can't change the clock in storyplay and have to turn your DS off for that, high IVs (2-6V) seems to be impossible.
<X> Please skip this if you are not interested in PRNG and want to enjoy the game without RNG abuse.
The Initial Seed of the Pokewalker, is unlike the First Seed of Storyplay.
Your current frame is not calculated the usual way, and it is only calculated from 0000 to 0063 in a 2 byte Range.
So the "20XX(year) X Time X Position Pokemon was sent in" is a specification for that.
When the DS clock is not changed 2-6V are far away.

And unlike the usual Initial Seed, the Pokewalker's Seed Adjustment is decided when the the screen turns white (DS Starting Time).
The Initial Seed is set 1-2 Seconds, before the screen turns white after pushing the A Button, so it is set just when the second hand moves.

The IVs of the Pokemon are decided this way: first one advances one, second one advances one, third one advances one, fourth one advances one...

So four IVs are decided by continous sending, two IVs are decided by two random numbers.


Basic information:
- Legal Capture dates seem to be impossible for Flawless Pokewalker abused pokemon
- Is is hard as hell.
 
I'm wondering about this:

"but blog said that delay is not measured in abusing pokewalker. and connection error makes pokemon's PID changed. And if you got bad ability pokemon different to your thought, blog says that change soft and take pokemon one more time by another soft."

The connection error thing, and the soft thing. Is it possible that he is talking about soft-reset? If it is, how would that help you get a different ability poke, considering the poke is not in your pokewalker anymore?
 
I wondering about this:

"but blog said that delay is not measured in abusing pokewalker. and connection error makes pokemon's PID changed. And if you got bad ability pokemon different to your thought, blog says that change soft and take pokemon one more time by another soft."

The connection error thing, and the soft thing. Is it possible that he is talking about soft-reset? If it is, how would that help you get a different ability poke, considering the poke is not in your pokewalker anymore?
I won't bother with it anymore:P
The basic information: You can abuse the pokewalker, it is hard as shit and you won't be able to get capture dates < 2030. So, the question is then: Is it even worth it?^^
 
I believe it is. I don't care if my self-destruct munchlax was captured on the year of 2070, as long as I can use it.

I saw some links on the site that pointed to new pages, with seeds and dates and stuff. I believe that some useful info lies in there, waiting for some great and smart leader (Romsstar, that might be you) to translate it. :P

Also, every kind of HGSS abuse looked hard as hell at first, but after all this research, it looks as easy (if not easier) as DPPt. I guess Pokewalker abuse might be hard, but if there is one person capable of doing it, others can learn and do it as well.

Also, looking at this:
http://pokemonemperorenvoy.blog36.fc2.com/blog-entry-1210.html

I don't see a connection between the year that he listed as used for the seed and the IVs he got, so maybe there is a way to get the pokes with better years. If you search for other posts on his blog not related to Pokewalker abuse, but with regular abuse alone, you'll see that he uses weird years for many other things (like this http://pokemonemperorenvoy.blog36.fc2.com/blog-entry-1193.html and this http://pokemonemperorenvoy.blog36.fc2.com/blog-entry-1219.html ). Maybe he just don't know how to hit big delays, or something like that.

I don't know, since I can't check those seeds as I'm at work, and RNG Reporter doesn't work here (no .NET Framework)
 
Information:

Pokewalker Pokemon seem to correspond to Method "Wondercard IVs" from RNG Reporter.
Starting Frame seems to be 0 and as it seems it is somehow possible to advance the frame, but not by too much as it seems but the Blogger could advance his frame +3 and as it seems it IS possible.
But so far, I can't tell anything more concrete, just came home.

About Seeds and Delays for Pokewalker:


Seed: 510E001D
IVS :29-30-30-0-30-1
Normal Delay: 19 (would be 2010)
Abuser choses 2029
Delay for 2029: 0

Seed :0802001F
IVs: 29-30-30-0-30-1
Normal Delay: 21 (would be 2010)
Delay for 2031: 0

In both cases the abuser made it to be the delay 0.
All Pokewalker abused Pokemon follow this pattern.
In one case he advances then his frame +1 in the other +3.
Currently reading how it is done.

Confusion:


Original text:
2031年9月26日2時19分10秒にゲーム選択、

Translation:
The game is selected at 2:19:10, September 26, 2031.

Original Text:
2031年9月26日2時19分11秒にゲーム起動する。

Translaton:
The game start is done at 2:19:11, September 26, 2031.

How is THAT supposed to work and moreover what the frick that means?

Update:

Apparently there is a Excel Spread http://www1.ttcn.ne.jp/~era404/pokeuxo.csv which contains useful Spreads for the Pokewalker which would work from 2000-2099, so indeed it seems to be pretty possible to abuse for kinda normal years too
 

mingot

free agent
is a Site Content Manager Alumnusis a Battle Simulator Admin Alumnusis a Top Researcher Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis an Administrator Alumnus
More stuff

also http://2style.jp/bowline/ links to most of this guys stuff, and he has a lot of stuff. much of it in javascript. Looked at the pokewalker thing for about 5 mins and noticed it used the mersenne twister (egg or irng), so that was interesting.

If this guys stuff was translated out we'd probably have about everything we ever needed to know for this gen. Looks like tons of shit is covered.

Levitation said:
http://2style.jp/bowline/ds/research/walker/revision.txt

about creation of pokewalker pokemon's PID

I don't know what he says..but could be useful to you.

and I think this site has another good things.

http://2style.jp/bowline/ds/tool/random/walker.html

look at 5th line

事前消費: (×受取 ×帰す ×行く F

if you type number at 受取(received), 帰す(returned), 行く(go), F (I don't know what they exactly mean)

then 事前消費(advanced random number) is calculated.

I think there is more function of this page.
 
ID/SID Lottery Number Search

Theory Part:

While searching for your SID it searches the Higawari Seed and calcs up to 65536.
The lotto numbers are stored in a 2 bytes system.
The formula used for calculating works as follows:

0xEEB9EB65 * seed + 0xFC77A683

The lottery number is returned to the seed of the day.

As the program works with these values I think we can be sure they're fixed numbers and not example seeds.

Because two bytes from the seed can't be found with the lottery number, it calculates until the coherent number comes out.

After that the Seed of the day is rewinded one day back
0x9638806D * seed + 0x69C77F93 //this formula

I just assume because of the change from 23:59 to 00:00 for the three lottery numbers, but I'm not sure.

From what I gather of the program there are basically 4 formulas used:


Formulas:

1.
0xEEB9EB65 * seed + 0xFC77A683 // Lottery number returned to the Seed of the Day
2.
0x9638806D * seed + 0x69C77F93 //Seed of the Day is rewinded one day back
3.
0x41c64e6d * seed + 0x3039 // Seed of the Day parsed to Lottery Seed
4.
0x6c078965* seed + 1 // Parsed Seed is forwarded

There is a theory that the Battle Tower is somehow related to that process but nothing certain.

Basic function seems to be this:

function search_higawari_seed(kujiids) {
for (var i = 0; i < 65536; i ++) {
var kujiseed = (kujiids[0] << 16 | i) >>> 0;
var fseed = kuji_seed_to_higawari_seed(kujiseed);
var seed = fseed;
for (var j = 1; j < kujiids.length; j ++) {
seed = next_higawari_seed(seed);
var id = higawari_seed_to_kuji_seed(seed) >>> 16;
if (kujiids[j] !== id) break;
}
if (j === kujiids.length) return fseed;
}
return null;
}

Kujiseed = Lotteryseed
Higawariseed= Seed of the day

The ID/SID Generation also uses mersenne twister.
I guess you know mingot, but mersenne twister is used only used for Initial Seeds (at least the author says so)
0x6c078965* seed + 1 //the 0x6c078965 seems to be (not sure) the initial seed which was used at the starting sequence when you talk to Oak.

Although three lotto numbers seem to suffice, there is no 100% rate and there are still many uncertainties.

Just a bit information, I'm at work after all.xD

Just a bit information 2:

Typical Output
日替わり乱数のseed: 0xSEED -> Daily Random Number Seed
X回前 ゲーム開始時の初期seed: 0xSeed, 裏ID: XXXXX -> The Initial Seed, XTimes ago:0xSeed, (means since the Initial Game Seed/Oak Sequence End the game was started X Times), SID: XXXXX
 

mingot

free agent
is a Site Content Manager Alumnusis a Battle Simulator Admin Alumnusis a Top Researcher Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis an Administrator Alumnus
This actually makes some sense, I think. From what I gather the lottory seed is saved with your game and always used to create the next lotto number (this should be verifiable, hopefully i can check out later). And since it always uses a saved value you can work backwards. If, at some point the lotto number was based off of the initial seed you should be able to eventually get back to a good initial seed of the first time the person played the game(!!!). If you can do that, you might be able to deduce the SID having the ID.

I need to talk to eep about some of this.

And I need my DS :(

if, in the meantime, someone wants to get 3 or 4 lotto numbers in a row for me, I could start playing with this.

some data for future reference:

<Scar^_^> #1 37048
<Scar^_^> #2 34995
<Scar^_^> #3 24572
<Scar^_^> #4 33192
<Scar^_^> my id is 46681
<Scar^_^> sid is 11508
 
Big news da!

http://2style.jp/bowline/ds/tool/random/tel.html

Apparently the calling Elm Method is not the only one to Verify your Seed.
But here you got other characters you can call that can help you to verify your seed!

Ok first we got Elm 2 answers (Kanto and Evolution would work too proves that)
normal Elm 3 answers and then it goes:

Buena (アオイ-Aoi) has also 3 messages
They go like that:
g:Gamecorner, p:Pokegear, t:Weather


Maiku (マイ)is in fact Irwin on Route 35 who you can defeat pretty early in the game. As a matter of fact: you can defeat him before you release the Roamers and as it seems there are no additional things you have to do to get his three messages which are:
k:Energy, d:Call, g:Health

Guys who wonder why they can't input any seed:
For a stupid reason (and please mingot if you know it tell me how to make it the way we're used to)
the javascript tool accepts only "0x9C77F93" -> This way of input.
So put a "0x" before your seed.
I know this has something to do with Hexstring and stuff.

It would be nice if you could tell me how you'd make that normal (as I'm really curious)

Also, as I gather these two variables var s1=0x41C64E6D, s2=0x6073 are fundamental for PRNG or at least I got this impression.

Could you explain them too mingot?
 

mingot

free agent
is a Site Content Manager Alumnusis a Battle Simulator Admin Alumnusis a Top Researcher Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis an Administrator Alumnus
This is the PRNG:

public UInt32 GetNext32BitNumber()
{
seed = seed * 0x41C64E6D + 0x6073;

return seed;
}

You should play with the rng reporter source -- rngreporter.codeplex.com

I probably need to make some changes to accommodate the new messages, BUT you can actually use these new people now because the patterns are the same. Just map the messages to the elm messages and it will work.

What are the other dropdowns, do you know?
 
Yeah one of them is Youngster Joey(ゴロウ) (Route 30),
Liz(カオリ) (Route 32),
Derek(ミエハル) (Route 39),
Beverly(メグミ) (National Park)
But apparently these are not useable for Seed Verifying as there is no pattern given out for them.
I rather would say they are for Frame Advancement, at least for now I see no different output.
While Joey and Liz advance your Frame +2, Derek and Beverly don't seem to advance it at all, as the prog outputs 0.

Ah yeah I thought that it is something like that.
What language is RNG Reporter written in? With what I could compile it?
Which IDE?

From what I gather Derek and Beverly can advance the RNG too, but only when you call them the first time.
Also you somehow can manipulate the Phone RNG with a Emerald card in the 2nd slot but I can't tell anything concrete yet.
Damn no DS at work:/
I can't wait for the weekend to find out concrete stuff^^
 

mingot

free agent
is a Site Content Manager Alumnusis a Battle Simulator Admin Alumnusis a Top Researcher Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis an Administrator Alumnus
C# / Visual Studio 2010 Express -- But we may be downgrading to 2008 if OmegaDonut can't get 2010 installed.
 

mingot

free agent
is a Site Content Manager Alumnusis a Battle Simulator Admin Alumnusis a Top Researcher Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis an Administrator Alumnus
Some bad news on the lottory to SID program -- I started working on this yesterday and got my program done that could generate lotto numbers backwards and forwards given a string of three or four. (this code works pretty nice, I might make a web application so people can "predict" future lotto numbers one day). Anyhow, I got that far and thought all I had to do was work backwards and get the games first initial seed. Turns out it's not that easy.

First, here is how the lotto stuff actually works --

The first time you start the game there is an initial seed.
This seed is feed to mersenne (irng).
The first result is your first "seed of the day"
The second result is your id/sid

So what this means is that to get the first initial seed (and sid) you have to reverse the irng, which is pretty much impossible to do without a huge lookup table, which is what the jp program uses. it uses this lookup table and tries all of the seeds that could have created the seed of the day as the first result and then tries to match the next result to the user supplied trainer id.

thats not something I can do in a small program :/
 
Idea: How if you let the user input day and year (I'm not sure if time would be possible too) and let the prog run only through this day?
Won't that make the table smaller or at least it won't have to calculate that much?

Idea2: Create a Portable Version of RNG Reporter in Javascript where you can use a huge lookup table:P

Would be anyways nice to have a portable version (like for mobile phones, PSP, DS;))

Btw: I checked some of these RNG Sites the other day and it seems that Lottery to SID is not the only way to attain your SID. Maybe I'll look that up later
 

mingot

free agent
is a Site Content Manager Alumnusis a Battle Simulator Admin Alumnusis a Top Researcher Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis an Administrator Alumnus
Day isnt good enough, and if people already know the time down to the second then pandoras box can find it with no problem. You can also use shiny pokemon or chained shinies so there is already that. If you find any others, let me know.
 
Pokéwalker Info

The Pokéwalker itself does not store the IVs/PID of captured Pokémon. They are generated when the Pokémon is transferred to HG/SS. This means it is abusable through more or less standard methods.

Seeding

The seed is created the usual way, with one major difference: it is created as soon as HG/SS is started, rather than when the Connect to Pokéwalker option is selected. This means the seconds value will be different (I get about 12 seconds less), and the delay is always 0. On the flip side, it makes hitting the correct seed very easy, as you only have to worry about the seconds (not the delay).

IVs

IVs are created the usual way (two LCRNG calls). This means the Wondercard IVs method in RNG Reporter will also work for the Pokéwalker.

However, on the Pokéwalker menu, there is no way to advance the frame manually (no radio, Elm calls etc). Thus, the only way to get a higher-frame spread is to capture and transfer multiple Pokémon from the Pokéwalker without exiting the Pokéwalker menu. Each transferred Pokémon advances the RNG by 2 frames. This means only odd-numbered frames are reachable. If multiple Pokémon are transferred at once, IVs are generated in the order the Pokémon were captured; assuming no frame advances, the first Pokémon captured is on frame 1, the second is on frame 3, and the third is on frame 5. As mentioned earlier, there is no other known way to advance the RNG; this means if you transfer a few Pokémon, the frame will stay the same until another transfer takes place (i.e. it does not reseed upon transfer).

PID (nature, gender, shininess etc)

The PID is created using the IRNG (a Mersenne Twister). In this respect, it is similar to Egg PID creation. However, the actual method is different.

Much like with Wondercards, it forces non-shininess; however, instead of creating a new PID each time until a non-shiny one is found, it incorporates the player's trainer ID into the PID in a way that ensures it cannot be shiny.

The nature is chosen using a call to the IRNG, modulo 24. This means that the Quirky nature cannot be chosen.

The gender is fixed for each type of Pokémon on the Pokéwalker; this is also incorporated when creating the PID.

The ability of the Pokémon is given by the least significant bit of the generated random number (not verified). This suggests that natures are tied to abilities (e.g. it is impossible to get a Brave, Thick Fat Munchlax). I haven't tested this yet (been in Yellow Forest all this time); could anyone verify/disprove this?

Anyway, on to the good bit: the PID generation formula.
Code:
rnd = CallIrng()
nature = rnd % 24 # There are actually 25 natures, so this prevents the Quirky nature being chosen, for some reason.
pid = (((trainerId ^ secretId) >> 8) ^ 0xFF) << 24 # the most significant byte of the PID is chosen so the Pokémon can never be shiny.
nature = nature - (pid % 25) # Adjusts the nature value so that when it is added to the PID, the resulting nature is the same as the original chosen nature. This can underflow to give a negative number.
pid = pid + nature # Creates the PID with the correct nature. If nature is negative, underflows to give a PID in the form 0xXXFFFFYY; otherwise, the PID is in the for 0xXX0000YY.
gr = GenderRate(species) # Gets the gender rate of the Pokémon (0-255; 0 is always male, 254 is always female, and 255 is genderless).
if (gender == male) 
 pid = pid + ((((gr - (pid & 0xFF)) / 25) + 1) * 25) # Ensures gender is set to male without affecting nature.
else if (gender == female)
 pid = pid + (((((pid & 0xFF) - gr) / 25) + 1) * 25) # Ensures gender is set to female without affecting nature.
end if
if ((rnd & 1) != (pid & 1)) # If ability does not match the chosen ability
 pid = pid - 25 # Switches ability without affecting nature
end if
return pid
I'm not 100% sure on the gender/ability generation, as they're not really necessary for abusing Pikachu. However, the nature seems to work.

The IRNG is also used for the swirl animation when connecting to the Pokéwalker. The full animation advances the IRNG 192 times; therefore, the PID of the first Pokémon transferred is generated on frame 193. Each PID generated advances it by 1.

This means it can be manually advanced by connecting to the Pokéwalker. The easiest way to do this is to set up the PID beforehand; with the Pokéwalker empty, hit your seed. Then, choose 'Receive Gift' to start the swirl animation; do this as many times as is necessary to hit your correct nature. For example, doing this twice, catching a Pokémon, and transferring it results in a frame of 577 (1 + 192 * 2 + 192).

The advance is only 192 if the connection is completed; while a communication failure also advances the IRNG, it appears to be inconsistent. The above method is consistent, as long as you don't mess up and accidentally get a communication failure.

Note that if you connect multiple times to reach a frame higher than 5, each connection still increases the IRNG by 192 + the number of Pokémon caught.

Miscellaneous

Withdrawing the Pokémon from the Pokéwalker, then depositing it again, seems to reseed the LCRNG. More research into this is needed (is it depositing, withdrawing, or both? Does it reseed with the same seeding formula? Does the IRNG reseed as well?).

How to control the Pokémon appearing (e.g. Surfing Pikachu rather than Flying Pikachu) is unknown at this time, although it probably has something to do with the above.


I think that's pretty much it so far.
 
The ability of the Pokémon is given by the least significant bit of the generated random number (not verified). This suggests that natures are tied to abilities (e.g. it is impossible to get a Brave, Thick Fat Munchlax). I haven't tested this yet (been in Yellow Forest all this time); could anyone verify/disprove this?

-> Abilities are tied to your ID, but not to your nature. (see VM)

The IRNG is also used for the swirl animation when connecting to the Pokéwalker. The full animation advances the IRNG 192 times; therefore, the PID of the first Pokémon transferred is generated on frame 193. Each PID generated advances it by 1.

-> Just to make sure I got that right. So the first Pokemon that I transfer will have the Nature of Frame 192, the second the Nature of 577.
But as Wondercard IVs don't give out Natures, do you refer then to the method 1 frames? Explanation please.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top