# 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 II Glitch Discussion

### Instant Trainer Coin Case? - Page 1

Previous Page

- 1

Next Page

#### Instant Trainer Coin Case?

Posted by: MewFlare
Date: 2019-04-05 15:35:52
Ive searched high and low but cant find any box codes thatd allow me to fight a trainer, either instantly after using the code or in the grass (in place of a wild Pokemon). I wanted to play around with some glitch trainers…

#### Re: Instant Trainer Coin Case?

Posted by: Torchickens
Date: 2019-04-19 14:13:40

> Ive searched high and low but cant find any box codes thatd allow me to fight a trainer, either instantly after using the code or in the grass (in place of a wild Pokemon). I wanted to play around with some glitch trainers…

Hi MewFlare!
I'm sorry for the late reply to your post. :(
Yes, I'm unsure if there are any existing for this either. My best bet (which would take the least time to work out maybe) may be to modify this code (linked below) to instead change D118, D11B (according to bigsupes) which controls the loaded Trainer, to the Trainer you'd like. We could make the game constantly write to them to encounter them in the grass.
https://forums.glitchcity.info/index.php?topic=6716.msg207413#msg207413
Another idea would be to run the routine directly with the correct values, and a "call" operation, similar to the alternative catch 'em all code from Generation I but for Generation II/Coin Case. I'm unsure where the address is, but if you prefer that I'll look for it for you and make the code first. In theory, you could also replicate with a text command script, but the general method and result would be similar (possibly with nothing different about the Trainer).
Will look into different methods of doing this (the former one where all wild Pokémon are Trainers and fighting the Trainer instantly). :)

#### Re: Instant Trainer Coin Case?

Posted by: MewFlare
Date: 2019-04-19 14:52:25
I found this in the first link you provided
All wild Pokemon are <inset x pokemon here>:
Box 1: Ap'v8é'm25
Box 2: p0(male)55555
Box 3: 'v'vé52p0'm
Box 4: éJ9p0(female)55
Box 5: éK9p0255
Box 6: éL9p'd555
Box 7: p0?yyéé'd
Box 8: p'dyyyyyy
Replace ? with the SpeciesID.
Now, obviously not every Pokemon is going to be able to be represented with valid characters.
Very close to what Im looking for, but it rings true that only one character may not cover all the bases, especially not in the context of glitch trainers.

#### Re: Instant Trainer Coin Case?

Posted by: Torchickens
Date: 2019-04-19 15:12:06
I see. Sorry about that, I overlooked the limited species ID detail.
Found this later below though:
All encountered Pokemon are <insert x Pokemon here> and shiny:
Box 1: Ap'v8é'm25
Box 2: p0(male)55555
Box 3: 'vAé52p0'm
Box 4: éJ9p0(female)55
Box 5: éK9p0255
Box 6: éL9p'd555
Box 7: p0?yyéA'd
Box 8: p0éé(female)'dyy
Box 9: p0ké0'dp'd
Replace ? with the species index
To access species indexes that are lower than $7f, than replace Box 7 with:
Box 7: p0?'v(space)éA'd
Then replace ? with SpeciesIndex + $7f
(Which depending on the box 7 name allows you to access either 00-7F or greater than 7F)
Glad it otherwise was close. Will start work now. (note: not like 'going to work', but on making the code just to be sure)

#### Re: Instant Trainer Coin Case?

Posted by: MewFlare
Date: 2019-04-19 15:17:37
Thanks for helping me out… math isnt my strong point lol

#### Re: Instant Trainer Coin Case?

Posted by: Torchickens
Date: 2019-04-19 15:24:06

> Thanks for helping me out… math isnt my strong point lol

You're welcome. ^^
Edit: I'm still working on a special code for this (apologies for my slowness). Coin Case wasn't working for some reason until some things were fixed (it feels f-ing annoying sometimes :/ its rewarding though), and now still trying to find out how to do this with characters you can add into the game with the box name menu. Unfortunately it may have to be tomorrow as it's gone past midnight now.

#### Re: Instant Trainer Coin Case?

Posted by: Torchickens
Date: 2019-04-20 13:55:02
Update:
Real life interfered a little, and because of our schedule (due to my mum worried if I'm not looking after my health well enough) I have to take a break from projects after 20:30 and go to bed at 10 PM (it's now 19:54). I'm really sorry for the delay. We negotiated this was best, (and to avoid the occasional all-nighter) and want to be more health conscious now as it will also help in my older ages and is something to be proud of.

> math isnt my strong point lol

I'm not that good at maths either (I'm sure your maths is good though! I've also become worse and worse at arithmetic), but that's all right and feel we can all learn. If you like when this is done I can teach you some programming stuff for Coin Case box names if you'd like to learn but want a little help (in that case let me know). :)

#### Re: Instant Trainer Coin Case?

Posted by: MewFlare
Date: 2019-04-20 14:09:19
Thats ok, I totally understand life getting in the way.
Im really only good with math if someone helps me. Basically the only reason I didnt fail epically at high school math is because I had a tutor. Going at it alone is a surefire failure…
I'd love that. As long as its not ridiculously complicated Im sure I could learn the basics

#### Re: Instant Trainer Coin Case?

Posted by: Torchickens
Date: 2019-04-20 14:29:33

> Thats ok, I totally understand life getting in the way.
> Im really only good with math if someone helps me. Basically the only reason I didnt fail epically at high school math is because I had a tutor. Going at it alone is a surefire failure…
> I'd love that. As long as its not ridiculously complicated Im sure I could learn the basics

Yeah :/
I see, that's OK! Glad you passed it though! :) Some people don't succeed in passing it even with help.
OK! Yes, I'll start with the basics (and if there's anything you're confused about let me know), so first the number system and how everything is made of bytes, next about BGB and its debugger tool, next the opcodes and what they do, and so on (up to how we can make Coin Case box names). We can do it through PM, Discord whatever you like. We can do this another day like Monday/Tuesday/next week maybe if you like (not Sunday as our family is celebrating Easter Sunday), up to you.
In the mean time, there is an existing solution which may take longer to set up (see https://www.youtube.com/watch?v=PsIb3OZaYAs ) but you could use it to write to the FF80 region (which is run all the time) to run code which always changes D118, D11B (the previously mentioned Trainer bytes), using this method's box name generator.
Examples:
C3>FF80 (write C9 here first so it doesn't run immediately until you've changed FF81 and FF82, then write C3 to FF80 again)
17>FF81
D6>FF82
@D617: Stored PC items. With the memory editor you can change these. An easy solution is:
3E to D617
(Trainer ID 1 value) to D618
EA to D618
18 to D619
D1 to D61A
3E to D61B
(Trainer ID 2 value) to D61C
EA to D61D
1B to D61E
D1 to D61F
C9 to D620
(with the TM17 method you get from Coin Case)
However, the above code can be shortened. ISSOtm told me about not for instancing just using C3 (address) (jump to address) as it temporarily breaks the sprites (it does work but for some reason I'd always get confused on the proper way to fix the sprites (something to do with the ff0c address maybe and left it).
(edited)

#### Re: Instant Trainer Coin Case?

Posted by: MewFlare
Date: 2019-04-20 14:40:34
Discord would be be much easier lol. Mostly anytime is fine (well except Easter Sunday of course) since my semester is over and I dont have much of a life (dunno if I should laugh or cry at that…)

#### Re: Instant Trainer Coin Case?

Posted by: Torchickens
Date: 2019-04-20 14:45:55

> Discord would be be much easier lol. Mostly anytime is fine (well except Easter Sunday of course) since my semester is over and I dont have much of a life (dunno if I should laugh or cry at that…)

Sure, all right! :)
That's relatable :/ lol.
Edit: I'll let you know when I'm ready.

#### Re: Instant Trainer Coin Case?

Posted by: MewFlare
Date: 2019-04-20 14:56:56
Thanks! Im honestly kind of amazed nobody has come up with this just yet. I guess glitch trainers arent as popular in Gen 2 compared to Gen 1.
Im playing on Virtual Console so I obviously cant use a Gameshark or something similar. I know glitch Unowns can mess with the guy in the Trainer House but a) I dont know if I can do what Im hoping to do with that method and b) I dont want to mess up my save data too much or in a way that I cant fix, which glitch Unowns do. I especially dont want to mess up my completed Pokedex with an Unown!

#### Re: Instant Trainer Coin Case?

Posted by: Torchickens
Date: 2019-06-24 15:45:34
I'm very sorry for the delay. :( (feel guilty as I never arranged it). Would you still like us to do the Discord MewFlare?
Additionally I'm going to make a serious effort to get this materialised in a dedicated code (not general memory editor). So perhaps the code would read two item quantities for the trainer (more user friendly than different box names each time and you could set them to 255 with another code) while still running box names so you don't need to gather items.
I will explain it in a post here if it's successful.

#### Re: Instant Trainer Coin Case?

Posted by: MewFlare
Date: 2019-06-24 16:04:26
Its ok Torchickens, we all have stuff outside of Pokemon. Yes, Discord would arguably be easier to communicate back and forth on than the forums. Im ShinySkitty in the GCL server, so just PM me whenever :)

#### Re: Instant Trainer Coin Case?

Posted by: Torchickens
Date: 2019-06-24 16:21:51

> Its ok Torchickens, we all have stuff outside of Pokemon. Yes, Discord would arguably be easier to communicate back and forth on than the forums. Im ShinySkitty in the GCL server, so just PM me whenever :)

Thanks. All righty. ^^
Previous Page

- 1

Next Page