Thread: RNG Research
View Single Post
Old Jan 31st, 2011, 4:31:43 PM   #623
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 759
Berkeley, CA
Default

@Wichu, from when I did my headbutt RNG the shroomish always appeared with the same encounter slot set.

Last night musicmeister and I tested shaking patches and the encounter slots for them to get a shiny Emonga. Slots are not like fishing, surfing, or wilds. Probably like headbutts :)

==

5th Gen Breeding Compendium

Code:
Frame 0    n-1             Initial Seed [Start]
Frame 1    n               IVs From MTRNG Grabbed 
---        if Nidoran/Illumise/Volbeat, a frame is skipped (taking n+1 and shifting everything else +1)
Frame 2    n+1             Species                  (r[n+1] * 2) >>32 
Frame 3    n+2             Nature                   (r[n+2]*0x19) >>32, nature value
---        if Everstone, becomes Frame 4 (r[n+3] * 2) >>32 0 or 1; and all calls are shifted +1
Frame 4    n+3             DW                       (r[n+3] * 5) >>32 > 1, inherit DW
---        if Ditto parent, becomes Frame 5 [n+4] and all calls are shifted +1.  Not sure what is done here.
Frame 5    n+4        m    IV1-Place                r[m]*6>>64, return 0-5 for what IV (HABCDS)
Frame 6    n+5        m+1  IV1-Parent               r[m+1]>>63, return 0/1 for what parent (A=1, B=0)
Frame 7    n+6+2r     m+2  IV2-Place                r[m+2]*6>>64, return 0-5 for what IV (HABCDS)        ...r=rejected frames for 2nd iteration, each rejection is +1 to r value
Frame 8    n+7+2r     m+3  IV2-Parent               r[m+3]>>64, return 0/1 for what parent (A=1, B=0)
Frame 9    n+8+2r+2s  m+4  IV3-Place                r[m+4]*6>>63, return 0-5 for what IV (HABCDS)        ...s=rejected frames for 3rd iteration, each rejection is +1 to s value
Frame 10   n+9+2r+2s  m+5  IV3-Parent               r[m+5]>>64, return 0/1 for what parent (A=1, B=0)
Frame 11   n+10+2r+2s      PID Generated            r[n+10+2r+2s] *FFFFFFFF >>32 = PID
Frame 12   n+11+2r+2s      International PID Sequence      (if PID = notshiny; PID=seed*FFFFFFFF) 5 times [End]
***                Run 5 times if international, else it is a fake calc that has no influence.
For >>32, assume using upper32
For >>6*, assume using full seed
"Rejected": 0-5 value calculated matches one from a previous iteration. 
Discard and repeat calc until it does not match a previous 0-5, thus advancing 2 frames.
lol normal breeding done, with(out) everstone. Working in PIDRNG

Last edited by Kaphotics; May 6th, 2011 at 9:32:29 PM. Reason: 60% correction to DW inheritance
Kaphotics is offline   Reply With Quote