Published on April 10th, 2013 | by Tapin


PPRNGing Fourth Gen Pokemon

There’s a distinct lack of documentation surrounding the PPRNG fourth generation functionality; there’s a lot in there, but it requires a distinct knowledge set just to crack it open.  I’m going to try to lessen that documentation gap.

I don’t claim any special knowledge of the domain, and will gladly take corrections; this is mostly just my working notes while I spent a weekend figuring out Gen 4 RNG, after having been pretty comfortable with Gen 5.  As an aside: If you can, and you haven’t yet, I would recommend learning the basics of RNGing with a copy of Pokemon Black or Pokemon White, preferably while using a DS Phat or Lite.  That’s effectively “easy mode”.  I’ll frequently be referring to differences between Gen 5 (Black, White, etc) and Gen 4 (Diamond/Pearl/Platinum, HeartGold/SoulSilver), so it will be useful to understand Gen 5 RNGing before trying to follow this.



The first thing that you’ll find is that you’re going to want a timer.  In theory it’s possible to do all of this without a timer, but to save yourself the hassle you’ll want to go download ZomgTimer right now.

In Gen 5, there’s a lot of work done calibrating your DS and cart, but each individual cycle is just a matter of starting the game on the right second and praying that you hit the right timer0.  In contrast, Gen 4 has very little calibration work necessary, but you need to both a ) launch the game at the right time (with a window of less than one second) and b ) spend exactly the right amount of time between game-launch and loading your save file.  This is where ZomgTimer comes in: it will take care of running both timers back-to-back.

The gentleman who wrote ZomgTimer has since moved on to EonTimer, which has a number of bells and whistles (and a pretty UI) that ZomgTimer lacks.  However, ZomgTimer has one key feature for Mac users that EonTimer doesn’t: It’s a Java program, and will therefore run on our Macs.  Zomg 1, Eon 0.

Before you do anything else, let’s get a feel for how Zomg works.  Launch the app (double-click the jar file).  The first thing we’re going to do is a trial run.  Switch to the Gen 4 timer (Mode > Gen 4), and you’ll see a window like the following, which is my actual ZomgTimer after a few successful stationary-Pokemon projects in Diamond:

Let’s dissect this a bit:

  • “Calibrated Delay” is related to the amount of time between game launch and savefile load.  A good place to start this is around 600.
  • “Target Delay” is a value that you’ll fill in from PPRNG.  For now, set it to 800 — at this point, the value is literally meaningless, except that you’ll frequently be filling in a value between 600 and 1000.  We’re just figuring out Zomg right now
  • “Calibrated Sec”, along with “Calibrated Delay”, is attempting to account for the game-load time.  Set it to 14 and forget about it.
  • “Target Second” is pretty much completely your own choice.  There’s some more discussion of it below (in the discussion of the PPRNG Adjacent Time tab), but for now just set it to 35.
  • “Minutes Before Target” will likely be 0.  For some of the more obscure seed targets, your delays will get longer and longer — and this value may become non-zero.  If it does, you’ll have to set your DS time with this value in mind: If PPRNG tells you that you’re trying to hit 17:32:35, and after filling in your Target Delay the Minutes Before Target is a 2, then you’ll want to set your DS clock to 17:30.  Easy.
  • “Beeps” is how many times Zomg will beep before the final beep — that is, Zomg will beep this many times plus one.  I typically decrease this to 4 (Tweak > Sounds > Decrease Number) because five total beeps is easy for my musician’s brain to track (count off and go).
  • “Frequency” is how often the beeps will occur.  I’ve never had a reason to modify this value, but if you want to, it’s in the Tweak menu.
  • The empty input box is where you’ll put your actual delays once you start calibrating Zomg based on your first target.  The “Update” button is the submit button for the empty input box.  We’ll come back to this.
  • “Second Length”, at the top of the lower section here, should be interpreted as “Length of Timer #2” — NOT some obscure modification of the length of 1/60th of a minute.  Both it and the big-number timer here (in the picture above, the 17:68) are entirely based off of the four input boxes above, and as you’ll notice they add up to roughly the “Target Seconds”.

If you hit start with values similar to those in the screen shot above, you’ll see that the big number counts down to zero with beeps starting at 2.5 seconds; and then immediately another timer starts and runs about seventeen more seconds, beeping as it approaches zero.  Here’s how you’re going to actually use ZomgTimer:

  1. PPRNG will give you a target time (and date) and delay (we’ll get to that).
  2. Plug in the target delay and the target time’s seconds into Zomg.
  3. On your DS, set the date to the date PPRNG wants
  4. Still on your DS, set the hours and minutes to the target time PPRNG gave you.
  5. SIMULTANEOUSLY hit “A” on your DS and “Start” on Zomg.  Zomg will now be running
  6. Quickly back out of the DS settings window (and turn back on the console if you’re using a DS Phat/Lite) and get ready to launch your game
  7. At the same time the last beep sounds for the first timer, launch your game (press “A”)
  8. Quickly navigate the copyright screen and the title screen to get to the savefile screen, as Zomg’s second timer is running
  9. At the same time the last beep sounds for the second timer, load your savefile (press “A”)
  10. Now you need to verify that you hit your seed, or (optionally) adjust your calibration and try again.  But for that, we’re going to need to talk about PPRNG for a while.



PPRNG is an amazing tool, and I really enjoy using it for Gen 5 RNGing.  Unfortunately, the Gen 4 RNG features assume you already know what you’re doing, and so — quite frankly — it’s actually easier to learn the basics of Gen 4 RNGing by using other tools.  However, once you’ve got it sussed, PPRNG gives you pretty much everything you need; it’s my goal to get you to that point without having to go run RNG Reporter on an Amazon EC2 instance of Windows Server 2008 for four hours like I did.

Once again, I’m going to assume you’ve used PPRNG for Gen 5 RNGing already.  If you haven’t, you’ll likely want to read someone else’s guide, sorry.

The first thing you’ll want to do is to go to Generation 4 Game Config.  Create a new configuration, and tell it what game you’re using.  That’s it, you’re configured.  Well, you can fill in your trainer ID (TID) and secret ID (SID) for Shiny-searches if you want — I suggest using PokeCheck, but if you’ve been doing Gen 5 RNGing then you probably already know how to do this — but unless you’ve RNG’d your TID/SID already then you’re going to have a hard time finding Shiny spreads anyway, and if you did RNG your TID/SID, then you’re probably not reading this.

The reason there’s so little configuration here compared to Gen 5 is because there are a lot less seeds (and therefore a lot less spreads) actually available in Gen 4.  Each valid seed comes up fairly regularly, but you might find it easier to adjust your mindset: In Gen 5, saying “I want a Brave Physical Trick Room Flawless” is just a matter of letting PPRNG run for a while; in Gen 4, most of your searches will finish near-instantaneously, and many of them will have zero results.

Open up the Generation 4 Seed Searcher, let’s play around a bit.

For starters, let’s look for a decent stationary Pokemon.  Dialga is just about the first stationary you can encounter in Diamond, so let’s work on it.  How about a Quiet Special Flawless spread?  Set the IV Pattern and Nature, and hit “Search”

D’oh.  No results, but at least we got the bad news pretty quickly.  But we can look a bit deeper — the Search Ranges can be adjusted to help us out.  “Frame” is the PID Frame, and while Chatot chatters will advance the frame by 1 just like in Gen 5, you can also go twice as fast with the Journal in Diamond and Pearl: Viewing a Journal page that mentions catching a Pokemon will advance it by 2 each time.  So let’s bump that number up a little — to, say, 1000.  Also, the Delay we’re working with is related to the Target Delay in ZomgTimer — and if we’re willing to wait a bit, we can up that as well. I’ve had bad luck with delays under 650, so I’m going to set the delay to “650 ~ 99999”.

(As an aside, many times I’ll try for something that I know has very few results, but based on the breadth of my search PPRNG will refuse to run the query.  I wish there were some way to override the Professor Oak Warning so I can do, eg, Shiny searches over a custom IV pattern with a huge Frame and Delay window)

In any case: After making the changes to our search ranges, we have some results:

Success!  But… those delays are gigantic  Since “delay” is related to how long we’ll be waiting for Zomg to beep, we’d prefer to have smaller ones if possible.  It turns out that PPRNG seems to pick the largest possible delay for a given seed (in the provided window), so frequently after you’ve found one seed you can shrink your delay window and find a more reasonable alternative.

In this case, shrinking the delay to, say, 5000 will give us much more reasonable alternatives — and more options, to boot.  I’ll be honest: I’m not sure why more show up at 5000 than 99999.  Shrinking it further to 1000 gives us the following:

Now we’re talking.  We need to pick one of these to attempt.  What’s the difference?  Well, the obvious difference to a Gen 5 RNGer is that one has a Frame of 237 and the other 563.  But… what are these other columns?  J?  J (Sync)?  J (Sync Fail)?

The short version is: “Method J” is what we’re going to want for most stationary Pokemon, including Dialga.

The longer version: “Method 1” is the standard way of computing seeds for Gen 4 carts; there are a number of slight modifications (don’t ask me for details, I don’t know them) that give rise to a number of other algorithms under certain circumstances.  Stationary Pokemon is one such modified algorithm, and someone chose to give that algorithm the name “Method J”.  I’m not sure who or why, but the tenacious decompiling wizards who figured this all out have nothing but my utmost respect.

I haven’t tried it myself, but I’m assuming that “J (Sync)” is for when using a Synchronizer as your party lead, and “J (Sync Fail)” is for when you’re using a Synchronizer but don’t want the Synchronizer’s nature (which seems kinda odd to me, but it does open up alternate frames on occasion).

In this case, however, since we want a Method J Pokemon, Dialga, we can’t use the first seed (it lists “None” under the J column) and therefore we’re going to go after seed 540E02CF, the second row.  Double-click on it to open the Seed Inspector and continue.


Hooray, there’s our Pokemon — but wait.  Frame Type, at the top of the tab, is set to “Method 1”, which we just got done talking about.  Change it to “Stationary Encounter” and click “Generate”.  You’ll then have to scroll down to the frame we saw in the Seed Searcher window to find the spread we’re looking for:


Okay, so we see what we’re looking for.  Quiet 31/11/31/31/31/31.  Now we need to start trying to hit our seed.  Switch over to the “Time / Adjacents” window:


I like to set the year to 2011, but you’re welcome to pick any year.  Some of the more detailed guides for Gen 4 RNGing have a discussion of how the year you pick impacts the delay you’re trying to hit, so it’s worth checking them out at some point.  I’ve also made a habit of changing the “Second” to 35 — if you hit “Calculate Times”, you’ll see that this is how PPRNG (and every other Gen 4 RNGer I’ve seen) filters down the many, many possible times for the seed.

After making those changes and hitting “Calculate Times”, you’ll see that the first listbox has been filled out:


You’ll notice that there are actually two “Delays” listed on this window: One next to the Seed, labelled “Base Delay”, and another next to the Year, called “Actual Delay”.  For Zomg, we want the “Actual Delay” (slotted as Target Delay).  So fill out the Target Delay and Target Seconds in Zomg:


Assuming your game is saved one step shy of the encounter with Dialga — or any other stationary Pokemon — we can now follow the steps at the end of the ZomgTimer section above, starting with setting the DS date and time (2011/01/01 at 14:48, per PPRNG’s listbox).

Once you get into the game, there’s a handy way in Diamond and Pearl to check exactly what seed you actually hit, without advancing your frame: The Coin Flip app in the Poketch.  The bottom of the “Time / Adjustments” tab in PPRNG will give us a list of all the seeds surrounding our target delay and the coin flips that will result from that seed.   Let’s see what it can do.

Since we’re using ZomgTimer, we can be pretty sure we hit the right second; so set the “Second +/-” to zero.  However, since we haven’t yet really calibrated Zomg at all, we could be anywhere (within reason) within the right second — so set the “Delay +/-” to something largeish, like 100.  The “Match Parity” checkbox will limit your results to all-even or all-odd delays, which is potentially useful once you know which delay your game is hitting — if you get even delays, you’ll pretty much always get even delays, and vice versa — but since we’re not sure where we are yet we’ll uncheck it.  Then hit “Generate”:


This should seem vaguely familiar to anyone who has calibrated a Black 2 or White 2 cartridge: Now we flip the coin ten times, with Magikarps counting as Heads and Pokeballs counting as Tails.  Ideally, we’d like to get the sequence at the top of the window, under the Seed: H, T, H, H, T, T, H, T, H, H.  But more likely, the sequence will end up like (eg) T, T, H, T, H, T, H, T, T, H — which, when plugged in, reports a delay of 721:


The good news is: our delay is reasonable close.  Go ahead and plug 721 into that empty box in Zomg and click “Update” there; it will change the calibrated delay slightly before our next run.

The bad news is: we hit an odd delay, and we’re trying to hit an even one.  The only way I’ve found to change a “parity mismatch” like this is to insert a GBA cartridge into the dual-slot of your DS before you launch the game next time.  One of the most useful and complete guides I read about Gen 4 RNGing suggested that you could add or subtract one to the target year (switching to 2010 or 2012, in this case), but what I’ve found is that while it did change my Actual Delay, it also seemed to change the delays that my DS was hitting — so while Actual Delay became odd, my DS started hitting even delays.  As always, your mileage may vary.

From here, it’s pretty much like Gen 5.  Reset the DS, reset the time, run Zomg and try to hit your seed again.  Re-calibrate as necessary, but keep in mind that once you get fairly close (your delays are off by no more than 4), changing your calibration won’t actually be much help.

Once you’ve successfully hit your seed, the only thing left to do is frame advancement.  As I mentioned before, Chatot chatters work, as does flipping the Journal to a page that mentions catching a Pokemon (nb: most guides mention that you need to have a message of “Caught a POKEMON (TIME)”, eg “Caught a STUNKY (DAY)”, but I found that any mention at all — eg, “Caught a MACHOP” — caused the frame to advance).  In this case, we’re starting on Frame 1, and we are trying to hit Frame 408 — so we need to advance 407 frames, which is one Chatot chatter and 203 Journal flips.

After that, it’s all just a matter of catching the Pokemon and using your favorite IV calculator to verify that you hit your seed and frame.

Good luck, Trainer!

About the Author

Tapin played the hell out of Blue and then Yellow on his yellow Game Boy Color when they first came out, and then didn't think much about Pokémon at all until his nine-year-old daughter came home from school one day asking questions about Scraggy and Ponyta. He's currently the eighth-best Pokédad in his TCG league.

Back to Top ↑