Go Back   Smogon Community > Pokémon > Wi-Fi
Register FAQ Social Groups Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
Old Sep 8th, 2011, 11:20:40 PM   #776
Bond697
Dies, died, will die.
is a Pokémon Researcher
 
Bond697's Avatar
 
Join Date: Jun 2010
Posts: 302
Default

there is 1 main breeding routine in b/w and(in white), it's at 21C390C:

...


anything anyone could ever want to know is in there. it includes international breeding (a for-loop that runs 6 times with 6 rng advancements and 6 shiny pid checks, etc) and all quirks of the system.
Bond697 is offline   Reply With Quote
Old Sep 8th, 2011, 11:56:48 PM   #777
Bond697
Dies, died, will die.
is a Pokémon Researcher
 
Bond697's Avatar
 
Join Date: Jun 2010
Posts: 302
Default

something i've been thinking about for awhile: i'm pretty sure that keypresses don't affect timer0 at all in gen 5, and i just wanted to demonstrate why i think so.

first, let's start with the code:

parameter fetch


ok, now have a look up at the top.

timer0 is grabbed at 2088194. keypress data isn't retrieved until 2088220 and 2088224. when it is retrieved, there is no reading of hardware involved. it simply grabs the values at 4000130 and 2FFFFA8, ORs them, and continues.

i could see making an argument for it being affected if the arm9 processor(that is running this routine) was the same one reading the scankeys() data in and setting those registers. maybe having keys pressed would slow it down then. however, the data retrieved from scankeys() is read/interpreted by the arm7 processor and then set up in the i/o registers for the arm9 cpu to read. it's just grabbing the value and running with it, not doing any interpretation of the data from the hardware.

i know people have said that they seem to be affected by certain keypresses or whatever, but it just doesn't seem like it's possible.
Bond697 is offline   Reply With Quote
Old Sep 10th, 2011, 2:50:25 AM   #778
Bond697
Dies, died, will die.
is a Pokémon Researcher
 
Bond697's Avatar
 
Join Date: Jun 2010
Posts: 302
Default

the chance of a random battle with no modifier in play is 8%. it becomes a 16% chance with illuminate. now, if you get into a battle on one square and step into an adjacent square where you can also get into a battle,(i.e. get into a fight on grass, take a step into a patch of grass) you will have a 1% chance of a fight, regardless of the modifiers involved. they are all ignored. apparently they were trying to be nice and keep step-battle, step-battle, step-battle rpg annoyance out of it.

might as well show what i was seeing:

Code:
021AA438 2401     mov     r4,#0x1                            ;1S              // compare value for battle test(1 here because i just got out of another battle)
021AA43A F000F961 bl      #0x21AA700                         ;1N+3S

(not gonna bother pasting the rng advancement or divmod in here again)
021AA700 B508     push    {r3,r14}                           ;1N+1ND+1SD
021AA702 4804     ldr     r0,=#0xFFFF                        ;1S+1ND+1I  // this event value gives you (u32 >> 16) -1
021AA704 F65AFFF2 bl      #0x20056EC                         ;1N+3S     // u32_t rng.event(u32_t event)
021AA708 2129     mov     r1,#0x29                           ;1S             // set up the divmod
021AA70A 0109     lsl     r1,r1,#0x4                         ;1S               // here too, same calc as ESV
021AA70C F6F1EDDC blx     #0x209C2C8                         ;1N+3S   // unsigned divmod
021AA710 BD08     pop     {r3,r15}                           ;1N+2S+1ND+1SD+1I  // done and heading back

021AA43E 42A0     cmp     r0,r4                              ;1S                result of ((u32 * FFFF) >> 32) / 0x290 compared against the percent chance of an encounter.  8 normally, 0x10 for iluminate, 1 for a post-battle step
021AA440 D801     bhi     #0x21AA446                         ;1N+2S
021AA442 2001     mov     r0,#0x1                            ;1S // return 1 if a battle is set
021AA444 BD10     pop     {r4,r15}                           ;1N+2S+1ND+1SD+1I
021AA446 2000     mov     r0,#0x0                            ;1S
021AA448 BD10     pop     {r4,r15}                           ;1N+2S+1ND+1SD+1I

Last edited by Bond697; Sep 10th, 2011 at 3:40:59 AM.
Bond697 is offline   Reply With Quote
Old Sep 10th, 2011, 3:22:13 AM   #779
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

Emerald Eggs

I used a vblank removed version, so there may be a blank in between the Initial and Decision as I had one in my R/S Egg PID post. For this post, UpperLower is the format of the egg PID.

No Everstone Used
Code:
The lower half is generated just like RS

0 - Initial
1 - Decision (same as RS), if (((SEED) & 0xFFFF) * 0x64) / 0xFFFF < Ratio
2 - LowerPID (same as RS), ((SEED) & 0xFFFF) + 0x1)
Code:
The Upper half is is actually set in Emerald 

using 0x030022E4, a 16bit delay/frame counter/timer whatever.

Game needs an upper half of egg PID?
  -> Grab Value (Initial +1, having it frozen to initial) 
  -> Advanced once with PRNG to get "magic number"
  -> MagicNumber &0xFFFF (get u16)
  -> Set result as Upper16 of the EggPID.
  -> Put magic number next to the PRNG magic number for whatever reason.
Eggs generated with Everstones
Code:
PRNG[0]   -   Initial
PRNG[1]   -   Decision
PRNG[2]   -   Everstone
PRNG[3]   -   LPID#1, (SEED & 0xFFFF), there isn't a +1 here.

Take the timer, +1, advance it once, and get that value.
tRNG[0]   -   Timer Value, +1
tRNG[1]   -   UPID#1

UPID#N_LPID#N = TempPID#N
For our first iteration we have TempPID#1, (N=1)

TempPID#N % 0x19 == nature of female Pokemon holding Everstone. 
     Else, generate a new TempPID (N=N+1)

Repeat TempPID and check until the % 0x19 matches the Everstone Nature.

Simple Formula for calculating TempPIDs
TempPID#N: tRNG[N] and PRNG[2+N]
Code:
Test Case (Example)

Everstone Nature: Impish
PRNG[0] =   0xCFB8227E
  PRNG[1] Pass Decision  -- set up timer
tRNG[0] =    0x0001 +1
  PRNG[2] Pass Everstone -- enable loop until true.

TempPID#1 : tRNG[1]  and PRNG[2+1] -- fail
................... more fails
TempPID#39: tRNG[39] and PRNG[2+39]
    tRNG[39] =  0x362CC473
    PRNG[41] =  0xDFC556E1
        TempPID#39 = 0x362CDFC5, % 0x19 = 8 (Impish), pass
      set TempPID as the FinalPID
EverstoneCalc = leftmost bit
If the calc fails, I assume it just generates the first TempPID and sets it as the final as there is no loop enabled.
Nature Table

Last edited by Kaphotics; May 20th, 2012 at 10:33:01 AM.
Kaphotics is offline   Reply With Quote
Old Sep 10th, 2011, 5:10:04 AM   #780
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

Somewhat separate thought, but the Emerald PID creation was the cause of the Spinda PID craze. Japanese RNGers would have a Spinda breed (70% chance) to find the offset of PRNG frames relative to the Timer, so that they could estimate and predict frames to aim for for shiny egg PIDs. According to a few posts, the difference between the frame and timer value was ~28 (29 and 30 sparsely, caused by vblanks).

Breed Spindas, find two halves of PID, find the seeds you hit and the difference between them! So with that it shouldn't be hard to predict egg PIDs once you calibrate for it.

==

Emerald Egg Calibration
  1. Deposit Spinda and Ditto. Use different IDs if you can. Walk 254 steps by counting with repels.
  2. Save.
  3. Soft reset, enter game (quickly) and walk steps to trigger the 255 stepcounter Egg Decision.
  4. See if an egg has been generated.
    • If there is an egg, go get it and hatch it.
    • If not, soft reset and go back to step 3.
  5. Deduce Spinda PID with Spinda Painter.
  6. Using eepid.exe, enter the Decimal PID from the previous step, using a Min/Max of 400-2000.
  7. Observe results.
    • You can repeat by just going back to step 3.
  8. Exit eepid.exe when you are done.


Test Results (English Emerald):

Code:
Zari:      0xBF1ED064 (497/521)   = 24 (English & Red GBA)
Zari:      0x3CA4525B (503/527)   = 24 (English & Onyx GBA)
Zari:      0x01F71C18 (506/530)   = 24 (English & Onyx GBA)
Supe:      0x0014BA75 (541/561)   = 20 (Emulator)
Supe:      0x88D62D18 (582/602)   = 20 (Emulator)
Supe:      0xBA878D50 (610/630)   = 20 (Emulator)
Supe:      0x3E133CBD (612/632)   = 20 (Emulator)
Nexus:     0xE4AAA5DF (778/797)   = 19 (NDS)
Kaphotics: 0x962101D5 (878/897)   = 19 (Emulator)
Supe:      0x8ACD923E (1088/1108) = 20 (Emulator)
Nexus:     0xD3ADCEAE (1093/1112) = 19 (NDS)
Discrepancies can be caused by Roaming Pokemon still roaming (the game has to determine where they are so it chews a frame at the start, +1), so it's best to calibrate yourself.

Last edited by Kaphotics; Sep 11th, 2011 at 4:50:52 AM.
Kaphotics is offline   Reply With Quote
Old Sep 10th, 2011, 8:25:31 PM   #781
Bond697
Dies, died, will die.
is a Pokémon Researcher
 
Bond697's Avatar
 
Join Date: Jun 2010
Posts: 302
Default

redownload eepid, fixed it up some more.
Bond697 is offline   Reply With Quote
Old Sep 11th, 2011, 3:48:18 AM   #782
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

Emerald Egg PID Prediction

Use EmeraldEggPID.xlsm (spreadsheet)
eepid.exe

Calibrate and put in your Calibration. The spreadsheet is tuned to use the Calibration so that you can actually see your calibrations on the frame you were told! (use the lower "Test" result). ID/SID optional, only if you want to see where you have shinies.

Bam, spits out the Frame, PID, Nature, Ability, GV, PID%6, Hittability, and Shiny depending on the Decision. You can filter everything you'd want in an egg.

The spreadsheet is for the first ~2.7 minutes.



Example with old version & Zari's Calibrations


Everstone prediction is essentially impossible in Excel due to large number rounding, however using an Everstone would be the best way for someone to use existing IDs for a shiny PID.

If you want more than 2.7 minutes of prediction, output more PRNG from researcher and extend the hidden columns to your desired frame count.

Last edited by Kaphotics; Dec 26th, 2011 at 5:38:27 PM.
Kaphotics is offline   Reply With Quote
Old Sep 13th, 2011, 2:04:47 AM   #783
Bond697
Dies, died, will die.
is a Pokémon Researcher
 
Bond697's Avatar
 
Join Date: Jun 2010
Posts: 302
Default

so i spent awhile poring through code, observing, and reading programming manuals and other assorted gba documentation(basically any that i could find) and i think that i've pretty much nailed what causes methods 2/3/4 in gen 3.

http://www.smogon.com/forums/showpos...&postcount=391

http://www.smogon.com/forums/showpos...&postcount=392

if something is wrong or hard to understand, let me know. also if there's something that needs to be added/taken out.

Last edited by Bond697; Sep 14th, 2011 at 8:32:27 AM.
Bond697 is offline   Reply With Quote
Old Sep 13th, 2011, 8:26:52 PM   #784
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

XD PKM Structure

So I was digging through Dolphin's RAM to try to find my Pokemon, and managed to find this structure. I had Cheat Engine attach to Dolphin's process, and just copypasted with the XX byte view. This might be problematic because of endianness.

This may not look like typical Research, but the structure is how the game uses the data. It will help us understand how the game gets the data to begin with.

...


Basing off of these 5 Pokemon in my party, here's the HEX structure of XDPKM. There are missing things like obedience flag etc, which I obviously can't check.

Code:
0x00 - 0x01:   Species
0x02 - 0x03:   Unused
0x04 - 0x05:   Current HP
0x06 - 0x07:   Happiness (2 bytes)
0x08 - 0x09:   ??? (00 or 0B)
0x0A - 0x0B:   Unused
0x0C - 0x0D:   Unused
0x0E - 0x0F:   Level Obtained & Pokeball Type(?)
0x10 - 0x11:   Current Level
0x12 - 0x13:   Unused
0x14 - 0x15:   Intro Data Closer (00 and FF)
0x16 - 0x17:   Unused
0x18 - 0x19:   Unused
0x1A - 0x1B:   ??? (00 and X8) [gender?]
0x1C - 0x1D:   ???
0x1E - 0x1F:   ???
0x20 - 0x21:   Unused
0x22 - 0x23:   ???
0x24 - 0x25:   Secret ID
0x26 - 0x27:   Trainer ID
0x28 - 0x2B:   PID.... Vaporeon is Jolly! (0D)
0x2C - 0x2F:   Unused
0x30 - 0x38:   ????????????
0x39 - 0x4D:   OT Namefield
0x4E - 0x79:   2x Name Field (22 bytes *2)
0x7A - 0x7B:    ???
0x7C - 0x7D:   Ribbons (Bitflags)
0x7E - 0x7F:   ???
0x80 - 0x81:   Move 1
0x82 - 0x83:   Move 1 PP
0x84 - 0x85:   Move 2
0x86 - 0x87:   Move 2 PP
0x88 - 0x89:   Move 3
0x8A - 0x8B:   Move 3 PP
0x8C - 0x8D:   Move 4
0x8E - 0x8F:   Move 4 PP
0x90 - 0x91:   HP Stat
0x92 - 0x93:   Atk Stat
0x94 - 0x95:   Def Stat
0x96 - 0x97:   SpA Stat
0x98 - 0x99:   SpD Stat
0x9A - 0x9B:   SpE Stat
0x9C - 0x9D:   HP EV
0x9E - 0x9F:   Atk EV
0xA0 - 0xA1:   Def EV
0xA2 - 0xA3:   SpA EV   <--not sure on the ordering 
0xA4 - 0xA5:   SpD EV        of these, didnt keep track
0xA6 - 0xA7:   SpE EV
0xA8           HP IV
0xA9           Atk IV
0xAA           Def IV
0xAB           SpA IV   <--not sure on the ordering
0xAC           SpD IV        of these, didnt keep track
0xAD           SpE IV
0xAE - 0xAF:   Unused
0xB0 - 0xB9:   Unused
0xBA - 0xBB:   ???
0xBC - 0xBD:   ???
0xBE - 0xBF:   ???
0xC0 - 0xC1:   Unused
0xC2 - 0xC3:   Party Identify (2 leads 00, Backup 01)
A total of 194 bytes for a Party XDPKM.

Implications: IVs may be generated as single numbers one at a time, not using a chunk of hex like in Gens 3/4.

Hex Table of Move / PKM / Item


Gotta love knowing the PIDs and memory locations

Last edited by Kaphotics; Sep 13th, 2011 at 11:19:11 PM. Reason: cleared up confusion
Kaphotics is offline   Reply With Quote
Old Sep 13th, 2011, 10:32:25 PM   #785
Bond697
Dies, died, will die.
is a Pokémon Researcher
 
Bond697's Avatar
 
Join Date: Jun 2010
Posts: 302
Default

Quote:
Implications: IVs generated as single numbers one at a time, not using bitbands to determine.
considering gen 5 makes the ivs separately and yet still stores them as a single dword, it's more than a stretch to say that implies anything about how the game generates the ivs. (and you're confusing a lua operation(bit.band) with a binary string of numbers)
Bond697 is offline   Reply With Quote
Old Sep 17th, 2011, 10:36:34 PM   #786
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

Pokemon XD (GoD) Memory Locations

They may be different depending on pointers of your current setup.
Code:
0x004E8610	PRNG State

0x00478EB8	Party PID#1
0x00478F7C	Party PID#2
0x00479040	Party PID#3
0x00479104	Party PID#4
0x004791C8	Party PID#5
0x0047928C	Party PID#6

0x004A86F4	OppPID#1 (Battle)
0x004A8774	OppIVs#1 (Battle)
Others are nearby.
Frame chart of the first battle with a Shadow Pokemon (Teddiursa)

Last edited by Kaphotics; Sep 19th, 2011 at 8:36:45 PM.
Kaphotics is offline   Reply With Quote
Old Sep 18th, 2011, 5:02:29 PM   #787
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

Pokemon XD: GoD - Call Structure for PID/IV Generation

Code:
1	Opponent TID
2	Opponent SID
3	1st ???
4	2nd ???
5	IV Block 1 (Def/Atk/HP)
6	IV Block 2 (SpD/SpA/SpE)
7	3rd ???
8	Upper Half of PID
9	Lower Half of PID
See OmegaDonut's post (2 down) for the information. This post was updated after the fact to consolidate information into concise posts.

Last edited by Kaphotics; Sep 19th, 2011 at 8:39:49 PM.
Kaphotics is offline   Reply With Quote
Old Sep 19th, 2011, 3:48:16 PM   #788
ΩDonut
sometimes experimentation begins with "let's multi battle strip pokémon"
is a Forum Moderatoris a Programmeris a Pokémon Researcheris a Contributor to Smogon
 
ΩDonut's Avatar
 
Moderator
Join Date: Aug 2006
Posts: 3,691
Default

This just in: Pokémon caught in XD are never shiny. The game will continue to reroll for a new PID until it is not shiny.

Code:
Test results:

Frame	RNG Value
1	BFB03DDD  <- frames 1 and 2 form a PID that should be shiny (BFB04B1B) 
2	4B1B992C  <- but we know it rerolls to frames 3 and 4
3	3F07833F  <- frames 3 and 4 also form a PID that should also be shiny with our ID\SID (3F07CBA9).  
4	CBA9D106  <- we want to know if it only rerolls once, or if it keeps rerolling until not shiny
5	2BC0C3B1  <- the PID was 2BC0FBF2, so it rerolled until a non-shiny PID occurred on frame 5 and 6.
6	FBF257B0
This debunks the previous belief held by Gold Ursaring and yamipoli that XD Pokémon simply have really low odds of shininess because you'd have to get two shiny PIDs in a row (a 1-in-67108864 chance). However, this is clearly not the case.

EDIT: We also tried manipulating the opposing trainers' ID\SID to make their Pokemon shiny. This also failed; it rerolled for their ID\SID when the PID\TID combination was found to make the Pokemon shiny.

Last edited by ΩDonut; Sep 19th, 2011 at 8:09:14 PM.
ΩDonut is offline   Reply With Quote
Old Sep 19th, 2011, 8:00:52 PM   #789
ΩDonut
sometimes experimentation begins with "let's multi battle strip pokémon"
is a Forum Moderatoris a Programmeris a Pokémon Researcheris a Contributor to Smogon
 
ΩDonut's Avatar
 
Moderator
Join Date: Aug 2006
Posts: 3,691
Default

IV\PID generation in XD is basically like Method 2 (described here), in reverse. Five RNG calls are made. The first two are used for IVs, the third is unused, and the last two form the PID.

A quick recap of IV generation in Method 2, from X-Act's article:

Quote:
The six IVs of the Pokemon are also created from just two RNG calls. Since each IV consists of 5 bits (because the binary number 11111 is equal to 31 in decimal), the first random number would contain 3 of these IVs (5 × 3 = 15), with one redundant bit, while the second random number would contain the other 3.

The IVs would be extracted from the two random numbers as follows:

Code:
First Random Number:  x|xxxxx|xxxxx|xxxxx
                      -|DefIV|AtkIV|HP IV
 
Second Random Number: x|xxxxx|xxxxx|xxxxx
                      -|SpDIV|SpAIV|SpeIV
For example, given the subsequent two random numbers [5233] and [E470] as above, we would have:

First Random Number = [5233] = 0|10100|10001|10011. Hence, the Defense IV would be 10100 = 20, the Attack IV would be 10001 = 17 and the HP IV would be 10011 = 19.

Second Random Number = [E470] = 1|11001|00011|10000. Hence, the Special Defense IV would be 11001 = 25, the Special Attack IV would be 00011 = 3 and the Speed IV would be 10000 = 16.

Thus, our Pokemon would have the IVs 19/17/20/3/25/16, written in the usual format of HP IV/Atk IV/Def IV/SpA IV/SpD IV/Spe IV.
The only difference in XD is that the first two calls form the IVs, and the last two the PID, rather than the other way around.

Code:
Frame	RNG Value
1	171EA3F5	171E in binary: 0|00101|11000|11110 (Defense 5, Attack 24, HP 30)
2	CA36C6E4	CA36 in binary: 1|10010|10001|10110 (SpDef 18, SpAtk 17, Speed 22)
3	8302DA17	ignored
4	C7512C7E	C751 forms the upper half of the PID
5	BF7E9149	BF7E forms the lower half of the PID
There is a possibility that there are Method 1 equivalents (four RNG calls with none skipped), but we haven't seen this yet.
ΩDonut is offline   Reply With Quote
Old Sep 19th, 2011, 10:47:26 PM   #790
Toast++
Now with incrementally more toast!
is a member of the Smogon Site Staffis a Forum Moderatoris a Programmer
 
Toast++'s Avatar
 
Moderator
Join Date: Mar 2009
Posts: 977
Ohio, US
Default

I did some research a while ago and just realized that I never made it available here. This is all PIDRNG and NPC related. If I get the time, I'll translate it into an actual post. For now, here is a link to the document I used to record my findings.

Edit: Any notes about leading 0's has since been proven to be only mostly true. It is rarely possible for other low values to have the same effect.
__________________
RNG Timers!
EonTimer v1.5.1(all versions)|ZomgTimer v2.21(x86)]
v1.6 - oh so much. | v2.21 - efficiency update
Quote:
<Mat> everyone should get toast's opinion on everything beforehand
<Nexus> we've awakened the devil in Toast
Toast++ is offline   Reply With Quote
Old Sep 20th, 2011, 8:30:58 AM   #791
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

Abilities in XD (and Colo?)

Since the game generates the IVs before the PID (compared to the regular NDS/GBA method which does PID first), ability is determined differently.

Code:
PID		IV		Low Bit (IV)
19B6E8AF	140109DE	0 (Natural Cure)	Roselia
D69C5CFF	1C4571D4	0 (Immunity)		Snorlax
A752AF5C	14959F84	0 (Natural Cure)	Chansey
CE78165A	94E2F24D	1 (Illuminate)		Starmie
6AAD7B68	29D51C14	0 (Synchronize)		Ralts
6DAE2D91	09798D98	0 (Lightningrod)	Rhydon
8D73B8EA	85625197	1 (Lightningrod)	Manectric
edit: see next page for the actual determination

Last edited by Kaphotics; Sep 26th, 2011 at 3:30:46 PM.
Kaphotics is offline   Reply With Quote
Old Sep 20th, 2011, 4:59:32 PM   #792
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

Colosseum PKM Structure and offsets

Code:
004088FC	Trainer SID_TID

00408900	Species (half word)
00408904	PID#1
00408914	PKM TID/SID

004089A4	IVs (half word each)

00408A3C	PID#2

408A3C-408904 = 312 bytes of data
XD had 194.

There is some shifting based on how you start up, but it would be nearby if not there.
PID changing for shininess

Last edited by Kaphotics; Sep 20th, 2011 at 8:20:30 PM.
Kaphotics is offline   Reply With Quote
Old Sep 20th, 2011, 6:07:38 PM   #793
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

Colosseum PID/IV Relationship

Code:
Pre-Generation Seed: A6A0DF7D

277	81559C60	8155	IV Block 1	1 00000 01010 10101
278	0ECF49A3	0ECF	IV Block 2	0 00011 10110 01111
279	C0310DDA	C031	????
280	F0CF5D35	F0CF	UpperPID
281	5A199B24	5A19	LowerPID

PID:	F0CF5A19
IVs:	0015	000A	0000	0016	0003	000F
Binary	10101	01010	00000	10110	00011	01111
It's the same as in XD. Yay for a universal method!

It probably has the same Trainer TID/SID Generation.
Kaphotics is offline   Reply With Quote
Old Sep 21st, 2011, 6:16:18 AM   #794
Missingno. Master
 
Missingno. Master's Avatar
 
Join Date: May 2006
Posts: 659
???????
Default

Quote:
Originally Posted by Fat OmegaDonut View Post
This just in: Pokémon caught in XD are never shiny. The game will continue to reroll for a new PID until it is not shiny.

Code:
Test results:

Frame	RNG Value
1	BFB03DDD  <- frames 1 and 2 form a PID that should be shiny (BFB04B1B) 
2	4B1B992C  <- but we know it rerolls to frames 3 and 4
3	3F07833F  <- frames 3 and 4 also form a PID that should also be shiny with our ID\SID (3F07CBA9).  
4	CBA9D106  <- we want to know if it only rerolls once, or if it keeps rerolling until not shiny
5	2BC0C3B1  <- the PID was 2BC0FBF2, so it rerolled until a non-shiny PID occurred on frame 5 and 6.
6	FBF257B0
This debunks the previous belief held by Gold Ursaring and yamipoli that XD Pokémon simply have really low odds of shininess because you'd have to get two shiny PIDs in a row (a 1-in-67108864 chance). However, this is clearly not the case.

EDIT: We also tried manipulating the opposing trainers' ID\SID to make their Pokemon shiny. This also failed; it rerolled for their ID\SID when the PID\TID combination was found to make the Pokemon shiny.
Does this apply to just the Shadow Pokémon, or are the Poké Spot Pokémon also set to not be shiny?
__________________
Disclaimer: The above post may or may not have been made by a sane person.
Missingno. Master is offline   Reply With Quote
Old Sep 21st, 2011, 11:14:44 AM   #795
ΩDonut
sometimes experimentation begins with "let's multi battle strip pokémon"
is a Forum Moderatoris a Programmeris a Pokémon Researcheris a Contributor to Smogon
 
ΩDonut's Avatar
 
Moderator
Join Date: Aug 2006
Posts: 3,691
Default

Quote:
Originally Posted by Fat Missingno. Master View Post
Does this apply to just the Shadow Pokémon, or are the Poké Spot Pokémon also set to not be shiny?
We haven't tested Pokéspots, but frankly, they are not a high priority at all since there is nothing special about them. We'd only research them if we get really, really bored.
ΩDonut is offline   Reply With Quote
Old Sep 21st, 2011, 8:32:58 PM   #796
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

Paralleling XD's antishiny to Colosseum's blunder:

I've taken the time to figure out why Colosseum has shiny shadow Pokemon that lose shininess upon capture, and why it's possible to actually become shiny after capturing. The answer is simple: Opponent TID/SID.

As we've seen in XD, if the PID is shiny with your TID/SID or the (randomly generated) Opponent's TID/SID, it is re-rolled. In Colosseum, the game only uses the Opponent TID/SID with the PID when determining shininess. Consider it like an egg. It may be shiny with Trainer A, but with Trainer B, it may not! Conversely, if it's nonshiny with A, it might be shiny with B. This is why the glitch occurs, and I've updated Bulbapedia's entries according to this.

Quote:
Like all the games in the main series, Pokémon Colosseum has a 1/8192 chance of a Shadow Pokémon being Shiny. When a Shiny Shadow Pokémon is captured, it is highly improbable that the Pokemon will retain shininess. Conversely, when an ordinary Shadow Pokémon is captured, there is still the 1/8192 chance of that Pokémon becoming Shiny when it is sent to the player's party or the Pokémon storage system. Shininess is retained through purification.

This bug is caused by the game not considering your IDs until it is captured. The game instead uses the Opponent's ID to determine if the Shadow Pokémon will be Shiny based on the personality value it generates at the start of the battle. Upon capture, the IDs of the capturing trainer will then be applied and shininess will be determined from the previously generated personality value. However, in Pokémon XD, this glitch was corrected. When the game calculates a personality value, it checks against your IDs and the Opponent IDs. If the game were to generate a Shiny personality value, it would then recalculate the personality value until it would not be Shiny with your IDs and the Opponent's IDs. As a consequence of fixing this glitch from Pokémon Colosseum in Pokémon XD, the game unfortunately ensures that all Shadow Pokémon are never Shiny.
Kaphotics is offline   Reply With Quote
Old Sep 22nd, 2011, 7:07:05 AM   #797
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

XD Togepi:

Code:
0	AC3F2930
...
19	43908A15	4390	0 10000 11100 10000	(0x10 0x1C 0x10)
20	38619484	3861	0 01110 00011 00001	(0x0E 0x03 0x01)
21	0000F137	0
22	13DB671E	13DB	UpperPID
23	41526169	4152	LowerPID

13DB4152
10 1C 10 03 0E 01
Even though it is a gift, same method. It has a shiny check on it as well, it uses 1 after the old PID for ???, and then generates the new Upper->Lower PIDs.
Kaphotics is offline   Reply With Quote
Old Sep 22nd, 2011, 6:55:18 PM   #798
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

yeah, ageto celebi to the GC sav file conforms to the XD/Colosseum method
Same struct.

That Shiny Lax Ageto Celebi that's been trading for a long time? Hacked.

Last edited by Kaphotics; Jan 4th, 2012 at 1:40:21 AM. Reason: tidied up 3 months later
Kaphotics is offline   Reply With Quote
Old Sep 24th, 2011, 10:48:47 PM   #799
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

Uploaded a YouTube Video recording me RNGing the Shadow Togepi from HORDEL in Outskirt Stand in XD.

With audio narration!

Here's the video!



Video Detail / Commentary

Last edited by Kaphotics; Jan 13th, 2012 at 10:28:13 PM.
Kaphotics is offline   Reply With Quote
Old Sep 25th, 2011, 5:31:53 PM   #800
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

Japanese Bonus Disc PRNG
80477098

You have to select the Colosseum portion of the bonus disc (first one), then the seed is set. Then another menu pops up. Passing this menu screen advances it ~1018 times.

It's for sure the PRNG state ;)

finished editing the disc so it will give to english saves.... but I can't get the link going.

==

Abilities in XD/C (99% sure)

Come from the top bit of the second set of IVs.
Code:
iv1   xHHHHHAAAAADDDDD (binary)
iv2   aAAAAADDDDDSSSSS (binary)
???
upid  BEEF
lpid  CAFE
The whole ability changing in XD/C is probably because the game doesn't store the ability (it instead stores PID/IV) and thus re-generates it if you re-encounter (with that blank call?). Just a theory.

Last edited by Kaphotics; Sep 25th, 2011 at 7:26:45 PM.
Kaphotics is offline   Reply With Quote
Reply Smogon Community > Pokémon > Wi-Fi

Tags
NULL

« Previous Thread | Next Thread »
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 12:21:29 AM.