Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Generation I Glitch Discussion

Glitch traders in Pokémon Red (TraderDex) - work in progress - Page 1

Glitch traders in Pokémon Red (TraderDex) - work in progress

Posted by: Torchickens
Date: 2016-01-30 15:12:30
This came as an idea when I was thinking about how in addition to plain text ($00), Pokémon Centers ($FF), PokéMarts ($FE), texts use the $08 function to execute scripts, and how with text pointer manipulation you can execute your own scripts such as the one that gives you Eevee as a gift Pokémon.

Every trade NPC has his or her own ID. I found a way to be able to manipulate it as such:

1) Enter the trader's house in the house on Route 2.
2) In BGB debugger, go to Debug>Breakpoints and add a breakpoint for PC=0:2992 (this is where the beginning of text scripts are stored into hl)
3) Talk to the trader and BGB should break before his text is printed.
4) Save a state and add another breakpoint; PC=any, A=$0001 ('a' represents the trader ID).
5) Disable the PC=0:2992 breakpoint.
6) Do Run>Trace (or hold F7) until the program counter points to ld (CD3D),a
7) Save a state here.
8) Now, right click on af=0100 and click "edit register". Enter the new value as XX00, where XX is the trade ID you want, with values 0A and up being glitch traders.
9) You may receive glitch text that doesn't mention what the trader wants and what you will receive, but regardless; a Yes/No box should appear.
10) Select yes and observe the memory:

The memory address CD0F tells you the Pokémon you need to trade.
The memory addresses CD34, D11E tell you which Pokémon you will receive in return.

11) Now simply change D164 (party Pokémon 1 to match CD0F) and you will be able to trade with the glitch trader to get the Pokémon that could be predicted with CD34, D11E after you wait for a Yes/No box to appear, unless their text freezes the game.

You can view the bytes for its exact nickname by tracking D2EC-D2F6 (nickname for your sixth party Pokémon because the Pokémon you receive moves to slot 6).

Alternatively, here is a way to theoretically trade with glitch traders without a cheating device or BGB debugger:

1) Using arbitrary code execution, we should be able to run a custom script. We could possibly work on this to represent it as items and quantities.

ld a, $(text ID)
ld [W_WHICHTRADE], a
ld a, $54
call Predef
jp TextScriptEnd

[W_WHICHTRADE] = CD3D
Predef pointer = 3E6D
TextScriptEnd pointer = 24D7

It would be good if somehow there was a sure way to avoid the freezing glitch dialog some glitch traders can bring up.

If you want to do this in Pokémon Yellow, the equivalent breakpoint should be 0:2882. I do not know the equivalent pointers for creating an arbitrary code method and the relevant predefined command if it uses one as of yet, sadly.

These are valid traders:

00 - Wants Nidorino for Nidorina - Name "TERRY"
01 - Wants Abra for Mr. Mime - Name "MARCEL"
02 - Wants Butterfree for Beedrill - Name "CHIKUCHIKU" (UNUSED!)
03 - Wants Ponyta for Seel - Name "SAILOR"
04 - Wants Spearow for Farfetch'd - Name "DUX"
05 - Wants Slowbro for Lickitung - Name "MARC"
06 - Wants Poliwhirl for Jynx - Name "LOLA"
07 - Wants Raichu for Electrode - Name "DORIS"
08 - Wants Venonat for Tangela - Name "CRINKLES"
09 - Wants Nidoran for Nidoran - Name "SPOT"



Glitch traders list:

0A - Wants AF Missingno., gives you glitch Pokémon EA, nickname was " 6 ".
0B - Wants 5C Horsea, gives you glitch Pokémon F1. Sadly their text seemed to lock up the game after the trade. - Seems like this glitch trader is into Glitzer Popping!
0C - Wants B8 Missingno., gives you 3E Missingno. Nickname was "4S M".
0D - Wants glitch Pokémon CD, gives you 87 Missingno. Nickname was " 4".
0E - Wants 06 Voltorb, gives you 01 Rhydon. Sadly their text seemed to lock up the game after the trade.
0F - Wants 92 Missingno., gives you glitch Pokémon CF. Nickname was "4 T Y".
10 - Wants glitch Pokémon CD, gives you 6D Paras. Sadly their text seemed to lock up the game after the trade.
11 - Wants glitch Pokémon EA, gives you 91 Marowak. Nickname was "p".
12 - Wants 80 Golduck, gives you glitch Pokémon EA. Nickname was "TRAINER SLOWPOKE".
13 - Wants 50 Missingno., gives you 50 Missingno. Nickname was "U".
14 - Wants 50 Missingno., gives you 50 Missingno. Nickname was "CHIKUCHISLOWPOKE". - Note: This glitch Trainer coincidentally had "x' y" in their text like the interesting text pointer effect shown at AGDQ 2016's Pokémon glitch exhibition.
15 - Wants 8A Kingler, gives you 94 Abra. Nickname was "d". "x' y" text appeared in Trainer's text again.
16 - Wants 50 Missingno., gives you 50 Missingno.  "x' y" text appeared in Trainer's text again. Nickname was "DUX", with glitch characters preceding it.
17 - Wants 50 Missingno., gives you 50 Missingno. "x' y" text appeared in Trainer's text again. Nickname was glitch characters.
18 - Wants 50 Missingno., gives you 50 Missingno. "x' y" text appeared in Trainer's text again. Nickname was "LOLA", with glitch characters preceding it.
19 - Wants 50 Missingno., gives you 50 Missingno.  "x' y" text appeared in Trainer's text again. Nickname appeared as many blank spaces.
1A - Wants 50 Missingno., gives you 50 Missingno.  "x' y" text appeared in Trainer's text again. Nickname appeared as "CRINKLES", with glitch characters preceding it and 9s/glitch characters following it.
1B - Wants 50 Missingno., gives you 50 Missingno.  "x' y" text appeared in Trainer's text again. Nickname appeared as "p 6", with 9s/glitch characters following it.
1C - Wants 50 Missingno., gives you 50 Missingno.  "x' y" text appeared in Trainer's text again. Nickname appeared as "p 6", with 9s/glitch characters following it. (again)
1D - Wants glitch Pokémon F5, gives you glitch Pokémon CD. Nickname appeared as "TM ;TM4 KE".
1E - Wants glitch Pokémon FA, gives you 91 Marowak. Nickname appeared as "y 4S M".
1F - Wants 01 Rhydon, gives you 2C Hitmonchan. Nickname appeared as "H ".
20 - Wants glitch Pokémon CD, gives you 4F Missingno. Nickname appeared as "ITRAINER2", seemingly followed by many characters.
99 - Wants 91 Marowak, gives you 88 Muk. Nickname terminated with 50 before it begins.
AA - Wants 01 Rhydon, gives you 8B Cloyster. "x' y" text appeared in Trainer's text again. Nicknamed appeared as "LA".
BB - Wants 50 Missingno., gives you 08 Slowbro. Was unable to trade because the music faded and the screen become fully white.
CC - Wants 50 Missingno., gives you 50 Missingno. . "x' y" text appeared in Trainer's text again. Nicknamed terminated with 50 before it begins.
CD - Wants 50 Missingno., gives you 50 Missingno. . "x' y" text appeared in Trainer's text again.  Nicknamed terminated with 50 before it begins. (again, but I think the internal name may have been slightly different??)
DD - Wants 94 Abra, gives you 82 Golbat. Nickname appeared as "IKU".
EE -  Wants 80 Golduck, gives you 91 Marowak. Nickname appeared as "EL". Note: The Trainer kept saying 'h p' and an item obtained jingle kept playing like they were saying "happy".
FD - Wants glitch Pokémon EA, gives you 27 Graveler. Evolves into Golem (unless level 0?). Nickname appeared as "S 4 R Y SW. Filled party screen with black regions.
FE - Wants glitch Pokémon EA, gives you 49 Moltres. Nickname appeared as "V A", seemingly followed by many characters.
FF - Wants A8 Nidorina, gives you 00 'M. Nicknamed appeared as "ERRY".

Re: Glitch traders in Pokémon Red (TraderDex) - work in progress

Posted by: Krys3000
Date: 2016-02-03 03:48:22
Very cool idea to work on this! We've been doing a lot of "glitch things" but traders, I never even thought about doing it x) and it's another way to get glitch Pokémon  ;D

Re: Glitch traders in Pokémon Red (TraderDex) - work in progress

Posted by: Spoink
Date: 2016-02-03 08:06:01
Is there a game shark code for this?

Re: Glitch traders in Pokémon Red (TraderDex) - work in progress

Posted by: Stackout
Date: 2016-02-04 10:19:27

Is there a game shark code for this?


Guessing 01xx3DCD, but haven't actually tested it, so not sure if it works or has side-effects or..

Re: Glitch traders in Pokémon Red (TraderDex) - work in progress

Posted by: Torchickens
Date: 2016-02-12 15:29:03


Is there a game shark code for this?


Guessing 01xx3DCD, but haven't actually tested it, so not sure if it works or has side-effects or..


I tested 01033DCD with the Route 2 trader in Pokémon Red EN, Green JP, Yellow EN (where CD3D is normally 01) and it did not change the trade/trade text sadly.

Enabling the code had an effect of changing the sprite of your Pokémon during the trade animation and not changing how the NPC acts after the trade; letting me trade another Clefairy for another Mr. Mime. In fact, the code made trader #03 (Ponyta for Seel) display the text as if I traded him a Ponyta. This made me unable to make his trade.

01033DCD also did not work in Green JP for all of Green's used in-game traders.

These codes will allow you to make the trade of your choice by replacing "xx". After enabling the codes, use the glitch item in slot 1 (Yellow: "ws m"; $63, Red "-g m"; $6A, Japanese Yellow: ; $6A, Japanese Blue: long-name item; $7B, Green "てへ"; 7B), and you won't need any set ups other than the codes.

They have the side effects of changing your item pack items in all versions and stored Pokémon (Yellow, Japanese Yellow), or data from DA47-DA49 (wNumSafariBalls wDayCareInUse, wDayCareMonName) (Red), or wild Pokémon data (Japanese Blue, Green).

Note: The codes for Japanese Blue enable a $50 tile at the top of the screen by modifying C3B4, so that the long-name item doesn't freeze before its Use/Toss box comes up.
 
Yellow:
01C37FDA
012180DA
01D381DA
01631DD3
013E21D3
01xx22D3
01EA23D3
013D24D3
01CD25D3
013E26D3
015427D3
01CD28D3
01B429D3
013E2AD3
01C32BD3
01D22CD3
01232DD3
01C92ED3


Red:
01C347DA
012248DA
01D349DA
016A1ED3
013E22D3
01xx23D3
01EA24D3
013D25D3
01CD26D3
013E27D3
015428D3
01CD29D3
016D2AD3
013E2BD3
01C32CD3
01D72DD3
01242ED3
01C92FD3

Japanese Yellow v1.0 only:
01C3B2D9
01A6B3D9
01D2B4D9
0163A2D2
013EA6D2
01xxA7D2
01EAA8D2
013DA9D2
01CDAAD2
013EABD2
0154ACD2
01CDADD2
01ADAED2
013EAFD2
01C3B0D2
01FFB1D2
0123B2D2
01C9B3D2


Japanese Blue:
01C306D8
01A607D8
01D208D8
017BA2D2
0150B4C3
013EA6D2
01xxA7D2
01EAA8D2
013DA9D2
01CDAAD2
013EABD2
0154ACD2
01CDADD2
01B1AED2
013EAFD2
01C3B0D2
01B7B1D2
0124B2D2
01C9B3D2

Japanese Green (v1.0 only):
01C306D8
01A607D8
01D208D8
017BA2D2
013EA6D2
01xxA7D2
01EAA8D2
013DA9D2
01CDAAD2
013EABD2
0154ACD2
01CDADD2
019DAED2
013EAFD2
01C3B0D2
016AB1D2
010FB2D2
01C9B3D2

Hope these help! With a Game Genie or combination of Game Genie, GameShark it should be a lot simpler. I will work on those tomorrow.