RNG Manipulation Setup-Finding Guide

By MyLittleWalrusMyLittleWalrus. Last updated




Random Number Generation (RNG) in New Super Mario Bros. (NSMB) is somewhat complicated, but it can be manipulated by speedrunners. Finding an RNG manipulation setup is a lot of work, but the manipulation is easy to execute once you have your setup and is worth implementing if you’re going for a top time.

In this guide I will give you only the information you need to know in order to make your own RNG manipulation setup. I highly recommend reading this entire guide in order to understand every part of how RNG manipulation works. If you would like to learn more, check out 3zachm’s research document: https:/​/​goo.​gl/​y7WgiM

Why do we need to manipulate RNG?
In the World 1 overworld of NSMB, there are two flying red blocks (RBs) that move from level to level randomly and produce randomly one of a set of items when hit. In the Any% route, a Blue Shell powerup (shell) is necessary to complete the secret exit in 1-Tower. The shell can be obtained in two ways: from the Red Toad House after you take the 1-2 secret exit, and in 1-2 from the RB. Getting the shell from the RB is approximately 15 seconds faster than using the toad house, but it has only around a 1 in 6 chance of occurring normally. Luckily, we can use RNG manipulation to get the shell in 1-2 nearly every time.

Why do we need to find our own setups?
One person’s setup won’t work on another person’s console. The reason for this is not yet known.

Can RNG manipulation be done on Wii U Virtual Console (VC)?
Yes. There is a different method that works on VC: https:/​/​www.​speedrun.​com/​nsmbds/​thread/​xq25x


How it Works

The RNG value in NSMB changes only when certain sound effects are played. For the purposes of this guide, the only sound effect that changes the RNG is double jumping. The RNG value changes consistently during the opening cutscene, and as long as you do the same number of double jumps in 1-1 it will change consistently up to 1-2. So if the RNG value starts the same as you boot up the game, and if you do the same number of double jumps in 1-1, then you will see the same outcome with the RB.

The value of RNG at the time of the game first starting is called the “seed”. The seed is determined by the exact system date and time at the time the game is booted up.

There are four independent variables: date setting, time setting, time waited before starting NSMB (wait time), and number of 1-1 double jumps. You should change only one independent variable at a time. There is an order I’ve found is easiest to change the variables in, but first I will explain some important concepts.


Important Concepts

Toad Patterns
During the opening cutscene, there are five tiny Toads running around in the background in front of the castle. Their movements are based on RNG, so each starting seed has one and only one set of movements/positions of the five Toads. Therefore, you can determine which seed you got based on their movements/positions.

You will hopefully find through your testing that there is one Toad pattern that happens most often. I call that the “primary” pattern. You can’t change your seed during a run, but you can change one other independent variable: number of double jumps. If you document the several most common patterns and experiment with different numbers of double jumps, chances are that you will find numbers of double jumps for non-primary patterns that result in 1-2 shell. This decreases the number of times you have to reset because you started NSMB too early or late. I will give more tips for finding/documenting your setup’s backups later.

Documenting Toad Patterns
When documenting a Toad pattern, I like to describe it by the positions of the five Toads at the end of the opening cutscene. You should keep a document where you have either a text description or a picture of the final positions, along with which numbers of double jumps and what they resulted in. For example, I might describe the final position of a pattern as having two Toads grouped together on the left and three Toads grouped together on the right, or one toad in the bottom left and the rest forming a horizontal line at the top, etc. Then for each pattern I might write “5 double jumps for shell”, or “4 and 5 double jumps do not work; try 3 and 6”, etc.

Fair warning: this next paragraph may contain some speculation and incorrect information. We haven’t figured out everything about RNG manipulation, so I will base this section off of some experiments I have done.

I have found through some rough testing that the window for starting NSMB after pressing A to confirm the time setting is around 1/5-1/6 of a second. You want to find a wait time that is in the middle of a window. For example, imagine each window is exactly 0.20s long, and you decide to select NSMB on the home screen exactly 10 seconds after confirming your time setting. The window might be from 9.9s to 10.1s, and you are starting NSMB right in the middle, such that you get one primary pattern most of the time. Or there could be windows from 9.8s-10.0s and 10.0s-10.2s, and you are right in between two windows, such that you get two primary patterns equally as often. Or anywhere in between. To clarify: it’s unclear exactly how long each window is, or even if the windows work like this.

Assuming my theory of how windows work is correct, this next section will tell you how to find an amount of time to wait between resetting the system time and selecting NSMB on the console’s home screen that will put you in the middle of a window.


Finding a Wait Time

If you play on an original model DS or DS Lite, I already have found an easy, consistent wait time. In my setup, I use the following method to start NSMB at the right time: confirm the system time setting, reset your DS, and press A to select NSMB right when the seconds hand of the analog clock on the top screen hits 9 seconds.

Other models of DS/3DS do not have a convenient, accurate, on-screen indication of the current system time, so you must use a timer program such as LiveSplit to start NSMB after the correct wait time. This is a time-consuming step, so you should ask a runner who does RNG manipulation on the same model of DS/3DS as you what their setup is (our Discord server, linked in the sidebar, is the best place to ask). If no such runner exists, you should find your wait time manually. Note that you can skip this step and start NSMB at a time you decide on without checking if it’s in the middle of a window, but you may have to document up to twice as many toad patterns while finding an optimal wait time.

Anyway, this is the process for finding your own wait time using LiveSplit:
1. First, time how long it takes for you to reset the system time, reset the console, select NSMB on the console’s home screen, and select “New File”, starting from when you press A to confirm the time setting. For example, on OGDS it takes me about 7s to go from resetting the time to starting NSMB, and 7 more from there to starting the run, for 14s total
2. Add a few seconds to that time, then set that as a negative offset on LiveSplit. For example, I would set LiveSplit to start at -17.00s
3. Add a second to the amount of time between resetting the system time and starting NSMB. For example, I would start NSMB when the timer changes from -9.00 to -8.99
4. Start your timer at the same time as you reset the system time, start NSMB at the proper time, and document the Toad pattern you get (see section on documenting Toad patterns). You don’t need to play through and document the results of 1-1; just document the Toad Pattern
5. Repeat step 4 many times, taking note of the number of occurrences of each pattern. You should see that one or two Toad patterns occur more often than all the others
6. If your wait time is in the middle of a window, you should be getting one pattern significantly more often than every other pattern (up to maybe 90% of the time depending on how good you are at starting NSMB at the same time every time). If you are getting two patterns most of the time, your wait time is probably between two windows. Change your timer program offset by 0.05 and return to step 4.
Repeat until you have a wait time that maximizes the frequency of the primary pattern.


Adjusting Variables

Finding a wait time that consistently puts you in the middle of a window is the hardest part, so you can lock that variable in place. The three remaining independent variables are date setting, time setting, and 1-1 double jumps. As I said before, you will want to use the number of double jumps you perform in 1-1 as a “fine adjustment” of the RNG manipulation for when you get a non-primary pattern and need to do a backup (more about finding backups later). This leaves two more variables: date setting and time setting.

You should pick dates and times that are easy to remember and enter. For the day and month, I have used 1/1 and 4/20, but you can also do anything that is significant to you, such as your birthday or your favorite holiday. Ease of memory is the biggest factor for dates. I recommend starting with 1/1/2000 and working your way through the X/Y/2000 dates before moving to a different year. I prefer easy-to-enter, as well as easy-to-remember times, so I recommend starting with 00:00, going to 12:00, then changing the date.

As for number of double jumps in 1-1, count how many you usually do, and learn where to add/remove double jumps. I know how to play through 1-1 using 2 to 7 double jumps, but I prefer using 4 to 6 so I test those numbers first.


Setup-Finding Guide

1. Set the year, day and month, and time to a value
2. Wait the amount of time that puts you in the middle of a window, and start the game (see section on how to find your wait time)
3. Take note of the Toad pattern (see section on how to document patterns)
4. If you haven’t seen this pattern before, do your preferred number of double jumps and document the results (even if no shell)
5. If you have seen this pattern before:
5a. If you know a number of double jumps that results in 1-2 shell, reset and try more toad patterns
5b. If you don’t know a number of double jumps that gives shell, try a new number of double jumps and document the results (even if no shell)
6. If you’re not happy with the number of patterns for which you know how to get shell, return to step 1
Repeat until you've found a date and time combination for which you can get shell from the primary and most other common patterns.

Putting this all together, here are the steps to perform RNG manipulation (once you have a working setup):
1. Reset your DS
2. Set the date and time to the correct values
3. Exit to the home screen
4. Start NSMB after the correct amount of time has passed since pressing A to confirm the time setting
5. Select “Mario Game” any time before the cutscene begins to play on the top screen
6. Confirm which seed you have via the Toad patterns
7. Do the correct number of double jumps in 1-1
If everything is done correctly, this should yield the 1-2 shell every time.