Talk:Pokémon data structure (Generation I): Difference between revisions

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
Line 191: Line 191:
** Other characters seem to do weird things.
** Other characters seem to do weird things.


* Your trainer name appears at d158-d15e. d15f has a value of '50', "string end". The seven-character name limit might be so that the name fits in a convenient eight-byte spot, including a stop byte.
* Your trainer name appears at d158-d15e. d15f has a value of '50', "string end". The seven-character name limit might be so that the name fits in a convenient eight-byte spot, including a stop byte. Your trainer name appears again at d9ac. (Perhaps one of these is the Original Trainer of your first carried Pokémon?)
* d160-d162 appear to be 00. The eight bytes from d163-d16a store the current party. The first byte stores the number of Pokémon carried. This is followed by one byte giving the species of each Pokémon, followed by an 'FF' byte. If there are less than six Pokémon, all bytes after the FF are 00. (For example, a party of three Bulbasaurs (internal number 99) will read "01 99 99 99 FF 00 00 00".)
* After the eight-byte list comes the 44-byte data structure Pokémon #1 (in d16b-d196). Here's the weird thing: The Pokémon species number is duplicated here as the first byte, but the game only actually looks at the entry in the eight-byte list at the beginning. Changing the species ID in the structure has no effect. In fact, if you change the first species ID to Mew and the second to Krabby, then store it in the box and take it back out, even if you switched boxes in the meantime, the resulting Pokémon will be the same: appearing as a Mew, with Mew's species ID in the list, but Krabby's species ID still in the 44-byte structure.
* Current HP is actually stored as one lower: for example, if you have 5HP it will record "00 04". This is because it begins counting at 0.
* Your rival's name can be found from d34a-d351, at least while you fight him. This may be the case for trainers in general.
* Your opponent's data can be found at around D8A4.
* Your rival and random trainers have the same Trainer ID as you. It's reasonable to assume that this is the case for all trainers in at least all Generation I and II games.
* The one-byte mystery field and three-byte mystery field are still a mystery. The one-byte field appears to always remain at 00 (perhaps two bytes were initially reserved for status effects). The three-byte field on my Charmander read "14 14 2D", with my rival's Squirtle reading "15 15 2D" and a Bug Catcher's Pokémon "07 04 FF". Perhaps it's related to Secret ID, or DVs? Are any of these bytes used by Pokémon traded back from Generation II?
--[[User:JDigital|JDigital]] 11:43, 6 May 2009 (UTC)
--[[User:JDigital|JDigital]] 11:43, 6 May 2009 (UTC)



Revision as of 12:52, 6 May 2009

I'm wondering if we should rename these to "Pokémon data structure in Generation I", "II", "III", and so on. After all, we've had other GBC, GBA, and DS games with Pokémon, right? TTEchidna 10:47, 17 November 2007 (UTC)

Yeah, it's a good idea. File:Ani154MS.gifNetto-kunFile:Ani394MS.gif 11:05, 17 November 2007 (UTC)

So this idea never went ahead? - TIMMY 12:16, 13 December 2008 (UTC)

Using this in Visual Boy Advance

Thanks for this page guys, i used this to find the codes in the memory viewer and edit my party! I wrote down the offsets for every piece of data for the pokemon using this guide (if you want a copy, just ask) and now it's easy to change the data of my pokemon. I also found the offsets for a couple of other things like the nicknames. You can change everything about the pokemon including the species. I also just cracked the GBC ones too, i didn't find the nicknames there though... Thanks for this page anyway. (GT4GTR 13:42, 21 December 2008 (UTC))

Maybe we can expand this page a little if anyone's intrested... ;) (GT4GTR 13:40, 21 December 2008 (UTC))

I tried to post what i found here but it didn't turn out quite right. (GT4GTR 13:42, 21 December 2008 (UTC))

  • I fixed it for you:

I noticed some other things while poking around in the memory:

  • Pokémon Red/Blue don't use ASCII. The alphabet is as follows:
    • Character 50 terminates a string.
    • Character 7F is space.
    • Characters 80-99 are uppercase A through Z.
    • Characters 9A-9F are ():;[].
    • Characters A0-A9 are lowercase a through z.
    • Characters BA-BF are é, 'd, 'l, 's, 't, and 'v.
    • Characters C0-DF appear to be blank.
    • Characters E1-E9 are PK, MN, -, 'r, 'm, ?, !, ., and small katakana A.
    • Characters EA-EF are small katakana U, small katakana I, white right facing triangle, black right facing triangle, black down facing triangle, and the male symbol.
    • Characters F0-F5 are the Pokédollar logo, multiplication cross, full stop, slash, comma, and female symbol.
    • Characters F6-FF are the digits 0 through 9.
    • Other characters seem to do weird things.
  • Your trainer name appears at d158-d15e. d15f has a value of '50', "string end". The seven-character name limit might be so that the name fits in a convenient eight-byte spot, including a stop byte. Your trainer name appears again at d9ac. (Perhaps one of these is the Original Trainer of your first carried Pokémon?)
  • d160-d162 appear to be 00. The eight bytes from d163-d16a store the current party. The first byte stores the number of Pokémon carried. This is followed by one byte giving the species of each Pokémon, followed by an 'FF' byte. If there are less than six Pokémon, all bytes after the FF are 00. (For example, a party of three Bulbasaurs (internal number 99) will read "01 99 99 99 FF 00 00 00".)
  • After the eight-byte list comes the 44-byte data structure Pokémon #1 (in d16b-d196). Here's the weird thing: The Pokémon species number is duplicated here as the first byte, but the game only actually looks at the entry in the eight-byte list at the beginning. Changing the species ID in the structure has no effect. In fact, if you change the first species ID to Mew and the second to Krabby, then store it in the box and take it back out, even if you switched boxes in the meantime, the resulting Pokémon will be the same: appearing as a Mew, with Mew's species ID in the list, but Krabby's species ID still in the 44-byte structure.
  • Current HP is actually stored as one lower: for example, if you have 5HP it will record "00 04". This is because it begins counting at 0.
  • Your rival's name can be found from d34a-d351, at least while you fight him. This may be the case for trainers in general.
  • Your opponent's data can be found at around D8A4.
  • Your rival and random trainers have the same Trainer ID as you. It's reasonable to assume that this is the case for all trainers in at least all Generation I and II games.
  • The one-byte mystery field and three-byte mystery field are still a mystery. The one-byte field appears to always remain at 00 (perhaps two bytes were initially reserved for status effects). The three-byte field on my Charmander read "14 14 2D", with my rival's Squirtle reading "15 15 2D" and a Bug Catcher's Pokémon "07 04 FF". Perhaps it's related to Secret ID, or DVs? Are any of these bytes used by Pokémon traded back from Generation II?

--JDigital 11:43, 6 May 2009 (UTC)

Held Items?

Is it possible that one of the unknown bytes is the held item when traded to G/S/C? After all, when you trade a Pokémon from R/B/Y to G/S/C, it almost always (if not always) holds some item. And sometimes the items are different in Yellow! And when you give a Pokémon an item and then trade to R/B/Y, the R/B/Y game somehow remembers what item it's holding... Blaziken257 07:21, 13 April 2009 (UTC)

Article rename

It may be more consistent to rename this article to "Pokémon data structure (Generation I)", and the same with other articles. --JDigital 00:44, 5 May 2009 (UTC)