Consistent Trainer ID Manipulation in GSC

Post Reply
entrpntr
Pokémon Trainer
Posts: 141
Joined: Wed Feb 04, 2015 11:22 pm

Consistent Trainer ID Manipulation in GSC

Post by entrpntr » Tue Mar 08, 2016 2:29 am

I've posted about this in the discord, but I recently was looking into a console setup for manipulating a Trainer ID for Gold Any%, and with the help of gifvex, I found an extremely consistent way to hit specific Trainer IDs.


Demonstration/Tutorial

You can see a tutorial VOD posted here; that's probably the best starting point to understand what's going on, but I'll spell things out in a lot more detail below (including an even more consistent method than the one shown in the VOD).


Background

This was built off the work of VaultButler and UnderscorePoY (perhaps others?), who helped me understand the setups they had been using. The basic idea remains the same:
  1. Remove save file (**EDIT: see bolded note at bottom.)
  2. Hard Reset and hold A thru opening cutscenes to get same RNG each reset
  3. New TID is generated every frame and is set when New Game is selected (TID can be +/- 1 due to hardware idiosyncrasies)
From there you search for a TID that works (see here for more info) and set up a timing to hit the desired frame. VaultButler and Underscore had a setup where they start EonTimer on hard reset, set the options, return to the main menu, and select New Game on the final beep to hit their desired TIDs. I had originally done this for console to find a working TID; I believe all 3 of us maxed out at about a 20% success rate with this method.


New findings/method

When looking into something else related to Trainer IDs, gifvex noticed a peculiarity in the opening menus. It turns out the New Game menu runs at 15 frames per second, meaning inputs are only registered every 4 frames. The Options menu runs at 20 frames per second, meaning inputs on that screen are only registered every 3 frames. With this knowledge, hitting a specific TID is actually a much easier proposition than hitting a specific frame at 60 frames per second.

The new method starts the same way as the old one (remove save file, hard reset and hold A thru opening cutscenes). From there, you can take two approaches, with differing degrees of consistency/difficulty:


[1] Set options before New Game (maxes at ~75% consistency?)

Set up two timings in EonTimer:
  • Start EonTimer on hard reset
  • Press A to enter Options menu on first set of beeps
  • Press B to close Options menu on second set of beeps
  • Buffer A input to frame perfectly select New Game
This is basically hitting a 4-frame window followed by 3-frame window (you get audio feedback that helps indicate whether you hit the first window; second window is a bit trickier to nail).


[2] Set options in-game (maxes at ~90% consistency?)

Set up one timing in EonTimer:
  • Start EonTimer on hard reset, press New Game on final beep to hit desired frame
This wastes time because you have to select options in-game; you can be extremely conservative and check your TID immediately (and set options afterwards) for a moderate time loss, or you can wait until after checking Toto's stats for a slight time loss. In both cases, you will have to go through the first minute or two of the game holding B on textboxes to get fast text.

Though it has drawbacks, this is an extremely consistent approach, since you basically only have to hit one 4-frame window. It's important to note that this skips over many possible TIDs, due to the 4 frame rule in effect on the main menu.


Console setup for Gold Any% (TID 63930 +/- 1, F9/D9 Toto)

The main console setup I have worked on so far is using the first approach to establish timings to get the first usable TID I was able to find from testing. This was useful since it is technically the fastest approach for RTA, but I'm starting to think setting options in-game may be the better approach for most people. I may look into finding if this or another TID works for the second approach, but others can feel free to undertake that task.

In any event, Kylovic was able to replicate my setup, so any TID manipulation setup should at minimum be working across all consoles that use Gold carts with non-dead batteries (still unsure what happens with a dead battery).

Setup:
  • Configure EonTimer with two timings (ones I am currently using, in milliseconds: 10900, 5282; these are volatile as I'm not necessarily done calibrating, but they should be close).
  • Hard reset with Start+B+X (GCN only) at the same time you start EonTimer.
  • Press A to enter Options menu on first set of beeps
  • Press B to close Options menu on second set of beeps
  • Buffer A input to frame perfectly select New Game
EonTimer screenshot: http://i.imgur.com/s1eopvy.png
EonTimer download: http://www.smogon.com/forums/threads/eo ... mer.81513/



Miscellaneous Notes
  • **EDIT: Dabomstew has pointed out to me that after clearing a save, the first time you press New Game, you'll have a completely different TID list than normal. From then on, each New Game press will produce the normal list.
  • The most important thing is to make sure you have a consistent timing method. If you aren't starting EonTimer at the same time you are hard resetting, your results are going to be wildly inconsistent (moreso with the 2-timings approach).
  • Other console runners may need to modify their times slightly to get the timings right for their setups. You can hit New Game using the first of the two timings and check to make sure you are in the middle of a 4-frame window (should be getting 1 TID ~90% of the time), then adjust the second timing until you are getting consistent results. Of course, this becomes simpler if doing the second approach, where only one timing is at play.
  • To find an F8/D8 Totodile on console, you may have to search for TIDs on your own by playing around with many different timings. I suggest changing things in multiples of 1 frame (~16.74 milliseconds) and running a few trials to see what TIDs are showing up at each timing configuration.
  • TIDs appear to be different between console, BGB, and BGB+bootrom, so different adjustments will be needed for emu runners. The manipulation should also work on Gambatte and Bizhawk with different timings, but these are not allowed for Gold Any% due to emulation inaccuracies.
  • VaultButler (~10.045s, TID 55369) and UnderscorePoY (~15.01s, TID 63635) both have F8/D8 Totodiles in their BGB setups, which could be adjusted for this method.
  • Lastly, besides Gold Any%, I have one pipe dream application of this: Lucky ID Manip for early Master Ball (especially in Crystal). Someone please solve this, preferably for Kenya (OTID = 01001), thank you :D.
Last edited by entrpntr on Tue Mar 08, 2016 1:27 pm, edited 2 times in total.

entrpntr
Pokémon Trainer
Posts: 141
Joined: Wed Feb 04, 2015 11:22 pm

Re: Consistent Trainer ID Manipulation in GSC

Post by entrpntr » Tue Mar 08, 2016 5:57 am

entrpntr wrote:I may look into finding if this or another TID works for the second approach, but others can feel free to undertake that task.
Took a quick look, and the 63930 TID is one of the IDs that shows up on console using the simpler method that doesn't enter the Options menu. Somewhere around ~16.885s **EDIT: An offset of 16.860s after the Start+B+X hard reset was working pretty consistently for me but I only gave it 5 or so resets. This looked to be a 6.5 - 7.0 second wait from when you can first hit New Game, so there is a decent chance there's usable TID that comes earlier than this one.

The immediate feedback I got was that this method is so ridiculously easy and consistent and has almost no learning curve, so I'd say this is definitely the way to go if you're starting out. If you're posting competitive times and want to reclaim a few seconds, you can look into the approach that uses two timings, but there will likely be a modest trade-off of consistency.
Last edited by entrpntr on Thu Mar 10, 2016 3:45 am, edited 1 time in total.

User avatar
Dabomstew
Site Admin
Posts: 161
Joined: Fri Apr 11, 2014 3:26 am

Re: Consistent Trainer ID Manipulation in GSC

Post by Dabomstew » Tue Mar 08, 2016 9:29 am

Usable setup for BGB with GBC bios (single input timing):

Clear your save and have New Game pressed at least once after the save clear as usual. Setup EonTimer with a delay of about 8050ms (see entr's post) or use LiveSplit with a delay of around -8.15 to -8.2 seconds (for me, at least, it takes longer to react visually than it does to the audio rhythm so I end up overcompensating). Press your hard reset button for BGB and start EonTimer/LiveSplit at the same time, buffer into NG screen, then hit New Game when the countdown is over. Make sure to hold B during the intro text to make it scroll at Fast speed as you don't have time to set your options with this timing.

The TID you should hit is 55795. Once you've seen that you've hit it, change your options as necessary and continue on with the run. If you missed it, you can see below for a table of trainer IDs immediately before/after the target ID to know if you were early or late.

Early Frames (each RNG frame here is 4 GameBoy frames or about 67ms):
-5: 36571
-4: 33328
-3: 20393
-2: 62791
-1: 31242

55795 (Target Frame)

Late Frames
+1: 04352
+2: 09522
+3: 05513
+4: 57350
+5: 33959

Advanced users probably want to use a two-input setup so they can set options before the RTA timer for the run starts. But this should work for newcomers/lazy people that don't want to bother practicing a two-input setup.

User avatar
Dabomstew
Site Admin
Posts: 161
Joined: Fri Apr 11, 2014 3:26 am

Re: Consistent Trainer ID Manipulation in GSC

Post by Dabomstew » Wed Mar 09, 2016 3:01 am

100% consistent D8 Trainer ID manip for BGB with GBC bios thanks to UnderscorePoY:

1) Clear save (before each set of runs, you don't need to do this for every individual run)
2) Hard reset
3) Hold B+Start until titlescreen appears and disappears again
4) Hold A until New Game is pressed
5) Enjoy 55531 working Gold Any% Trainer ID

D8 ids such as 55531 are a little slower than D9 IDs such as 55795 but the difference is pretty small and this is a 100% manip unless you fail at buffering inputs during massive frame windows... Sadly it doesn't work on any other platform (even BGB without GBC bios) but PoY is still a god for finding it.

User avatar
Sinstar
Jr. Trainer
Posts: 92
Joined: Thu Apr 24, 2014 12:35 am

Re: Consistent Trainer ID Manipulation in GSC

Post by Sinstar » Wed Mar 09, 2016 7:59 pm

Edit:scrap this on mobile failed to read clearly
Kappa Kappa Kappa Kappa

entrpntr
Pokémon Trainer
Posts: 141
Joined: Wed Feb 04, 2015 11:22 pm

Re: Consistent Trainer ID Manipulation in GSC

Post by entrpntr » Tue Mar 22, 2016 4:54 am

entrpntr wrote:Took a quick look, and the 63930 TID is one of the IDs that shows up on console using the simpler method that doesn't enter the Options menu. An offset of 16.860s after the Start+B+X hard reset was working pretty consistently for me. This looked to be a 6.5 - 7.0 second wait from when you can first hit New Game, so there is a decent chance there's usable TID that comes earlier than this one.
Got around to testing to see if I could find an earlier TID on console; using the simple (1-timing) method, the earliest working TID (55774) shows up around ~13.712s. This is an F9/D9 Trainer ID, so it's probably going to be the best TID for console runners to aim for.

I didn't try to find a 2-timing setup, but there is definitely enough free time to make one possible without too much of a rush. That said, I've been well over 95% at hitting TIDs with the simpler method, which is far better than I was expecting. From these results, I'm just about convinced the 1-timing method is more practical for all runners (barring a 2-timing setup that is significantly more consistent than it presently is).

In case anyone is interested, here is a list of all TIDs you can hit with the 1-timing method up until the 55774 TID. The only way I can think of to find an earlier, equally consistent TID on console would involve backing out of the New Game Menu and re-entering 1 or 2 times (both inputs can be buffered); I'm not planning on digging into this, but it certainly is an option, if anyone else is curious enough to look further into the idea.

Post Reply

Return to “Generation 2”

Who is online

Users browsing this forum: No registered users and 1 guest