Smogon Community (http://www.smogon.com/forums/index.php)
-   Wi-Fi (http://www.smogon.com/forums/forumdisplay.php?f=53)
-   -   RNG Manipulation in FireRed/LeafGreen: Wild Pokémon Supported in RNG Reporter 9.93 (http://www.smogon.com/forums/showthread.php?t=62357)

 Arseus Oct 11th, 2009 9:31:03 PM

RNG Manipulation in FireRed/LeafGreen: Wild Pokémon Supported in RNG Reporter 9.93

1 Attachment(s)
12/20/11 Update: RNG Reporter now supports Method H, the method of Wild Pokémon generation supported in FireRed and LeafGreen.
09/14/11 Update: The technically inclined may see Bond697's latest posts on Method Determination and GBA Video Functions.

Preliminary Information
Abusing the Random Number Generator of FireRed and LeafGreen is very difficult in comparison to games such as Emerald or Diamond and Pearl. Many users have found success thanks to save states from emulators, though the goal of this topic is to facilitate this process for those using actual game paks.

One of the most important pieces of knowledge in the puzzle of RNG abuse is the "seed". A "seed" is a number that is initially plugged into the formula used to generate strings of pseudo-random numbers. If we know the seed, it is possible to determine the sequence of pseudo-random numbers it creates. In Emerald, we always know the seed, as it is 0 each time the game starts up. In Diamond and Pearl, we can manipulate the seed by starting the game at a certain time, and hitting a certain delay.

FireRed and LeafGreen operate in a different fashion than the abovementioned games, but they share certain similarities with all of them. They still make use of a seed, which generates a set of framessimply put, a frame is the spot when the RNG generates a certain PID (a nature and IVs for Pokémon). User flovv has looked into the game's code and discovered the specifics of seeding for FireRed and LeafGreen:

Seed Creation

Frequent contributor mattj has summarized much information concerning seeding and the advancement of frames as follows:

Quote:
 Originally Posted by Fat mattj (Post 2543393) 1) It really is possible to hit reasonably consistent starting seeds in FR/LG: Been There Done That. 1) The moment the game "begins seeding": When you press A to make the "Venu/zard Scene" begin. 2) The moment the starting seed is chosen/calculated: [A few moments after Venusaur/Charizard's cry sounds, upon pressing A again to advance.] 3) The moment frames STOP rolling: When you press A the SECOND time on your pokemon and the battle actually begins.
It is important to note that "button mashing" is undesirable due to its effects on seed groupings. It is much better to be deliberate with button presses whenever you are booting up the game.

User NeoSyrex also has information concerning the FireRed/LeafGreen RNG, which he famously applied to capture a Zapdos for use in the Video Game Championsips. The information provided by NeoSyrex is as follows:

Quote:
 Originally Posted by Fat NeoSyrex (Post 2284227) Basically the way to abuse FR/LG's RNG is to catch a Pokémon (for example Zapdos), check its IVs, and get the seed. Then go backwards through the RNG (using the reverse RNG formula on the seed) until you find your starting seed. I never figured out how the game creates it, but the starting seed is always going to be a 2 byte number so it doesn't really matter since the RNG rarely comes up with numbers that small (and when it does the offset is usually a giveaway as to whether its the starting seed or not). I made a program that can do this, its a simple DOS program I quickly made that I haven't had a chance to make look nice. (...) Continue doing this until you find a seed you land on often. Once you find a particular seed that seems to work for you, use RNG Reporter to check if there are any spreads for the seed that you want. Finally, you need to correctly time the frame you enter the battle to match the corresponding spread.
This seed may be found manually by program FR/LG Seed Finder, which is attached to this post. NeoSyrex, the author of this program, says the following:

Quote:
 Originally Posted by Fat NeoSyrex (Post 2317103) (...)it's pretty simple, just enter the seed you calculated and it will return possible starting seeds, and how many frames earlier they occurred. Usually the first one (the lowest number of frames backwards) will be the correct starting seed, although there are exceptions, especially if you waited a while to calculate your seed.
As mentioned earlier, it is possible to generate a list of upcoming spreads using mingot's RNG Reporter program. This is more reactive RNG manipulation than proactive, but this is the best we have at the moment.

From here, it is possible to aim for a spread that you want by hitting its frame. Frames advance in realtime in a similar vein to Emerald, albeit with a catch. In a "quiet" area, such as outside Mt. Moon, the RNG advances at approximately 60 frames per second. However, this does not apply to all locations in the game. In certain locations, the RNG advances somewhat differently.

The RNG runs in an altered state in certain areas (many of which seem to be interior), cycling through either odd frames, or even frames. For example, if the game chooses odd frames, it will only cycle through frames 1, 3, 7, 9, 11, and so on. This creates the illusion that the RNG is advancing at 120 frames per second, when it is actually skipping over one type of frame. However, you can change whether the RNG will cycle through even or odd frames. This is achieved through opening up the menu, saving your game, and possibly other actions that have yet to be documented. This will cause the frames to switch to the opposite types; if the game was cycling through odd frames, it will now cycle through even frames, and vice versa. The specifics of quiet and noisy frame advancement are not yet known.

It would also seem that noisy and quiet areas are not necessarily consistent; noisy areas can be silenced through a technique described by flovv:
Quote:
 Originally Posted by Fat flovv (Post 2538460) About the noisy areas: Most of them can be turned to normal ones by saving there and reloading the game. It also seems that sometime if you visit a noisy area and go to a normal the frames will remain noisy.
At the moment, you would look through the list of spreads generated by your recurring seeds until you found one you wanted.

Method 1 Pokémon

Much like Emerald, FireRed and LeafGreen

Bulbasaur, Charmander, Squirtle, Clefairyš, Abraš, Hypno˛, Voltorbł, Electrodeł, Hitmonlee, Hitmonchan, Scytherš, Pinsirš, Magikarp⁴, Lapras, Eevee, Porygon, Omanyte, Kabuto, Aerodactyl, Snorlax, Articuno, Zapdos, Moltres, Dratiniš, Mewtwo, Togepi, Lugia, Ho-Oh, and Deoxys

šOnly Clefairy, Abra, Scyther, Pinsir, and Dratini bought at the Game Corner are consistently generated by method 1. Scyther is exclusive to FireRed, whereas Pinsir can only be found in LeafGreen.
˛Only the Hypno encountered by Lostelle in the Berry Forest is consistently generated by method 1.
łOnly Voltorb and Electrode disguised as Poké Balls are consistently generated by method 1.
⁴Only Magikarp bought from the salesman in the Pokémon Center on Route 3 are consistently generated by method 1.

Note that as in Emerald, a Pokémon's spread is not necessarily selected at the precise moment you press A next to its overworld sprite. Rather, the RNG keeps cycling right up until the battle starts (or in the case of gift Pokémon, it is received), unless "spread selected" is indicated in the place of "last input". A list of where to save and the last inputs for each Pokémon is as follows:

Bulbasaur/Charmander/Squirtle: Save in front of the Poké Ball containing the starter of your choice. Spread selected upon pressing the A button after the message "This POKéMON is really quite energetic!" appears.
Abra/Clefairy/Dratini/Scyther/Pinsir/Porygon: Save in front of the Game Corner Prize Corner desk. Spread selected after pressing A when the message "So, you want the [ABRA/CLEFAIRY/DRATINI/SCYTHER/PINSIR/PORYGON]?" appears.
Hypno: Save in front of Lostelle in the Berry Forest. Last input is a press of the A button after Lostelle wails "Waaaaaaah! I want my daddy!"
Hitmonlee/Hitmonchan: Save in front of the Poké Ball which contains the Pokémon of your choice. Spread selected after pressing A when the message "You want the hard-kicking HITMONLEE?" or "You want the piston-punching HITMONCHAN?" appears.
Magikarp: Save in front of the salesman in the Route 3 Pokémon Center. Last input is a press of the A button after he asks "So youll buy it, am I right?"
Lapras: Save in front of the Silph employee nearest to your rival. Spread selected with a press of the A button after he says "I want you to have this POKéMON for saving us."
Omanyte/Kabuto/Aerodactyl: Save in front of the important doctor who revives Pokémon fossils. Spread selected after pressing A when he says "Your fossil is back to life! It was [OMANYTE/KABUTO/AERODACTYL] like I think!"
Snorlax: Save in front of the sleeping Snorlax. Last input is a press of the A button when the message "It attacked in a grumpy rage!" is displayed.
Articuno/Zapdos/Moltres: Save in front of the legendary bird. Last input is a press of the A button after it cries "Gyaoo!"
Mewtwo: Save in front of the Genetic Pokémon. Last input is a press of the A button when it says "Mew!"
Togepi: Save in front of the man in Five Island's Water Labyrinth. Spread selected upon pressing A when he says "Please, I'd like you to have this."
Ho-Oh: Save on the first space of the peak of the cliff. Last input is pressing up on the directional pad to place yourself on the second space of the cliff.
Other: Save directly in front of the Pokémons overworld sprite. Last input is a press of the A button to "activate" the battle. In the case of Deoxys, the red-hot rock serves as the overworld sprite. In the case of Eevee, the Poké Ball that houses it counts as its overworld sprite, and no battle is required.

Note that freezing or changing certain values in an emulator can alter a Pokémon's generation and lead to an illegal result. Due to a phenomenon known as vBlank (detailed in Bond697's posts on GBA Video Functions), "Method 1" Pokémon can also be generated through methods 2 and 4, but this is not the default behaviour; know if you get an abnormal spread for a method 1 Pokémon, this is the factor at work.

Wild Pokémon: Method H

FireRed and LeafGreen use a method known as Method H (which comes before the "Method J" and "Method K" with which you may be familiar if you have done RNG manipulation in the fourth generation) to generate their wild and Pokémon. This is the same method used in Ruby and Sapphire, and is now supported in the latest version of RNG Reporter (9.93). More technical information is available below in HIDE tags. What you need to know is that all wild Pokémon are generated using Method H, but with a bias towards the Method 2 variant.

Old Technical Information

Practical Applications

As for the practical side of RNG manipulation, in light of recent (12/20/11) Method H information, OmegaDonut has proposed a method of manipulating gift and wild Pokémon that is simpler than ever. Read his post here for a quick breakdown:

Quote:
 Originally Posted by Fat OmegaDonut (Post 4018452) [B]uy a cheap Method 1 Abra at the Game Corner, note the IVs and calculate the "seed" for that Abra. You could then plug that seed into RNG Reporter, generate a list of upcoming spreads, and look for spreads of interest. If you have a timer synchronized with the button press of the moment you obtained Abra, it shouldn't be too difficult to hit your target. Much easier than dealing with a 16 MHz Timer1. [...] My method gives you one chance to hit a spread, and no opportunity to re-calibrate if Method H messed you up and you didn't know it. But it's still easier than dealing with a 16 MHz timer AND the 60 frames\sec advancements.
In the event that you wish to have the luxury of recalibration, NixHex's original method can be found below:

Quote:
 Originally Posted by Fat NixHex (Post 2859829) Requirements: A Pokemon who knows Sweet Scent (2) Master Balls 2 empty team slots 10 or so Rare Candies Metalkid's IV Calculator (www.metalkid.info) This will only work if you are shooting for a very large frame, because you need to allow yourself a great deal of time to check IV's and to verify what seed you are on. Calibration: Start the game normally. Start a stopwatch the moment the game seeds. At the first chance you get, use Sweet Scent, catch whatever insanely high-leveled Cerulean Cave Pokemon appears. Check its IVs and verify seed. [Note that wild spreads are [usually] generated using method 2, so [...] use method 2 to verify the seed.] Stop the stop watch For the lack of creativity, I'll call this time TCheck. You only really need to do this a few times if you're shooting for high enough of a frame. Now, make sure that your target frame satisfies: Code: `Eq. 1 TF >> TCheck (in seconds) * 60` Now, let's say, completely hypothetically, I start the stop watch as the game seeds, use Sweet Scent, catch, say, a Wobbuffet, and check its IVs. As soon as I find my seed from FRLGSeedFinder, I hit STOP. Let's say this time is 5:45. Converting to seconds, I get 5*60 + 45 = 345 seconds. Now, I go back to Equation 1. TF >> 345 * 60, or TF >> 20700 In other words, this method can only be used for HIGH frames. In fact, it wouldn't even be worth it to use this method for lower frames, as you would probably overshoot your target frame just by doing the calibration. Now that we're done with that, we can get to the cool part. Let's say you can consistently hit the seed 9AA0. So, you decide to search the [method 1] frames on this seed and you find this admittedly lame spread: Frame 44586 Brave 30/30/14/30/25/30 Is this frame high enough to warrant using this method? Plugging 44586 into equation 1 yields 44586 >> 20700, which is obviously true. Now we're set. Now, create an emloop/pikatimer for a frame of 44586, and Soft-reset. The moment the game seeds, start the timer Quickly Sweet Scent, catch, and check seed of the wild pokemon. If your seed is, in fact, 9AA0, let the timer run its course, then encounter Mewtwo If the seed is incorrect, you can restart now and save yourself the trouble of waiting another 7 minutes just to get a bad seed
User Zari has taken the information we have right now and created a method of RNG manipulation that makes RNG manipulation in FireRed/LeafGreen more accessible to the average user, even if it is not entirely possible to manipulate the seed at will. As NixHex has put it, try thinking of this method as a variant of Emerald, albeit one with more options from which to choose. Zari's post below describes his method:

Quote:
 Originally Posted by Fat Zari (Post 3091532) Important Info This is a reactive-proactive method; you find groupings of seeds that you can hit, then search for spreads within those ranges that are of interest. NixHex and I have hit similar groupings of seeds independently, leading me to the conclusion that it *should* be possible for any user to hit those seeds/the spreads within them as well. The [combined] data we have collected is as follows: Seed [Hex] groupings (an "X" indicates a variable value) 54XX (XX usually ranges from the values c0 to d4/d5) 30XX (XX: 82 to a0) 0bXX/0cXX (XX: ef to 07 [latter value has 0c at the forefront]) 9eXX (XX: 0c to 17) There are other groupings, but these are the most common. Now onto the method itself! The "Skipping" Method Basically, what we need to do is skip the intro and charizard/venusaur "flash" sequence entirely. We do this by button mashing, but it requires some timing as well. I don't have the exact/close approx. time length nailed (working on this as I find the time), but you need to begin button mashing the "A" button after the credits/nintendo junk, but directly before the screen opens up from the center with a deep blue (this is the background screen which the Game Freak star passes over). Directly after the introduction finishes (or would finish, if you let it run its entire course) there is the zard/venu "flash" as I like to call it, where the pokemon's sprite appears white, then forms a grey version of itself, and then becomes full color after that subsequence finishes. What we want to do is press "A" fast enough so that we skip this "flash" entirely. The final part of this method is to press "A" fast a third time, after skipping both of those sequences. If done correctly, the cry of venusaur/charizard should sound within 1 to 2 notes of the pokemon theme's beginning. Warning: this may take a lot of tries to get correct; the desired time length between button presses is ideally zero, but, since that's physically impossible, you want to aim for as small as you can make it. The smaller the time length between button presses, the more consistent results you will get. That's basically it for the method. After all of that is complete, do the usual by catching mewtwo (or another high level legend/mon), finding the PID via RNG reporter, then inputting that seed into NeoSyrex's FRLG Seed Finder. Notable spreads within the given groupings: For Mewtwo: Seed: 54cc, F:1838, Naive 27 / 28 / 30 / 30 / 27 / 31 Seed: 54de, F:42197, Timid 28 / 31 / 30 / 31 / 30 / 31 Seed: 3081, F: 22538, Hasty 30 / 30 / 26 / 30 / 30 / 31 -- note, I have not been able to hit this seed yet, though I have hit ones around it many times. Seed: 9e0c, F: 25054, Naive 28 / 31 / 31 / 27 / 23 / 31 Seed: 0bf0, F: 30980, Hasty 31 / 30 / 25 / 31 / 25 / 31 Seed: 0bff, F: 20091, Hasty 28 / 31 / 30 / 27 / 30 / 31 Seed: 0c00, F: 6208, Naive 29 / 31 / 24 / 29 / 31 / 31 For those who might like to play ADV sometime again: Seed: 54c6, F: 8631, Calm 31 / 31 / 30 / 31 / 28 / 31 Seed: 3082, F: 6403, Naughty 31 / 30 / 30 / 30 / 22 / 31 Seed: 9e14, F: 35262, Naughty 30 / 29 / 27 / 30 / 27 / 31 Seed: 0c02, F: 11279, Rash 30 / 30 / 31 / 27 / 31 / 31 Seed: 9e10, F: 63361, Jolly 28 / 31 / 29 / 1 / 31 / 31 --- There's most likely more, but that's just an example of what you can find with a few groupings of seeds. All but the last jolly one are under 10 minutes; most are under 4.
Note that triggering the advance to the start screen at the right instant will yield better results than mashing buttons either to a beat or as quickly as possible. Zari notes that three button presses are needed to execute the skipping method.

Zari has also kindly compiled a list of the different seeds found:

Code:

```By groupings: 9eXX [02 - 2d] 9e02 * 2 9e03 9e0a * 2 9e0b * 4 9e0c * 2 9e0d 9e0f * 4 9e13 * 8 9e14 * 10 9e18 9e1c 9e1d * 2 9e29 * 2 9e2d 54XX [c2 - f3] 54c2 * 2 54c3 54ca * 2 54cb * 6 54cf * 2 54d2 * 2 54d3 * 3 54d4 * 10 54d7 54d8 54db 54de * 2 54e0 54ed * 2 54f3 30XXv1 [82 - a8] 3082 3083 308a 308b * 5 308e 3093 3098 309c 30a0 30a8 30XXv2 [3d - 5a] 303d 3045 * 2 3046 * 2 3047 3048 304b 304c * 5 304d * 2 304f * 2 3050 3056 * 2 305a e7XX [42 - 72] e742 e749 e747 e74b * 9 e74f * 5 e753 e758 * 3 e75c * 2 e75d * 3 e769 e771 e772 * 3```
Here is Zari's success story in which he details how he caught his Mewtwo in Kanto:

Quote:
 Originally Posted by Fat Zari (Post 3763418) For as fast as FRLG seeds, a 33.3% ratio of hitting a target seed is quite good. Now, I've hit this seed before, but what made this different from previous tests was that I only hit the A button 3 times per attempt. As such, I got even more consistent results when I used the skipping method (3 presses is the minimum needed to do the skipping method). As for how I got my new mewtwo....well, it took a lot of attempts, a lot of luck, and the right kind of target frame. What I mean by that is, well, choose a low target frame; you'll be hitting quite a few groupings of seeds, so select a frame from one of them that's somewhere under a minute (I used frame 2051 for my mewtwo). Basically, to RNG in frlg you first need to find what you can hit; in my case on my lg, it was the groupings 4cXX, 7aX, 9a9X, and f4dX. Notice that, as opposed to those I hit earlier on my fr in the first post, there's mostly only 1 X variable (4cXX is right on the split point). This is due to the groupings being smaller, like Kaphotics has mentioned. Anyways, once I found what I could hit, I looked through the groupings for low frames with good spreads. I chose one out of the 7aX grouping because it was the smallest grouping that I could easily hit (7a4 - 7a7), thus increasing my chances of hitting my target seed when timer0 selected that grouping. After that, it just took using eontimer to find my lag for that particular frame (-517), and then a few more resets and.... http://www.smogon.com/download/sprites/rs/150.png / Hasty / Pressure / Genderless 28 / 31 / 7 / 29 / 24 / 31 ....became mine. :) If you guys have any more questions I'll try my best to answer them, but that was the main process for which I used to get my mewtwo. Obviously there was a lot of luck involved in the capture, but when it comes to frlg, you don't really have any other choice since timer0 moves so fast.

Trainer ID and Secret ID Generation

The RNG is constantly running during Professor Oak's introduction to the player, and the point at which the player's ID, or visible Trainer ID is created has been found, as well as the moment when the invisible Secret ID is generated. Our knowledge of the TID/SID generation process will hopefully allow manipulators to obtain custom ID combinations for use in the capture of shiny Pokémon, or general aesthetic purposes.

Quote:
 Originally Posted by Fat Kaphotics (Post 3674591) FireRed/LeafGreen TID/SID Generation Code: ```The moment you press OK and the screen fades out completely,       the 0x04000104 timer value gets set as the new seed. The game then takes that seed and considers it the initial,       and that initial seed is your TID.``` Code: ```The SID is set later in the process, but is still related to the seed. It is taken from the frame you are on when you end the miniaturization,       taking the seed on that frame (and using the upper16).```

As implied by the quotation marks in the header, not all of these questions are frequently asked. However, I do anticipate them coming up, so I'll try to provide some help here:

Q: How are Eggs/shiny Eggs generated?
A: Information on the generation of Eggs can be found in this post of the RNG Research thread. Similarly, Egg availability and generation is elaborated upon in a subsequent post in the thread. In both cases, the information has been provided by Kaphotics.

Q: There were two runs of FireRed/LeafGreen cartridges. Does the RNG work the same on both?
A: As far as we are aware, there are no differences between the runs of the games as far as the RNG is concerned.

Q: Do these findings apply to other games, such as Ruby/Sapphire, or just FireRed/LeafGreen?
A: As mentioned above, all Pokémon handheld games share some similarities as far as RNG mechanics go, but they also have their own nuances. This thread is made specifically dealing with FireRed/LeafGreen mechanics. Ruby and Sapphire share wild Pokémon generation Method H, so that research may be applied there.

Research Questions

As you have likely gathered, we do not have enough information to create a streamlined RNG manipulation experience in FireRed/LeafGreen at this time. This is why your help is needed. Here is a list of all the things that need researching at the moment (that I can think of):
• What areas have a "quiet" RNG, and what areas are "noisy"?
• It is unclear at the moment just where (and when) the RNG goes into the "noisy" pseudo-120 FPS mode. We need users to test in different areas to see where the RNG is "noisy" and where it is not. Bear in mind that the RNG can be silenced, as described by flovv earlier in the post.
Quote:
 Originally Posted by Fat Negator (Post 2281846) That "fast mode" as we call it showed up also on a Sevii Island, it would really be helpful if some real cartridge owner can figure out if it appears even there: The how to should be very easy, since the tester should just get their seed, aim for a 10/15 minutes far spread, and at the supposed time, check if their outcome is close at the aimed target, or if it's far away (double the time far). This should be done after changing location, for example, starting the game outside Cerulean Cave, going inside, and only then do the scenting.
• What actions cause the RNG to switch from even to odd?
• It is known that opening the menu and saving both cause the RNG to switch to the opposite type of frame. However, the full range of actions which cause this switch are not known as of yet.

General Resources

Applications
*PokéRNG does not provide accurate seeds for FR/LG at this time.

Credits

I would be remiss to not give credit to the various users that have made this information available. Of course, where the RNG is concerned, loadingNOW and X-Act did the pioneering research that has made all RNG manipulation possible. =Jonny=, Syberia, Equinox, and Negator contributed to early tests and research concerning the FireRed/LeafGreen random number generator, and the program used to find FireRed and LeafGreen seeds was crafted by NeoSyrex. Additionally, user NixHex has made several significant contributions, including a series of updates. Similarly, Kaphotics and Bond 697's work in the RNG Research thread has proven useful in illuminating some of the outstanding technical aspects of the RNG, and they have posted many new developments in this thread. Many other users such as chrish, mattj, flovv, andZari made consistent or large contributions. Many other users have contributed to this cause.

 chrish Oct 12th, 2009 3:00:07 PM

Data on Zapdos in the power plant

In light of the above information, my findings might not be useful, but here they are.

My data only applies to Zapdos in FireRed. I saved in the power plant directly in front of him before I started.

My theory [before I saw this information] was that if I soft reset the game and duplicated every possible interesting time interval each time I soft reset, that I would see 1 or more duplicate instances. I assumed that I could accomplish the necessary uniformity by pressing the A button once every time interval instead of trying to "race" through the screens to get to the encounter. So I did the following:

1) soft reset in sync with a trusted metronome

2) pressed the A button on every beat of the metronome (every 1/2 second) while I advanced through the credits, the title screen, the continue screen, and the 4 "Previously on your quest_x" messages.

3) recorded the number of beats at two spots:
a) the point at which I pressed A in front of Zapdos
b) the point at which I pressed A after Zapdos says "Gyaoo!"

I only had two distinct result types for 3a/3b above:
28/31 presses
29/32 presses

After generating about 35 of each type (3a and 3b), I never got a duplicate, even though I had multiple instances of the same nature. Admittedly this is not a very large sample, but since I had the same nature several times, I was surprised that I never got a duplicate.

I can't see how my saved data couldn't be the same each time (since I saved in front of Zapdos and did soft resets thereafter). I did consider the possibility that a hard reset could be different than a soft reset, but I just don't see how that is possible. I may try that as well though if it is true that I fail to produce a duplicate through soft resetting after a larger number of repetitions.

As a die hard software developer I like to test the simplest case first; I thought Zapdos in the Power Plant would be one of those but now I am having doubts...

I am eager to help; I would happily look at the game's coding, but I have no idea how to get my hands on it. Can anyone tell me?

I have many copies of FR/LG (all of them untouched by foreign hardware!) so I can easily reproduce many of the interesting scenarios.

Let me know how best I can help - it seems as though different people each investigating a different aspect of the question would be the most efficient approach.

 Arseus Oct 12th, 2009 9:19:55 PM

Hello chrish!

First of all, I can see that this is your second post here (though your join date indicates you may be a "lurker"), so I would like to formally welcome you to Smogon. I am sure that you will enjoy your stay here, as you seem to be very enthusiastic and helpful. It is great to see users such as yourself stepping up to help out; I saw that your other post was similar to this one, albeit without a specific experiment. I am glad that you have taken the time to help out!

Now, to address your post for content. I am glad to see that you are attempting to use an actual game cartridge, and this will definitely come in handy, given that our goal is to be able to abuse the RNG on cartridges. I am a little worried that this may be a bit of an uphill battle for us at this point though, as cartridges have different limitations than emulators. This brings me to my next point:

Quote:
 Originally Posted by Fat chrish (Post 2260317) I am eager to help; I would happily look at the game's coding, but I have no idea how to get my hands on it. Can anyone tell me?
In order to look into the game's code, I do believe that you will need the game in a form that can be played on an emulator. However, that is all I can tell you without infringing upon forum rules. I hope that you understand.

Quote:
 Originally Posted by Fat chrish (Post 2260317) My theory [before I saw this information] was that if I soft reset the game and duplicated every possible interesting time interval each time I soft reset, that I would see 1 or more duplicate instances. I assumed that I could accomplish the necessary uniformity by pressing the A button once every time interval instead of trying to "race" through the screens to get to the encounter.
This is a decent theory, at least going by what we know at this moment. As I mentioned in the original post, loadingNOW has commented on the FR/LG RNG in the past, but the information we have from him is somewhat cryptic. As you may be aware, loadingNOW is a very intelligent user, but I do not believe that his first language is English (it is actually German, I believe). So while he may have provided a good explanation of the RNG, I am not sure how to interpret it. He has said (again, as mentioned above) that FireRed and LeafGreen seed through the time spent in the title screen, but also that the seed is stored in the save file, and is changed through number of steps. So we do not have anything conclusive.

However, returning to your above experiment, there is a rather unfortunate flaw. Assuming that the RNG is rather sensitive to the time spent in the title screen (I do not believe this is a bad assumption, considering that the RNG is wont to run at about 60 frames per second), it would have been very difficult to get the same seed each time. And even if you did get the same seed, the RNG continues to run at 60 frames per second (or a pseudo-120 frames per second, which is likely the case in the Power Plant), as described in the original post. This is a limitation that we cartridge players are going to be faced with. So at this point, I do not believe that the experiment you have carried out is the best way of doing things at this point, unless I have somehow misinterpreted it (feel free to correct me if I have). I do believe that if you modify your experiment slightly, you can indeed help us out.

From my understanding, what you are trying to do at the moment is seeing if you can obtain the same frame. As I have mentioned, this is not easy at all this point; what you would be better off doing is trying to see if you can obtain the same seed. If you recall from the first post, it is possible to find your seed and generate a list of spreads using mingot's RNG Reporter. To do this, use Sweet Scent to engage a Pokémon in battle, then subsequently check its IVs (or I suppose you could also catch Zapdos, since you likely do not have any intention of saving afterwards). Along with the seed you find from this Pokémon, it might be helpful if you could record a time, or I suppose the beats of the metronome along with it. If you are able to get the same seed, then we have made progress in that we know the game does indeed seed from the time in the title screen. If not, then I am afraid that we will be in the same place we are now; not knowing how the game seeds at all.

Of course, this would be easier if you could actually look into the code, as I have touched upon above. I am not sure if it is the best use of your time to conduct the above experiment or not; it will be worthwhile if we can advance our understanding of the seed, but if not, it will have done little. If you are interested in more immediate results, you may want to look into one the following research question:

Quote:
 Originally Posted by Fat Arseus (Post 2258880) What dictates the method of a wild Pokémon?As mentioned above, it is unknown how the method used to generate a wild Pokémon is chosen, though method 4 is the most frequently used. This is something that most users can help out with; all you need is Pokémon from FireRed and LeafGreen and X-Act's IVs to PID Applet. Find the IVs of a Pokémon you caught in FR/LG, and enter it in the applet. Hopefully, there will only be one possibility (if not, you would need to be able to read your save file to find the definite PID). If you can, also record the place the Pokémon was caught (if it is still in the third generation, this should be in its summary). This may be used in conjunction with research on "quiet" and "noisy" locations, to see if there is any correlation between unorthodox methods and odd/even spreads.
I do not know if you have the ability to look at a game's save file (I am guessing not), so you may have to try a couple times to get a Pokémon that has only one possibility for its method of creation. I must also request that you record the location that you catch this Pokémon in (the more specific, the better, though not so specific as the exact patch of grass!), which may help us out when combined with our knowledge on what areas are "quiet" and which are "noisy". It would likely be best if you caught a number of Pokémon within a single area, to see if all or many Pokémon within the same area are generated by the same method. If you can, it may be useful to note the seed that generated that Pokémon as well. However, this is admittedly not as much of a priority, as RNG manipulation of wild Pokémon in FireRed and LeafGreen is going to be impractical to say the least.

It is ultimately up to you as to how you want to help. You may choose to try the revised experiment as I advised above. Bear in mind that none of the players using an emulator have managed to get the same seed twice, though I am unsure of what methods they were trying. At best, we can discover through this test that the game does indeed seed through time spent in the title screen; at worst, we remain unsure of how the game seeds. On the other hand, if you opt to help gather a list of wild Pokémon methods, we will most likely be able to use this knowledge in some way. However, it is unlikely we will be able to apply it very well, as our focus will be more on the legendaries, which will be hard enough to manipulate as it is.

Ironically, what would be most helpful to us right now is the ability to look at the game's actual code and conduct tests using an emulator. The extra options afforded by such a process is ultimately what will help us advance our understanding to the point where the knowledge can be applied to cartridge players. I am confident that negator has told me what he knows, but from this point on, I am hoping to have RNG research be a more transparent process; I request that if any users using emulators are reading, you post here with any findings you have that may help us.

I hope you do not feel as though I am devaluing your contribution, chrish, since given the fact that you are so willing to help out, this is the exact opposite of how you should feel. We are simply at an early stage in the research; one where the advantages of an emulator will likely be what sheds light on most of the mysteries we have at the moment. You will certainly be a vital asset to us once we are at a stage where we can better conduct tests on cartridges, or at least in a situation where an emulator is not so heavily relied upon. Think of yourself as a brick-layer. We certainly need you to build the house, but right now you may not have the tools required to help us finish the foundation, through no fault of your own. Nonetheless, it is with your help that we will eventually construct our glorious [Pokémon] mansion.

I certainly hope you are not discouraged, as you show much promise in your attitude and logic. I feel as though I cannot emphasize this enough: how you proceed is reliant upon how you feel your time will be best spent. I feel that I have provided you with adequate information to make this judgement call for yourself, which is the environment that I feel will be most productive for our research. Feel free to post which path you decide to travel down, though to the best of my knowledge, you will be the only user conducting research in either of those fields at the moment, at least in affiliation with this topic.

Just to make sure my messages did not get lost amidst this sea of words: welcome to Smogon, and thank you for your enthusiasm concerning this project.

 chrish Oct 13th, 2009 2:12:17 PM

Thanks for the welcome.

I have indeed been a lurker (I have spent countless hours browsing all the interesting information on the Smogon web site).

No worries, I am not discouraged. I have spend perhaps > 120 hours in the last couple of months breeding exact Gender/Nature/Ability/IVs using the spreads for Emerald, at times wondering how I managed to hit 965 all the time while I actually was hoping for 965S!

I am in the process of investigating the use of an emulator.

In the meantime I will try and help out with What dictates the method of a wild Pokémon?

 Gwabatim Oct 14th, 2009 7:20:06 PM

Can you rng shinies in FR/LG?

 Equinox Oct 15th, 2009 12:01:51 AM

Alright, well I have done a good amount of research on it, I have noticed that the method changes when you catch a pokemon. I save stated and sweet scented and got method 1 and everytime after that I would get either 1 or 4. Ive done it multiple times, I have only successfully abused wilds twice (7 times if you count my five failures, where I hit the frame but got the wrong method or Pokemon) and it looks like you can lock into method 1 or method 2 as long as you dont catch a pokemon. This means that you need save states to check your current method. (you need them anyway to abuse, since we dont know the seeding) However, while you know if you are going to hit methods 1 or methods 2, there seems to always be the possibility of hitting method 4.

The thing I wish we could figure out as of right now is the seeding, I tried to figure it out if it works like delays in DPPt, and so far, I have no leads, most of the time I get my frames to start in the hundred millions or billions, but I have had instances in lower frames.

Method 3

Im not sure exactly how it is generated, but there have been a few points to where I have hit method 3 spreads, and they are usually encountered when i was trying to hit a method 2 spread, ill continue to take a look at that.

I feel that this thread should include Ruby / Sapphire abuse as well, or another thread. Ruby and Sapphire seems to be exactly the same as fire red, but the methods are the same as emerald, in my experience. One thing I had weird happen in Ruby was that I hit a method 2 Latias, the spread is 31/18/31/30/31/30, in method 2 it is timid (the nature I got) but in method 1 it should be Hardy. Although, I think that is just a problem with my VBA, since I have had another problem with it anyway.

I also cannot figure out the seeding in Ruby and Sapphire, either.

Also, if you would like, I can link to some of Syberia's videos on how to abuse with VBA, for people who want to do some research and help out.

 Arseus Oct 15th, 2009 3:40:18 PM

Hello Equinox! I am glad to see that you found this thread, as negator mentioned your name a couple times concerning FireRed and LeafGreen RNG research. I have addressed your post below, in addition to chrish's latest post, and Gwabatim's question. chrish, forgive me, but my address to you is somewhat sandwiched in with my replies to Equinox, but that is only because there is some overlap. Let me begin with you, Gwabatim:

Quote:
 Originally Posted by Fat Gwabatim (Post 2264930) Can you rng shinies in FR/LG?
Well, "yes and no". At the moment, we cannot control the seed, so we lack control over the spreads that are generated. The only way to get a shiny at the moment is to hope that one is generated within a reasonable range of the initial seed that you get, and aim for it like any other spread. Of course, this is exponentially easier on an emulator than it is on an actual game pak. However, at the moment, we cannot actively abuse for any given spread; as I mentioned earlier, we are at the stage where our "abuse" is reactive rather than proactive.

Fortunately, unless something goes awry (such as if the seed is horribly impractical to manipulate), we should be able to abuse for shinies in the same manner that we will abuse for a typical Pokémon once we get a better grasp of the RNG. However, at the point where we are now, we cannot really set out to get a good shiny, even if you know all the possible shiny spreads for your ID and SID. Likewise, we cannot set out to get any given spread. I hope this answers your question.

Quote:
 Originally Posted by Fat Equinox (Post 2265513) Alright, well I have done a good amount of research on it, I have noticed that the method changes when you catch a pokemon. I save stated and sweet scented and got method 1 and everytime after that I would get either 1 or 4. Ive done it multiple times, I have only successfully abused wilds twice (7 times if you count my five failures, where I hit the frame but got the wrong method or Pokemon) and it looks like you can lock into method 1 or method 2 as long as you dont catch a pokemon. This means that you need save states to check your current method. (you need them anyway to abuse, since we dont know the seeding) However, while you know if you are going to hit methods 1 or methods 2, there seems to always be the possibility of hitting method 4.
Please allow me to see if I completely comprehend. I turn on my game, and the first thing I do is Sweet Scent to encounter a Pokémon. This Pokémon will be either method 1 or method 2, depending on an unknown factor, on account of the fact that it was the first that I encountered. However, any subsequent Pokémon will be either the same method as the previous one, or method 4? Of course, we do have another monkey wrench:

Quote:
 Originally Posted by Fat Equinox (Post 2265513) Im not sure exactly how it is generated, but there have been a few points to where I have hit method 3 spreads, and they are usually encountered when i was trying to hit a method 2 spread, ill continue to take a look at that.
This is particularly fascinating, on account of the fact that there has been a bit of an enigma surrounding method 3. I suppose further testing is required.

chrish, I am unsure of how much research you have done as of right now, but you should look at this new information by Equinox. I do not think what you have done is irrelevant; on the contrary, it will likely confirm Equinox's findings. However, you will want to keep Equinox's findings in mind when assessing your findings, and possibly adjust your methods accordingly. From this point on, I think it would also be helpful to note the order in which you encounter the Pokémon you capture, and organize by playthrough (as different seeds may affect the methods used to generate Pokémon).

Quote:
 Originally Posted by Fat Equinox (Post 2265513) The thing I wish we could figure out as of right now is the seeding, I tried to figure it out if it works like delays in DPPt, and so far, I have no leads, most of the time I get my frames to start in the hundred millions or billions, but I have had instances in lower frames.
I agree with you that we need to figure out how the games seed; in my opinion, this is the single most important thing we could learn at the moment. If anyone here has the ability to look at the code and figure out how FireRed and LeafGreen post, I must ask you to post here!

Quote:
 Originally Posted by Fat Equinox (Post 2265513) I feel that this thread should include Ruby / Sapphire abuse as well, or another thread.
In all due respect, I would rather keep this thread exclusive to FireRed and LeafGreen. We are at an early stage as far as manipulation is concerned, and I don't really want to divert any resources away from FR and LG for the time being (I know many fourth generation abusers are wrapped up in HeartGold and SoulSilver, though). Additionally, since Ruby and Sapphire apparently function in a manner similar to Emerald once their internal batteries run dry, Ruby and Sapphire abuse in its purest form would only last as long as the battery in any given cartridge. As such, I do not see the sense in devoting much time to it.

Regardless of our difference in opinion concerning this matter, I must thank you for taking the time to post in this thread. I would appreciate it if you could confirm (or correct) my interpretation of what you have mentioned concerning wild Pokémon, and post any other information you may have that could possibly help our research.

Quote:
 Originally Posted by Fat Equinox (Post 2265513) Also, if you would like, I can link to some of Syberia's videos on how to abuse with VBA, for people who want to do some research and help out.
If you are referring to SRing on VBA Part 1 and SRing on VBA Part 2, I suppose that there is no harm linking to them for now, since we are at a stage in the research process where use of an emulator is very helpful. I will revise the first post with these links in addition to the information you have posted come Saturday; I am short on time at the moment, and do not wish to hastily shove them in the original post.

On that note, please allow me to say the following to everyone who may read this thread. I am very busy with school at the moment, which unfortunately takes precedence over Pokémon. As such, please do not be offended if I do not reply to you right away, and do not feel as though I am uncommitted to this research thread. I will update and respond as I have the chance, but please do not feel neglected if you have to wait a day or two for a detailed reply.

 Equinox Oct 15th, 2009 6:56:18 PM

Quote:
 Originally Posted by Fat Arseus (Post 2266232) Please allow me to see if I completely comprehend. I turn on my game, and the first thing I do is Sweet Scent to encounter a Pokémon. This Pokémon will be either method 1 or method 2, depending on an unknown factor, on account of the fact that it was the first that I encountered. However, any subsequent Pokémon will be either the same method as the previous one, or method 4? Of course, we do have another monkey wrench:
Are you using a cart or VBA?

If you are using a cart, I would reccomend trying to record the time from when you capture your pokemon until you turn your game off, this way you can find out your current frame (Use Wichu's app to find your actual frame [Emerald Frame] and RNGreporter to find the method), the problem is, without a save state it is impossible to know what method you can get whether it be method 1 or 2, because it seems that as soon as you catch a pokemon, the method changes, so I would reccomend skipping the method part with mingot's program and just try to hit any random spread, and just hope you get lucky with the method.

If you are using VBA, I would start off by save stating while the cursor is on "Sweet Scent" and then catching a pokemon, checking to find the frame and the method and then loading the save state and then go from there to hit your spread.

Wilds are also a lot harder because you dont have Synchronize, so if you dont get the pokemon you want on the frame that you want, you cannot get it in that location.

Quote:
 Originally Posted by Fat Arseus This is particularly fascinating, on account of the fact that there has been a bit of an enigma surrounding method 3. I suppose further testing is required.
Yeah, the only thing I would reccomend right now, is everytime you hit a method 3 spread, record all the info, just so we have something as a possible start off.

Quote:
 Originally Posted by Fat Arseus I agree with you that we need to figure out how the games seed; in my opinion, this is the single most important thing we could learn at the moment. If anyone here has the ability to look at the code and figure out how FireRed and LeafGreen post, I must ask you to post here!
I agree with you on this, because until we can figure out the seeding, it seems like it would be nearly impossible, if not impossible to abuse in FR/LG at all. (Without save states)

Quote:
 Originally Posted by Fat Arseus If you are referring to SRing on VBA Part 1 and SRing on VBA Part 2, I suppose that there is no harm linking to them for now, since we are at a stage in the research process where use of an emulator is very helpful. I will revise the first post with these links in addition to the information you have posted come Saturday; I am short on time at the moment, and do not wish to hastily shove them in the original post.
Whatever you feel is best, I feel that it is pretty essential for research, until we can figure out the seeding.

 yayece Oct 15th, 2009 7:54:36 PM

This is an interesting project... If one were to "look at the code," how would you even get started? Does VBA allow you to look at the assembly level code? Do we know for certain if the PRNG is the same as Emerald? i.e., the initial seed may start you somewhere in the middle of the series, but will the progression of the series be the same? If yes, then maybe searching through the code for "0x41C64E6D" would be a good starting point, no?

 Equinox Oct 15th, 2009 8:07:48 PM

Im not sure what you mean by "progression of the series" if you mean frame advancement, it is still 60fps, and I really dont know how any coding works, to be honest.

 yayece Oct 15th, 2009 10:06:58 PM

Quote:
 Originally Posted by Fat Equinox (Post 2266736) Im not sure what you mean by "progression of the series" if you mean frame advancement, it is still 60fps, and I really dont know how any coding works, to be honest.
When I say "progression of the series" I'm wondering if the <i>order</i> of the frames is the same. If yes, then it means that the equation to produce the next random number is the same as the other games. That would be an easy starting point since this equation is known. If the order of the frames is different in FR/LG, then the PRNG equation is different and I wouldn't know where to even start looking.

In any case, I guess this would be trivial for me to check myself with an emulator. Just wondering if anyone knew offhand.

 Arseus Oct 16th, 2009 8:43:58 PM

Quote:
 Originally Posted by Fat Equinox (Post 2266617) Are you using a cart or VBA? If you are using a cart, I would reccomend trying to record the time from when you capture your pokemon until you turn your game off, this way you can find out your current frame (Use Wichu's app to find your actual frame [Emerald Frame] and RNGreporter to find the method), the problem is, without a save state it is impossible to know what method you can get whether it be method 1 or 2, because it seems that as soon as you catch a pokemon, the method changes, so I would reccomend skipping the method part with mingot's program and just try to hit any random spread, and just hope you get lucky with the method.
I am purely a cartridge player, so this would be the process I would use. However, I do not know if I will have the time to personally reset for a wild Pokémon in the foreseeable future. On the other hand, this should be useful for users working on wild Pokémon research, such as chrish!

Quote:
 Originally Posted by Fat yayece (Post 2266718) This is an interesting project... If one were to "look at the code," how would you even get started? Does VBA allow you to look at the assembly level code? Do we know for certain if the PRNG is the same as Emerald? i.e., the initial seed may start you somewhere in the middle of the series, but will the progression of the series be the same? If yes, then maybe searching through the code for "0x41C64E6D" would be a good starting point, no?
Quote:
 Originally Posted by Fat yayece (Post 2267024) When I say "progression of the series" I'm wondering if the order of the frames is the same. If yes, then it means that the equation to produce the next random number is the same as the other games. That would be an easy starting point since this equation is known. If the order of the frames is different in FR/LG, then the PRNG equation is different and I wouldn't know where to even start looking.
Hello yayece, and thank you for expressing your interest in this project!

To the best of my knowledge, all games except for Colosseum and XD use the same formula for the random number generator (seed × 41C64E6D + 6073). This is the process X-Act has listed in his article on PID generation, and I believe that loadingNOW has mentioned it prior to that. So I do believe that this equation, and by extension, the order of the frames, should be the same in all the handheld games. The initial seed generation is the only difference (besides frame advancement); for example, Emerald is always 0, Diamond, Pearl, and Platinum seed from the clock, and so on. As such, I believe "all" are looking for is the formula that generates the seed.

However, let it be known that I am no expert on code. My only "programming experience" has been with a simple "Hello world" application two years ago, and I have no knowledge of random number generators and such beyond what I have been told by X-Act, mingot, and so on. As such, when I say "look at the code", I have said all that I can; I do not know the specifics. I apologize if I have not answered your question. On a more interesting note, I have been poring over old research concerning the RNGs, and I found an interesting tidbit posted loadingNOW, which may prove vital to understanding the seeding process:

Quote:
 Originally Posted by Fat loadingNOW (Post 1452819) In fl it's basically like in emerald maybe you remember the gaussian plot in the original emerald article (sadly i don't have the graph anymore due to server problems) but this in fl this plot would be in 3D (x axis time in game, y axis time in menu, z axis time id). So it's not quite as predictable as emerald.
I have bolded the above, as it seems quite important. For one, it mentions the time spent in the menu once again. However, it also mentions the time in-game; this could change as you save the game (if you save on a different minute). Could this be the reason loadingNOW suggested earlier to save your game often in FireRed and LeafGreen? Also worth noting is the existence of a "time id". I have no idea what he is referring to here, but it seems quite possible that the seeding process involves an interplay between the three variables that loadingNOW mentioned above.

Of course, this is just my speculation, but it is a piece of the puzzle that I did not notice before. Hopefully it leads us in the right direction in figuring out the seeding process of FireRed and LeafGreen.

 Negator Oct 17th, 2009 10:24:39 AM

Just two cents:
Method3:
I had possible method3, but never encountered a SINGLE, therefore true method 3 spread.

Method2:
I've encountered some of those, but JUST as the very first catchable spread, generated from a new save state:
This means that so far, those spreads should just be some "wrong" ones, generated by the emulation errors.
Infact I'm sure that this is the only possible explanation, since so far I've never had a single wild pkm, which had a method 2 generated PID (infact checking just with x-act pid leaves the possibility of certain pid to be different methods, but the ones I checked so far, they were always method 4 or 1).

 Arseus Oct 17th, 2009 1:25:18 PM

Quote:
 Originally Posted by Fat negator (Post 2269524) Method3: I had possible method3, but never encountered a SINGLE, therefore true method 3 spread.
To the best of my knowledge, Equinox's method 3 Pokémon are the first instances of method 3 Pokémon to date. There were accounts of method 3 Pokémon in earlier topics, but the definition of method 3 has shifted since then; what was known as method 3 back then has been redefined as method 4.

Quote:
 Originally Posted by Fat negator (Post 2269524) Method2: I've encountered some of those, but JUST as the very first catchable spread, generated from a new save state: This means that so far, those spreads should just be some "wrong" ones, generated by the emulation errors. Infact I'm sure that this is the only possible explanation, since so far I've never had a single wild pkm, which had a method 2 generated PID (infact checking just with x-act pid leaves the possibility of certain pid to be different methods, but the ones I checked so far, they were always method 4 or 1).
I'm inclined to disagree. As listed in my list of wild Pokémon, I caught a wild Mankey with the PID of 7A293695. This PID is a result of its IVs and Nature (Lonely, 20/25/27/26/10/28), and according to X-Act's applet, it is only possible with method 2. This Mankey was caught on a legitimate cartridge (I do not recall if it was the first I caught), so it was certainly not an emulation error. I think it would be more likely that method 3 is the emulation error than method 2, if only because of its rarity. Regardless, more testing needs to be done before anything conclusive can be said.

On another note, I have updated the first post as promised. Equinox's information has been incorporated, in addition to the "new" quote from loadingNOW, and a new section has been added containing helpful links. This update will likely not mean much to those who have been following the topic since its inception (almost a week ago), but I feel it is important to keep the original post up-to-date with the discoveries in the thread.

 Equinox Oct 17th, 2009 4:45:07 PM

Later today I plan on trying to hit the same seed twice, the only problem is it is hard to know if you actually hit it, because unlike DPPtHGSS the frame continues to advance, so you dont hit the same frame everytime. Should I just focus on the spreads being within a certain number of frames close to eachother? Like maybe 10,000 or thereabout? Im really not sure how I should go about that...

 yayece Oct 18th, 2009 12:41:28 AM

Quote:
 Originally Posted by Fat Equinox (Post 2270377) Later today I plan on trying to hit the same seed twice, the only problem is it is hard to know if you actually hit it, because unlike DPPtHGSS the frame continues to advance, so you dont hit the same frame everytime. Should I just focus on the spreads being within a certain number of frames close to eachother? Like maybe 10,000 or thereabout? Im really not sure how I should go about that...
10,000 seems like too much... Assuming 60 frames/second, ~500ish should be a lot better if you keep your timing consistent. If you do this, it might be a good idea to do it ~100ish times and record the frame you get each time. If any of them are close, then you can guess that those had the same seed.

 Newts Oct 19th, 2009 6:47:03 AM

Not really yayece, 10,000 frames is only 2:45secs at 60 frames, and unless he knows whether or not his area falls into the 'noisy' category it could be even half that time. Just picking a comfortable number is going to the easiest way to go at these early stages.

I've recently restarted my LG game for the sole purpose of finding a way to get a nice spread on a shiny modest Moltres. So i got rather excited when i saw this thread as i now have others to help point me in the correct direction. If there is any way i can be of help beside just the random trial and error i'm already doing let me know.

 Equinox Oct 19th, 2009 6:27:07 PM

Quote:
 Originally Posted by Fat Newts_Ute (Post 2274279) Not really yayece, 10,000 frames is only 2:45secs at 60 frames, and unless he knows whether or not his area falls into the 'noisy' category it could be even half that time. Just picking a comfortable number is going to the easiest way to go at these early stages. I've recently restarted my LG game for the sole purpose of finding a way to get a nice spread on a shiny modest Moltres. So i got rather excited when i saw this thread as i now have others to help point me in the correct direction. If there is any way i can be of help beside just the random trial and error i'm already doing let me know.

Well, right now, its still nearly impossible to abuse without save states, and if you get a good spread, it will be hard to get a seed close enough to the spread. I would probably wait till more research is done but its all up to you, really...just throwing in my two cents.

 yayece Oct 19th, 2009 10:31:32 PM

Quote:
 Originally Posted by Fat Newts_Ute (Post 2274279) Not really yayece, 10,000 frames is only 2:45secs at 60 frames, and unless he knows whether or not his area falls into the 'noisy' category it could be even half that time. Just picking a comfortable number is going to the easiest way to go at these early stages.
Obviously, the point is to see if you can get the same seed twice. It's pretty much common sense that you'd try to minimize the variation on the number of frames that pass by. Therefore, the smart thing to do would be just to just sweet scent a pokemon ASAP after each reset. There's no sense in throwing in additional variation (by waiting upwards of ~2 minutes) to the experiment.

 Newts Oct 20th, 2009 5:00:44 AM

Quote:
 Originally Posted by Fat Equinox (Post 2275189) Well, right now, its still nearly impossible to abuse without save states, and if you get a good spread, it will be hard to get a seed close enough to the spread. I would probably wait till more research is done but its all up to you, really...just throwing in my two cents.

I'm not sure if you would call i success but I've had some luck with saving infront of Mewtwo. What I've been doing is starting emloop on some crazy high frame number as I SR, sweet scenting as soon as I enter the game to find my initial seed using Wichus RNG program, then using RNG reporter to find which frame i actually scented, then searching from shiny frames available on that seed, at a point further than im already at on emloop. (Hope that made sense)

Alot of big flaws though, your not guaranteed a decent spread on the seed you've hit, plus you only have the one chance to hit your frame before restarting the whole process. Although if you have the patience it is still more reliable than SRing for a random nature and IVs.

Quote:
 Originally Posted by Fat yayece (Post 2275684) Obviously, the point is to see if you can get the same seed twice. It's pretty much common sense that you'd try to minimize the variation on the number of frames that pass by. Therefore, the smart thing to do would be just to just sweet scent a pokemon ASAP after each reset. There's no sense in throwing in additional variation (by waiting upwards of ~2 minutes) to the experiment.
I disagree, button mashing is full of undesired variables, using a program such as emloop minimizes the inconsistencies as you have a visual and audible aid for when to scent. So setting it to a number such as 10,000 is quite comfortable and not rushed in any way. Although a lower number is quite usable if your giving yourself enough time to not rush yourself and make forced errors.

 Arseus Oct 20th, 2009 6:20:04 PM

Quote:
 Originally Posted by Fat Newts_Ute (Post 2274279) I've recently restarted my LG game for the sole purpose of finding a way to get a nice spread on a shiny modest Moltres. So i got rather excited when i saw this thread as i now have others to help point me in the correct direction. If there is any way i can be of help beside just the random trial and error i'm already doing let me know.
Hello Newts_Ute! I am glad that you were excited to find the thread, and that you also have an interest in helping. I have outlined all the research questions that I can think of (at the moment) in the first post, but much of our progress hinges upon figuring out how the game seeds. I echo Equinox in advising you to hold of on soft resetting until we figure this out; most "reactive" abuse is currently executed by those using emulators.

Quote:
 Originally Posted by Fat Newts_Ute (Post 2276145) I'm not sure if you would call i success but I've had some luck with saving infront of Mewtwo. What I've been doing is starting emloop on some crazy high frame number as I SR, sweet scenting as soon as I enter the game to find my initial seed using Wichus RNG program, then using RNG reporter to find which frame i actually scented, then searching from shiny frames available on that seed, at a point further than im already at on emloop. (Hope that made sense)
I think I understand your general procedure, but I am admittedly a tad confused by the Emloop bit. I get the rest of your procedure; finding your seed, then the frame, and finding available shiny spreads. You say that you put Emloop on some "crazy high frame number" when you soft reset, then search for shiny frames "at a point further than [you're] already at on Emloop". What exactly is the correlation between hitting your frame and the use of Emloop? I'm sorry if the explanation is terribly obvious, but it's just not clicking in my head for whatever reason.

Quote:
 Originally Posted by Fat Newts_Ute (Post 2276145) Alot of big flaws though, your not guaranteed a decent spread on the seed you've hit, plus you only have the one chance to hit your frame before restarting the whole process.
Indeed; you have pretty much hit the nail on the head as far as issues resetting on cartridges are concerned. Even once we have discovered how to hit a certain seed, we will still have to actually hit that seed each time, in addition to hitting the desired frame.

As for Equinox's same-seed adventures, I believe that I can see where both yayece and Newts_Ute are coming from. What yayece is saying is that you would want to get the seed as quickly as possible, in order to minimize the amount of frames that pass by. Newts_Ute advises to wait for a time to reset for, in an attempt to obtain more consistent results. I would personally say that their advice is best used in conjunction; try Sweet Scenting at the same time each attempt, but choose a low time to aim for. This is pretty much how I outlined the "calibration phase" in the RNG Manipulation of Wild Pokémon section of the Emerald RNG Abuse Guide; while the situation is somewhat different here, as we have the seed as another variable, I believe that the overall approach should be sound.

 Negator Oct 23rd, 2009 12:27:21 PM

some test result:
That "fast mode" as we call it showed up also on a sevii island, it would really be helpfull if some real cartrigde owner can figure out if it appears even there:
The how to shoule be very easy, since the tester should just get their seed, aim for a 10/15 minutes far spread, and at the supposed time, check if their outcome is close at the aimed target, or if it's far away (double the time far).
This should be done after changing location, for example, starting the game outside cerulean cave, going inside, and only then do the scenting.
While being in fast mode, I went for a target spread, but I end up with nothing, because instead of my target I got the even spread right after it... which just makes no sense...
This as I said before, happened twice, I should list the said spread just for the record later.
I've no clue of why this happened...
It's like the jolly spread I've recently abused on different pkm:
While it shows up as method 1 with scenting, while fishing it ends up being replaced by its method4 split, and not only in one location, but in diffirent ones, and from different save states.

 NeoSyrex Oct 24th, 2009 4:48:14 PM

Ugh, first of all I'm sorry to everyone who has been waiting for me to post info on FR/LG's RNG, I've been really busy (plus I got pretty burned out on the game after Worlds). Anyway, I didn't read everything that was posted so I'll just say everything I know about it (I bolded the parts that I felt were crucial for figuring out how to abuse the RNG):

Basically the way to abuse FR/LG's RNG is to catch a pokémon (for example Zapdos), check its IVs, and get the seed. Then go backwards through the RNG (using the reverse RNG formula on the seed) until you find your starting seed. I never figured out how the game creates it, but the starting seed is always going to be a 2 byte number so it doesn't really matter since the RNG rarely comes up with numbers that small (and when it does the offset is usually a giveaway as to whether its the starting seed or not). I made a program that can do this, its a simple DOS program I quickly made that I haven't had a chance to make look nice. If you guys want me to post it anyway, I can.

Continue doing this until you find a seed you land on often. Once you find a particular seed that seems to work for you, use RNGReporter to check if there are any spreads for the seed that you want. Finally, you need to correctly time the frame you enter the battle to match the corresponding spread.

This seems similar to the other RNGs (aside that the starting seed is harder to figure out), but there is one key factor that seperates it from the other RNGs: button presses on the title screen seem to influence the starting seed. So to get the seed you want you have to make sure that not only are you on the title screen for the correct amount of time, but you also press the A/start buttons the correct amount of times as well. And on top of that you need to enter the battle on the correct frame. Needless to say its quite tough.

 Arseus Oct 24th, 2009 8:47:40 PM

Why hello there, NeoSyrex!

Quote:
 Originally Posted by Fat NeoSyrex (Post 2284227) Basically the way to abuse FR/LG's RNG is to catch a Pokémon (for example Zapdos), check its IVs, and get the seed. Then go backwards through the RNG (using the reverse RNG formula on the seed) until you find your starting seed. I never figured out how the game creates it, but the starting seed is always going to be a 2 byte number so it doesn't really matter since the RNG rarely comes up with numbers that small (and when it does the offset is usually a giveaway as to whether its the starting seed or not). I made a program that can do this, its a simple DOS program I quickly made that I haven't had a chance to make look nice. If you guys want me to post it anyway, I can. Continue doing this until you find a seed you land on often. Once you find a particular seed that seems to work for you, use RNG Reporter to check if there are any spreads for the seed that you want. Finally, you need to correctly time the frame you enter the battle to match the corresponding spread. This seems similar to the other RNGs (aside that the starting seed is harder to figure out), but there is one key factor that seperates it from the other RNGs: button presses on the title screen seem to influence the starting seed. So to get the seed you want you have to make sure that not only are you on the title screen for the correct amount of time, but you also press the A/start buttons the correct amount of times as well. And on top of that you need to enter the battle on the correct frame. Needless to say its quite tough.
I had rather hoped that you had actually discovered how the games seed, but at least we have something new to work with. Now, let's see everything that we know of that could possibly affect the seed:
• Time in title screen
• Button presses in title screen
• Time in-game
• "Time ID"
However, it is important to note that you are the first user to hit the same seed twice. Have you been able to hit the same seed across multiple savegames? In other words, has the "seed you land on often" been the same even after saving, and doing it again? If so, then "time in-game" may not be a factor after all. However, I suppose further testing is still required. I still have no idea as to what time ID is supposed to be, or if it's even a factor; it could have meant the PID received at a certain time for all I know. I suppose we're still waiting for someone who can look into the code of the game to clear this up, but at least we seem to be getting closer!

As for your program NeoSyrex, I suppose it could not hurt to post it here for the time being, and I will add it to the list of helpful links in the first post. At the very least, it could be a nice starting point for mingot, who will hopefully be able to incorporate FireRed/LeafGreen features into RNG Reporter (once we know more about the RNG that is).

Now, negator, I don't think anybody is currently researching "noisy" and "quiet" areas, but I'll add your specific question to the main post so that whoever does decide to pick up that type of research will not miss it. Also, I'm not quite sure as to what to say concerning your oddities with wild Pokémon. Is it possible that while aiming for your target spread, some unknown action that you took caused the RNG to switch from even to odd? I can't really see how this would make sense if you just stood there and used Sweet Scent though... This whole RNG thing is quite confusing, it really is.

 chrish Oct 25th, 2009 8:20:47 PM

Exact duplicate Mewtwo

We got an exact duplicate Mewtwo (nature, IVs, seed, PID, SID, Methods) in 14 tries using the following approach:

NOTES:
We saved the game directly in front of Mewtwo (before starting test)
We used a metronome set to 2 beats/second
We always started with a hard reset
TIME: 23:07 (from the CONTINUE screen, i.e. game play time)

We executed the following button presses at the following beat counts (we always made sure that we allowed enough beats so that we were never rushed to trigger the next step in the sequence)

Beat Count (cumulative) at each step (game event)
------------------------------------------------
0 Switched the game on in sync with the metronome
70 Pressed the Start button on the title screen
80 Pressed A on the Continue screen
160 Pressed A in front of Mewtwo
170 Pressed A after "Mew" is displayed
190 Pressed A after "Wild MEWTWO appeared!" is displayed

Data on the duplicate Mewtwo (we also have information on the 12 non matching data points):

Nature: Careful
IVs: 29/0/26/16/4/12

We got these 3 results from RNG Reporter 7.10 (IVs to PID/Seed dialog)

Method: 1
Seed: F135D0B
PID: C7C68E22
SID: 18912

Method: 2
Seed: 7302B09B
PID: EBECBCD6
SID: 22328

Method: 4
Seed: CFD60409
PID: 46651B50
SID: 23856

We intend to refine our results as follows (please feel free to suggest superior alternatives or to help out!)
1) We will repeat our initial experiment a significant number of times (50-100) and see how many duplicates we get and record our results.
2) We will verify that a soft reset behaves the same as a hard reset
3) We will vary each interval in turn in order to try and determine which intervals are relevant.

All times are GMT -4. The time now is 6:00:39 AM.

This forum runs vBulletin (with many modifications!) © 2000-2013, Jelsoft Enterprises Ltd.