’Cause all games were better on the GBC

You are not logged in.

  • Index
  • → Generation I
  • → What determines whether a Pokémon took part in battle? (Generation I)

#1 2015-02-01 02:44:12

Registered: 2011-01-02
Post 41/47

What determines whether a Pokémon took part in battle? (Generation I)

What determines whether a Pokémon took part in battle in R/B/Y so that they gain experience?

A link to a routine on the disassembly and explanation of relevant memory addresses would be helpful.

I have had non-existing (beyond slot 6) Pokémon gain experience in battle while glitching even when I didn't switch to them, and recently with the CoolTrainer (hex:00) glitch move I did this without even having over 6 Pokémon, which intrigues me greatly; I want the Pay Day coins side effect to pick up 999999 Pokédollars (possible because the money values are three bytes). But I haven't even been able to come to the root cause of the 'took part' thing.

The steps were to level the ♀ . (hex:C1) glitch Pokémon to level 16 and let it learn hex:00 as the first move, then you have to hopefully get an excessively long internal name for the hex:00 move such that the game doesn't say your Pokémon learned it anymore (see here). To put this crudely, this is presumably needed because of the corruption effect, the game copies data from CD6D, a buffer that stores the moves name that is supposed to have a 50 in the first 20 characters and buffer overflow occurs if there is no 50 character where the game copies more data to CF4B and beyond than it should, including stored screen data that is updated at certain times in R/B and when actually entering battle in Yellow.

My other way to get non-existing Pokémon gain experience in battle was to set the party counter (D162 as I'm using Yellow) to 92h or above and win the battle with Spike Cannon, but it didn't work when it was the 4th move on ♀ . yet it worked as move 1-3 and as move 4 on Alakazam (weird). I don't know why it had to be Spike Cannon, there is likely more to it that I don't know. Strangely enough, when ♀ . defeated the Pokémon with Spike Cannon I could get the gained experience effect by changing the number of Pokémon to 92h with memory viewer from within battle, but with Alakazam hacked to have Spike Cannon I had to set the value to 92h before entering the battle (which causes the wild appeared side effects) to get the non-existing Pokémon to gain experience.

I appreciate it if anyone could help. Thanks.

Edit: Yellow D057 at least supports letting Pokémon 1-8 gain experience.
Edit 2: Getting closer to the answer. For the 92h Pokémon thing it seemed like the game was taking D069 (number of Spike Cannon hits) as Pokémon participant data, because the game will read bits from the byte(s) beyond D057 if you have over 8 Pokémon. Wow.

Last edited by Torchickens (2015-02-01 03:53:26)


  • Index
  • → Generation I
  • → What determines whether a Pokémon took part in battle? (Generation I)

Board footer

Powered by FluxBB