Pokémon: SID Determination in Emerald (Choppy's Method)

My final all purple dream team!

Disclaimer: This is only concerning finding SID on a retail copy on original hardware. If you are using an emulator, or have a way to dump the save file, just load it up into PkHex instead.

I spent a little time during 2020 learning how to manipulate the RNG (random number generation) in Pokémon Platinum, a 4th generation game. The gist of it was that the game seeds it's random number generator using the system date and time, so if one used a good timer and started the game at the correct time, and triggered an event on the correct frame, any desired outcome could be attained. I used this to pick my trainer ID and secret ID (TID/SID) combination, and later to force various encounters to be shiny, eggs to have better IVs, wild pokérus to appear, etc. Recently I picked up a genuine copy of Emerald, which was harder to find and a bit more expensive than I thought it would be.

Wanting to do many of the same things I accomplished in Platinum, I looked around for a way to set my trainer and secret IDs while starting a new file. Unfortunately, the RNG in Emerald in particular (not sapphire or ruby) is "broken", it doesn't take into account the system time / date when seeding the generator, it just always starts with a  seed of 0x00. This makes it impossible to arbitrarily choose your trainer ID/secret ID, so the long-standing method of determining SID on Emerald involved finding a naturally occurring shiny pokemon and working backwards from it's IVs, nature, gender, etc to determine the SID for which it is shiny.

However, a YouTuber by the name of Choppy came up with a method for determining the SID without the onerous full-odds shiny hunting step. The video is here, I'm only writing this up because I haven't actually seen another written guide, and videos do seem to periodically evaporate off of YouTube. I've included screenshots from Choppy's video (as I don't have an emulator set up) and from the tools used on my laptop. I should say first, this only works for fresh files, this method wouldn't work for an existing file. With that said, let's dive in:

Step 1: Obtain the Tools

In order to do this you'll need a couple of Windows programs. I believe there are Mac versions out there somewhere, I'm just not familiar with them. It's likely both of these could be run through Parallels or similar.

You'll need RNG Reporter or Pokefinder (newer, cross platform), both maintained by Admiral-Fish, and a precision timer, the go-to is EonTimer 3.0 by dlymeadows.

Step 2: Start a New File

Get all the way up to the point where you've typed out your name, move the cursor to "OK", and wait there. The time between when that is pressed and when file completion is complete is something we need to control carefully. Open EonTimer and choose a value for Target frame, this corresponds to how long you'll have to mash through the rest of the file creation; I chose 1550 to give me some breathing room, Choppy used 950 which is about as short as one can reasonably go. For the purposes of this write-up, I'll assume you used 1550 like I did. I'd also recommend opening the EonTimer configuration and making sure it's set to "A/V" mode, which will provide six beeps and flashes of color as the timer nears zero.

When you're ready, hit start on EonTimer which will kick off a 5 second pre-timer. As soon as you hear the 6th beep, press A on Emerald. Now continue through the rest of the file creation until you reach the screen where Birch says "Come see me in my POKEMON LAB." and wait for the timer to again reach zero. When it does, hit A. This will finalize the character creation and set your TID/SID.

Step 3: Finding TID in Hexidecimal, Finding Candidate SIDs

Once the moving truck comes to a stop, open your trainer card in the start menu and find your trainer ID number. We need to know this value in hexidecimal (base-16) for this step, so either fire up window's calculator in programmer mode, or drop your trainer ID into a converter like this one.

Start up RNG Reporter and open the Researcher menu. There are only a few things we actually need to change here: in the Max Results box put in the target frame from EonTimer plus 100 (so I put in 1650), in the seed box put your trainer ID converted to hexidecimal, change the first drop-down menu on the right to "16bit High" and put "1" in the box to it's right. With that done click on "generate", right click anywhere in the table below and export the results to a TXT file. 

To explain a bit; the TID is set 50 frames after you pressed A at the final Birch text screen; since I was aiming for 1550 mine was likely created within a couple frames of 1600. So the next step is to open the text file we just exported and trim it down to the entries very close to 1600. I chose to look at 5 frames before and 5 frames after, about 0.2 seconds at the 60 fps the game runs at. The key numbers here are in the 5th column, they should be 4-5 digit long decimal values, those are our candidate SIDs.

Step 3: Which SID did we hit?

This is the most time consuming step. What we need to do is attempt to RNG our starter to be shiny for each potential SID, when we succeed we'll know we've got the correct one. First go through the steps needed to get to starter selection in Emerald; set the clock, meet Brendan, and finally save right in front of Birch's bag.

Pick one of the SID candidates, you probably landed quite close to the center of the range, so starting with frame 1600 is fine. Head to the main screen in RNG reporter and make sure it's set to "Method 1". Drop in your trainer ID for ID, and the candidate for SID. We're looking for a shiny, so go ahead and check the "Shiny Only" box. We can leave seed at 0, since that's the uniquely broken part about Emerald. Hit generate, and it should hopefully show the first shiny frame at a reasonable wait time. If it's excessively long, you can always test other SIDs first, as each will have a different wait time before the first shiny frame.

Take that frame number and drop it into EonTimer's Target Frame box. With the game running normally, standing in front of Birch's bag, hit start on EonTimer. When the pre-timer hits zero, do a soft reset (A+B+start+select). Re-enter the game as quickly as possible and hover your cursor over the "Yes" selection on your starter of choice.

When the timer hits zero, slam A and the battle with zigzagoon will start. Head to the Pokemon menu and view the summary for your starter. Odds are likely it doesn't match the frame from EonTimer, so the goal now is to figure out which frame you did hit.

Go to RNG Reporter and uncheck the "shiny only" box, set the starting frame to your target minus 50, and Max Results to 200. This should show all the starters you might've hit (you may need to expand the range a bit the very first time).  To narrow down which one we did hit, first use the Natures drop down to show only frames for the nature your starter got, and the gender dropdown (all starters are 87.5% male, 12.5% female) to mark which one you got, and finally open the IV checker and drop in the stats from the summary page. You can use the filters on the main screen to further narrow down the results, but with all the stats and gender accounted for there should be only a couple frames that could have generated your exact starer. A second final check is looking at the "50%F gender" on the frame 142 past your starter, as this should correspond to the gender of the Zigzagoon you end up fighting.

With all that you should have determined which frame you really did hit. If there are a handful of possibilities then pick the one closest to your target - it's much more likely you missed by 1/60th of a second than 1/2 second. Go back to EonTimer and drop that frame into the "Frame Hit" box and click Update. This will apply a correction to the timer. Repeat that same process, getting closer to your target frame each time. Generally speaking, once you're quite close, just using the nature of your starter should be enough to narrow it down, as those don't recur too frequently. Once you're landing on frames within +-3 of the target, it generally doesn't help to keep changing the calibration, it's more luck at the point. When you do hit your frame, that is the nature, gender, IVs, and zigzagoon gender all match, you'll either have a shiny, or know the SID candidate you're testing isn't the right one. At that point, delete it from your text document and try the next one.

The process is a little labor intensive, hitting a frame isn't always easy, but the calibration you dialed in testing the first SID should remain valid for the rest of them. Out of the list of 11 I generated, the 2nd one I tested (target frame minus 1) turned out to be correct, so my shiny mudkip appeared. With my SID in-hand I was able to start my play through knowing I'd be able to RNG shininess once I was far enough into the game. I recognize I was pretty lucky. Still, it's worlds easier than hunting a full-odds shiny, and it's significantly more deterministic which makes the effort more palatable.