Touhou Puppet Play Forums

Touhou Puppet Play => ROM Hacks + General Discussion => Topic started by: DoctorShanks on September 04, 2013, 07:19:55 PM

Title: RNG manipulation thread
Post by: DoctorShanks on September 04, 2013, 07:19:55 PM
I should also post here, for those interested, that I've started to RNG abuse wilds on 1.812 official.

(http://i443.photobucket.com/albums/qq154/DoctorShanks/Touhoumon1812RenkoVersion_02_zps696b885d.png)

(http://i443.photobucket.com/albums/qq154/DoctorShanks/Touhoumon1812RenkoVersion_03_zpsa04fa60c.png)

(http://i443.photobucket.com/albums/qq154/DoctorShanks/Touhoumon1812RenkoVersion_01_zps006a0d6a.png)

I promised that I would post a guide soon. So I guess I'll get on that someday. When I do, I'll have edited the OP of this thread.
Title: Re: RNG abuse thread
Post by: artsandcrafts on September 12, 2013, 09:37:13 PM
I should also post here, for those interested, that I've started to RNG abuse wilds on 1.812 official.

Is that a tool that shows stats or did you edit those pictures yourself?
Title: Re: RNG abuse thread
Post by: DoctorShanks on September 13, 2013, 02:10:59 AM
I should also post here, for those interested, that I've started to RNG abuse wilds on 1.812 official.

Is that a tool that shows stats or did you edit those pictures yourself?

It's a tool that shows stats. This guy on Youtube (http://www.youtube.com/channel/UCywDeDRmmFKpiApl3vszQaA) shows the program and the things needed to get started on this.

I've also put together everything you'll need in order to do this in a single download. (http://www.mediafire.com/?q9v0pnb8zd25eij) This should contain the special VBA, and the Japanese FRLG Lua script. I might write a more in-depth guide later, but this guy pretty much tells you everything you need to know. He's active at the moment so he'll probably be accepting questions.

Title: Re: RNG abuse thread
Post by: Enoh-polyx on September 13, 2013, 06:31:21 PM
WOW that's really intresting :). A year ago, I was really into RNG in pokemon, which was really challenging, but I really liked it. A guilde for gen III would be appreciated!
Title: Re: RNG abuse thread
Post by: artsandcrafts on September 14, 2013, 12:00:57 AM
Just to make sure, does this script works with agastya's current emerald version?

I am also unaware on how to use lua scripts, but I can probably figure it out.
Title: Re: RNG abuse thread
Post by: DoctorShanks on September 14, 2013, 12:57:26 AM
Just to make sure, does this script works with agastya's current emerald version?

I am also unaware on how to use lua scripts, but I can probably figure it out.

There's an Emerald script, and it shows encounters, but I don't know where the chosen seed is stored in Emerald (mostly because no one ever needed to figure this out since in vanilla Emerald, it's always 0), so until I get off my ass and find it, then I can't get it to work. To clarify, Agastya's Emerald uses a fixed RNG, so the seed won't always be 0. This might be seen as bad news, but more seeds means more spreads, and with Synchronize, finding perfect spreads will be a TON easier than FR.

Should be obvious, though I missed it, the latest version of RNG reporter is required to do any of this science.
Title: Re: RNG abuse thread
Post by: Agastya on September 18, 2013, 05:57:45 AM
http://www.pokecommunity.com/showthread.php?t=217115 here's the rng fix i used, have fun shanks
Title: Re: RNG abuse thread
Post by: DoctorShanks on September 19, 2013, 03:27:33 AM
The RNG reporter behaves all wonky with this Emerald RNG fix Patch. I'll share my findings here.

So I "sort of" found where the "Initial Seed" is on Emerald. I accidentally found this out by setting the Real Time Clock to "off" So that the game would think the internal battery would run dry, and if it's anything like R/S, the initial seed would be 5A0 this way. It was. So for no reason other than sheer desperation and curiosity, I paused the game, reset it, and mashed CTRL+N until I noticed that the Lua Script showed me "5A0" on frame 13. So much for blindly looking in the memory viewer.

I switched back on the "Real Time Clock," and I advanced to frame 13 a few times. On each reset it, gave me a different 4 digit hexadecimal number. When I got in game, I Sweet Scented as soon as I could. I looked up the encountered puppet's spread in RNG reporter under Method 2, and it gave me a matching spread that was 319 frames away. Horray! Right? No. Just to be sure, I checked the spread on the next frame, and it didn't give me a match under Method 2, but rather, it gave me a matching spread under Method 4, this time 280 frames away. So, yeah.

In conclusion, I don't know man. I'm guessing that it's an entirely new method; one that RNG reporter doesn't support because vanilla Pokemon Emerald's RNG is broken, and that's the one everyone is focusing on. So unless someone does research into how spreads are chosen with this RNG fix patch, then RNG abuse is just about impossible on Agastya's Emerald version. UPDATE: Apparently some dumbass named DoctorShanks forgot that Wilds are generated on Method H. Everything adds up neatly, but I still don't know why it's fluctuating between Method H-2 and Method H-4.

There's a good chance I'm wrong because what do I know about the internal mechanics of video games

EDIT: I haven't tried to abuse the supposed Method 1 (interaction) puppets yet. I think all my interactions are used up on my main save, though, so if someone else wants to test this for me that'd be much appreciated.
Title: Re: RNG abuse thread
Post by: DoctorShanks on September 19, 2013, 06:38:04 PM
Disregard the above post entirely. I'll share my new findings and embarrassing re-discoveries.

All wilds on Emerald are generated by Method H-2. On occasion, some wilds will be generated on Method H-4. According to Smogon,

"The vast majority of wild Pokémon are generated via method 2; there are a few anomalies which are generated by method 4. A method 4 spread resembles a combination of two method 2 spreads, not unlike split spreads in breeding. When a method 4 spread occurs, the game chooses to generate the first half of the Pokémon's IVs in the same place as it would generate the first half of the IVs from the previous method 2 spread; this would be an unused RNG call for a regular method 2 spread. However, by generating IVs at this call, a method 4 Pokémon will share the first half of its IVs (and the last four hex digits of its PID) with the method 2 spread that preceded it. What you need to know for RNG manipulation is that the natures and IVs for method 2 Pokémon on any given frame are different from those that are generated by other methods. Additionally, if a Pokémon emerges with an unlisted "split" spread, it is likely a product of method 4 rearing its head".

When I tried fishing, the wilds were most often generated by Method H-1, and of course, some were generated on Method H-4.

So I guess, for Emerald, there's only a chance that you'll get your desired spread. While it is still a good chance, and it's good to know that it's possible to do on Emerald, it unfortunately isn't a 100% guarantee like Fire Red is. The good news is that Emerald uses the Nature+Synchronize mechanic, so if you're feeling particularly lucky, you'd probably spend less time looking for a flawless spread in Emerald than you would be in FR, but you'd have to pray that your frame didn't end up on Method H-4.

Some more good news is that RNGing Shinies is pretty much 100% possible on Emerald, so if that's what you were after, then have fun.
Title: Re: RNG abuse thread
Post by: 2Points on September 19, 2013, 07:08:16 PM
Well, the Youtube guy you talked about earlier says in one of his videos that he succeeds most of the time with method H-4, but occasionally has to switch to H-3 (or maybe it was H-2 as you said, I can't remember right now). So, fixing the RNG LUA script for Emerald is just a matter of changing the memory address where the seed is read from?

P.S.: Please don't use the blue Cat of Ill Omen as sample next time...
Title: Re: RNG abuse thread
Post by: DoctorShanks on September 19, 2013, 07:28:14 PM
The Lua Script I use for Emerald is on the 8th post in this thread. (http://projectpokemon.org/forums/showthread.php?16681-Gen-3-Lua-Scripts) Sorry, I forgot to mention that earlier.
Title: Re: RNG abuse thread
Post by: 2Points on September 19, 2013, 08:35:36 PM
Well, guess I'm not cut out for this after all. I'm supposed to enter some starting frame and some seed the LUA script spit out for this frame into RNGReporter and click on Generate after I filled out the trainer ID and SID and selected the method, right? Afterwards, if I encounter some Touhou and copy its IV values into the filter, I should find the frame where this particular Touhou is supposed to appear, right? For some reason, no frame ever turns up, no matter which method is selected.

This isn't to say that simply seeing a wild Touhou's IVs via LUA isn't extremely handy when trying to catch some good base materials.
Title: Re: RNG abuse thread
Post by: DoctorShanks on September 19, 2013, 08:38:44 PM
Forget starting frame. When I use Fire Red JP, the actual Frame hit is almost always lower than the actual frame I used Sweet Scent on, and it fluctuates wildly with each reset. Simply adjust accordingly.

When I use Emerald, the difference seems to be exactly 260 above the frame when I use Sweet Scent, but that's just me. The Youtube guy seems to have a difference of 280 (but that could be because he was in a cave?)

On another note, I'm making good progress in Emerald. That guide will be written soon, and I'll have some Emerald information to go with it as well.
Title: Re: RNG abuse thread
Post by: DoctorShanks on September 19, 2013, 09:24:58 PM
(http://i443.photobucket.com/albums/qq154/DoctorShanks/TouhoumonEmerald18_02_zps42422edb.png)
(http://i443.photobucket.com/albums/qq154/DoctorShanks/TouhoumonEmerald18_04_zpsec326609.png)
(http://i443.photobucket.com/albums/qq154/DoctorShanks/TouhoumonEmerald18_03_zpsa88ab6f0.png)

Let's just say that I "sort of" have RNGing figured out in Emerald.

For those of you who wish to do this before I write out the guide, I'll post my findings here.

-Method H-2 and Method H-4 are what's used in Wild encounters (or at least, for Sweet Scenting)
-Method H-1 and Method H-4 are what's used in Fishing encounters (or at least, for Super Rod)
-It seems to be unpredictable on whether the frame is one method or the other. Smogon says you should bet on H2, but for now, I'm just going to say that you have about a 50/50 chance of getting your spread when you land on your target frame.
-Fire red is MUCH more reliable and MUCH easier to get your desired seed, but Emerald can save a bit more time with Synchronize. Pick your Poison if applicable.

-To figure out your initial seed, hit CTRL+P to pause THPP Emerald, hit CTRL+R to reset it, and then use CTRL+N to slowly advance the frame until you see a four-digit number (usually shows up on Frame 9-13). to The 4 digit hexadecimal number shown on that frame is your seed that you must enter into the RNG Reporter.
-When using Synchronize (Recommended), enter the Synch nature you're using in the drop down box located under Method and Encounter type.

The Emerald Lua script can be found in the 8th post of this thread. (http://projectpokemon.org/forums/showthread.php?16681-Gen-3-Lua-Scripts)
Title: Re: RNG abuse thread
Post by: DoctorShanks on September 20, 2013, 05:57:58 AM
(http://i443.photobucket.com/albums/qq154/DoctorShanks/TouhoumonEmerald18_01_zps4d549038.png)

Eggs are a lot easier than I had anticipated. You basically follow the same procedure explained in this Smogon article (http://www.smogon.com/ingame/rng/emerald_rng_part1), with a few differences... I'll explain below.

-Obviously, THPP Emerald uses a "Fixed RNG," which means that the Initial Seed is not always Zero.
-Your Initial Seed, as always, is decided based on your in-game clock. With a dead battery, this seed will always be 5A0, but when using the Emerald Lua Script, your Initial Seed appears in plain sight on Frame 6 to 13 for those of you who don't want to turn off the Real Time Clock. Enter your Initial Seed into RNG Reporter in the Seed (Hex) field.
-In my personal experiences, all of my eggs have either been generated on Emerald Splits "Split" spreads (never normal), or Emerald Alternate spreads. It might be different for you.
-Saving in front of the day care man and immediately talking to him to get to the "take good care of it" dialogue gives me an 8 frame offset. So, for example, if my target frame was 25622, I would press A on frame 25630, and my egg will always have the desired spread. Those of you using a different version of VBA rerecording will likely have different numbers than me, as evidenced by 2Points and their experiences.

All other relevant information should be listed in the Smogon article for 3rd gen breeding.
Title: Re: RNG abuse thread
Post by: 2Points on September 20, 2013, 08:26:15 AM
-To figure out your initial seed, hit CTRL+P to pause THPP Emerald, hit CTRL+R to reset it, and then use CTRL+N to advance the frame to exactly Frame 13. The 4 digit hexadecimal number shown on Frame 13 is your seed that you must enter into the RNG Reporter.

Ah, I see. This makes things much clearer - the seed is supposed to be four digits long. I have been confused for a while because whenever I forwarded to frame 13, the seed displayed was eight digits long. Now, after a bit of pondering, I found that this was because I was using the latest available VBA-rr relase - v24r440, while you're using v22. Here, the seed comes around at frame 6, for whatever reason.

I also found that using the Lua script posted on page two of the aforementioned thread (post 16) uses a different approach to counting frames (the poster is talking about "RNG frames" instead of video frames) that seems to be much more reliable. Instead of using the frame numbers that VBA-rr shows in its head-up display, you simply rely on the frame that is printed by the Lua script. So, following this approach, the seed appears at RNG frame 5 in my version. If you run the emulator for a bit, the actual video frame and the RNG frame deviate after a short while. For example, at video frame 8865, the RNG frame is already at 9497. This RNG frame, however, seems to correspond exactly with the frame number that is listed by RNGReporter.

Using CMinoriko and Nature Power, the duration of the animation seems to be exactly 257 frames for me (outside, if that matters). So, it might be reasonable to suggest that everyone else does some counting for himself instead of relying on numbers others found.

Getting something decent is still hard (well, if restarting the emulator and waiting counts as hard), unless you limit your IVs to two or three.
Title: Re: RNG abuse thread
Post by: SG-Sanae on September 21, 2013, 05:29:45 PM
Small question: Does the RNG tool help me find a frame at which throwing a Pokéball will guarantee me a capture?
Title: Re: RNG abuse thread
Post by: DoctorShanks on September 21, 2013, 05:33:39 PM
Small question: Does the RNG tool help me find a frame at which throwing a Pokéball will guarantee me a capture?

I dunno. If there is then I don't see it. Make a save state at the start of the battle so that if you fail the capture, you can try again and again.
Title: Re: RNG abuse thread
Post by: DoctorShanks on September 24, 2013, 07:50:37 PM
Recently I've been having a problem with Methods jumping around for Fire Red wilds. This has never happened to me before, and I'm trying to find out what I'm doing differently. I've even forgotten what method I've normally been using. I think it was Method H-4, but for some reason it's jumping between all three. Does anyone else have this problem?

Disregard. I've been consistently hitting method H-1 spreads on Fire Red with the occasional H-4 here and there; nothing too frustrating.
Title: Re: RNG abuse thread
Post by: ZXNova on October 11, 2013, 05:38:42 PM
Is there some sort of encounter table for the puppets in this game?
Or is there some other way to know a puppets encounter slots?
Title: Re: RNG abuse thread
Post by: DoctorShanks on October 11, 2013, 06:18:24 PM
Is there some sort of encounter table for the puppets in this game?
Or is there some other way to know a puppets encounter slots?

I've been using AdvanceMap to find out my Encounter Slots. If you want to go with that, just be careful not to save the ROM.

Maybe i'll put together a list of the Encounter Slots for FR someday.
Title: Re: RNG manipulation thread
Post by: ZXNova on October 16, 2013, 01:34:48 AM
I've been doing it the old fashion kind of way, I know the encounter table for the puppets on in Meteor Falls 1F, at least. http://i.imgur.com/lM5jGf0.png
Title: Re: RNG manipulation thread
Post by: Maltie on October 30, 2013, 09:21:47 PM
Wow... That CKogasa... Just... Wow.
Why can't all boneka be like that?