Jump to content

Search the Community

Showing results for tags 'Structure'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • Pokémon
    • Pokémon (Ultra Sun/Ultra Moon)
    • Pokémon (Sun/Moon)
    • Pokémon (PSMD)
    • Pokémon (EoS)
  • Egg Groups
    • Egg Groups (Ultra Sun/Ultra Moon)
    • Egg Groups (Sun/Moon)
  • Moves
    • Moves (Ultra Sun/Ultra Moon)
    • Moves (Sun/Moon)
    • Moves (PSMD)
    • Moves (EoS)
  • Abilities
    • Abilities (Ultra Sun/Ultra Moon)
    • Abilities (Sun/Moon)
    • Abilities (PSMD)
  • Types
    • Types (Ultra Sun/Ultra Moon)
    • Types (SM)
    • Types (PSMD)
    • Types (EoS)

Categories

  • Pokémon HOME
  • Generation 9
  • Generation 8
  • Generation 7
  • Generation 6
  • Generation 5
  • Generation 4
  • Mystery Dungeon 3DS
  • Mystery Dungeon NDS
  • Sprite Index
  • Other

Categories

  • Project Pokémon
  • Games
    • Pokémon Ultra Sun and Ultra Moon
    • Pokémon Sun and Moon
    • Pokémon Super Mystery Dungeon

Categories

  • Save Editing
    • Managing GB/GBC Saves
    • Managing GBA Saves
    • Managing NDS Saves
    • Managing 3DS Saves
    • Managing Gamecube Saves
    • Managing Wii Saves
    • Managing Switch Saves
    • Using PKHeX
    • Gen 3 Specific Edits
    • Gen 4 Specific Edits
    • Gen 5 Specific Edits
    • Gen 6 Specific Edits
    • Gen 7 Specific Edits
    • Gen 8 Specific Edits
    • Gen 9 Specific Edits
  • ROM Editing
    • Stars' Pokémon Colosseum and XD Hacking Tutorial
    • Editing ROMs with Sky Editor
    • NDS Pokémon Games Hacking Tutorials
    • 3DS Pokémon Games Hacking Tutorials
    • Switch Pokémon Games Hacking Tutorials
  • RAM Editing
    • GS ACE: Coin Case
    • GS ACE: TM17
  • Gameplay related support
    • How to play Rescue Team DX ROM hacks
    • e-reader support
    • Max Raid RNG Manipulation

Forums

  • ProjectPokemon.org
    • Announcements
    • News Discussion
    • Project Pokémon Feedback
    • Introductions
  • Event Pokémon
    • Event Pokémon News
    • Event Contributions
    • Events Help and Questions
  • Technical Discussions
    • ROM
    • Saves
    • RAM and Live Edits
    • Hardware
    • General Development
  • Pokémon Discussions
    • Pokémon Games Discussion
    • Pokémon Online Play
    • Pokémon Franchise
  • Other
    • Creative Discussion
    • General Gaming
    • Off Topic
  • Mystery Dungeon Hacking's Discussions
  • The "I Love Cats" Club's Discussions
  • The Cool Kids Corner's Discussions
  • Team Valor's General Discussion
  • Pokemon USUM Breeder's Club's Rules
  • Pokemon USUM Breeder's Club's Post breeding stories & pictures here
  • Pokemon USUM Breeder's Club's Competitive Breeding Requests
  • Pokemon USUM Breeder's Club's Non-Competitive Breeding Requests
  • Pokemon USUM Breeder's Club's Introduce self
  • The PBOE, (Pokémon Brotherhood of Evil)'s Topics
  • Sky Editor's Topics
  • Sky Editor's Questions
  • Hoopa's Café's Topics
  • Super pokemon POWER's Topics
  • Steel Of Time Club's Topics

Calendars

  • Pokémon Event Calendar
  • The "I Love Cats" Club's Events
  • Hoopa's Café's Important Dates
  • Super pokemon POWER's Events
  • Steel Of Time Club's Events

Categories

  • Event Gallery
    • Pokémon HOME
    • Generation 9
    • Generation 8
    • Generation 7 (Switch)
    • Generation 7 (3DS)
    • Generation 6
    • Generation 5
    • Dream World
    • C-Gear Skins
    • Pokédex Skins
    • Pokémon Musicals
    • Pokémon World Tournaments
    • Generation 4
    • Generation 3
    • Generation 2
    • Generation 1
  • In-Game Series
    • Pokémon GO -> HOME Transfers
    • Generation 9
    • Generation 8
    • Generation 7
    • Generation 6
    • Generation 5
    • Generation 4
    • Generation 3
    • Generation 2
    • Generation 1
  • Unreleased/Beta PKM Gallery
  • Tools
    • Save Editing
    • ROM Editing
    • RAM Editing
    • Files compatible w/ Saves
  • Saves and RAM edits
    • User Contributed Saves
    • User Contributed RAM edits and cheat files
    • User Contributed Super Secret Bases
  • PKM Files
    • User Contributed PKM files
  • ROM related entries
    • ROM hacks
    • Image Assets
    • Custom Resources
  • Misc
    • Images
    • Tools
  • Mystery Dungeon Hacking's Files
  • Hoopa's Café's Files
  • Super pokemon POWER's Files
  • Steel Of Time Club's Files

Blogs

  • Project Pokémon
  • Evan's Dev Blog
  • Diary
  • Pokémon Mystery Dungeon: Gate of the Shooting Star
  • theSLAYER's thoughts and ramblings
  • Alack Alay!
  • Mario and Lugi
  • Diary of Borjitasstoi
  • Bigjon357
  • Benjamen
  • Céliana || Cecillia || TheRealProcyon's Fun Blog
  • the manufacturing of steel structural parts
  • The Best in Career Guidance
  • How I Get My FREE ROBUX In One Easy Lesson
  • hello kitty has a day :3
  • Dairy, perharps pokemon
  • Trainer Sagas; An original series premiering on Cupencil!
  • Pokemon and their trainer bond in Pokémon GO
  • Pokemon distribution
  • Pknx error
  • Upgrated PPRE2 Editing Gen IV Pokemon Stats/Moves Beta Release!
  • Pokémon cards in Canada
  • UTI Relief Starts Here at Prime Health
  • Ensuring Continuity of Care: ABA Therapy in Schools and Beyond
  • Benefits of Medical Coding
  • Staff Discussions's Blog
  • Mystery Dungeon Hacking's Blog
  • The Cool Kids Corner's Blog
  • Project Pokemon Fun Club!'s Blog: Random Stuff
  • Project Pokemon Fun Club!'s Blog.. So fun..So wow...SHARE YOUR NEWS!
  • Create your own Pokemon Region's Storyline
  • Create your own Pokemon Region's Team Rocket of the Region
  • Create your own Pokemon Region's Pokemon Region base off of.....
  • Create your own Pokemon Region's Pokemon Region main Character
  • Sky Editor's Sky Editor
  • Sky Editor's Blog
  • Hoopa's Café's Blog
  • Steel Of Time Club's Blog
  • SkyTemple Documentation's Documentation & Tutorial Drafts

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Gender


About Me


Friend Code (Nintendo Switch)


Friend Code (3DS)


NNID (Wii U)

Found 1 result

  1. Pokémon Structure in RAM Due to a lack of documentation regarding how Pokémon are stored in RAM during battle of the generation 4 games I have taken it upon myself to document how they are structured and how to extract them. I've found that the Pokémon data is stored around the addresses 002C0BC2 to 002D5780 when a RAM dump is viewed in a hex editor. The length of the data is of 128 bytes (decimal value) or 80 bytes (hexadecimal value) per Pokémon. With that the following is the structure of Pokémon data in the RAM of generation 4 main line games if the relevant 128 bytes were extracted from the RAM; therefore, I'll be starting at address 0x00. Please note that for all values that use 2 or more bytes the values are stored in little-endian format. Offset Content 0x00-0x01 National Pokédex identification number. 0x02-0x0B 0x02-0x03 = Attack stat 0x04-0x05 = Defense stat 0x06-0x07 = Speed stat 0x08-0x09 = Special attack stat 0x0A-0x0B = Special defense stat 0x0C-0x13 The moves known by the Pokémon with every two bytes corresponding to the move index. 0x0C-0x0D = Move 1 0x0E-0x0F = Move 2 0x10-0x11 = Move 3 0x12-0x13 = Move 4 0x14-0x17 IVs, IsEgg Flag, IsNicknamed Flag. Same as in Block B of PKM Structure for Gen 4 found in the tech documents. 0x18-0x1F This set of bytes start at 06 and keeps track of the how the stats of the Pokémon have increased or decreased during the battle. Example 00 = a decrease in a stat by -6 stages and 0C = an increase in a stat by +6 stages. 0x20-0x21 These bytes are linked to the species of the Pokémon in some way. As such a byte combination of 70 0B will be set there if the opposing Pokémon is a Lugia. 0x22-0x23 Unused, in all tests. All bytes have been 00 and after many tests these bytes did not change. 0x24-0x25 These bytes are linked to the species of the Pokémon in some way. As such a byte combination of 0E 02 will be set there if the opposing Pokémon is a Lugia. 0x26 Pokémon form index. If the Pokémon does not have more than one form or the Pokémon is in its base form this value will be 00. Note form and evolution stage are different concepts. 0x27 Ability index 0x28 Unused, in all tests. All bytes have been 00 and after many tests these bytes did not change. 0x29 Appears to change if the Pokémon has a blanket ability activated. 00 = no blanket ability and 04 = the Pressure ability. It is unclear if this byte can have a value other than 00 or 04 depending on the ability. 0x2A-0x2B Unused, in all tests. All bytes have been 00 and after many tests these bytes did not change. 0x2C-0x2F Current Power Points of moves. 0x2C = Power Points Remaining for move 1 0x2D = Power Points Remaining for move 2 0x2E = Power Points Remaining for move 3 0x2F = Power Points Remaining for move 4 0x30-0x33 Number of PP UPs used for each move. 0x30 = Number of PP Ups used on move 1 0x31 = Number of PP Ups used on move 2 0x32 = Number of PP Ups used on move 3 0x33 = Number of PP Ups used on move 4 Values cannot exceed hexadecimal value 03. 0x34 Current level of Pokémon. Value cannot exceed hexadecimal value 64. 0x35 Happiness of Pokémon. 0x36-0x4B Pokémon nickname. If no nickname is set the Pokémon species name will be stored here with a terminating FF value. Note this is a character array; therefore, little-endian formatting does not apply here. 0x4C-0x4D The current Hit Point value of the Pokémon. 0x4E-0x4F Unused, in all tests. All bytes have been 00 and after many tests these bytes did not change. 0x50 The max Hit Point value of the Pokémon. 0x51-0x53 Unused, in all tests. All bytes have been 00 and after many tests these bytes did not change. 0x54-0x63 Original trainer (OT) name. If the Pokémon belongs to a non-playable character (NPC) all bytes will be 00 with a terminating FF. Note this is a character array; therefore, little-endian formatting does not apply here. 0x64-0x67 Current EXP. If the Pokémon belongs to a NPC all bytes will be 00. 0x68-0x6B Pokémon personality identification number (PID). 0x6C This byte gets set if the Pokémon is affected with a status condition that is not temporary such as burn or poison. 0x6D-0x73 Each byte correlates with a temporary status condition. For example the byte set for confusion is the counter for how many turns is remaining before the confusion status effect wears off. 0x74-0x75 Trainer identification number (ID). 0x76-0x77 Trainer secret identification number (SID). 0x78-0x79 The index of the item that the Pokémon is holding. 0x7A-0x7D Each byte correlates with a status condition that is not temporary. The byte set for sleep is the counter for how many turns is remaining before the wakes up. 0x7E This byte is the gender of the Pokémon. 00 = male, 01 = female, 02 = genderless. 0x7F This byte is the type of Poke Ball that the Pokémon is in. If it is in a special ball from Pokémon Heart Gold or Pokémon Soul Silver this byte will be 04 which is the same as the Poke Ball. --footer-- Pokémon Extraction In order to easily extract a Pokémon from RAM I recommend dumping the RAM as soon as the Pokémon that you want to extract is sent into battle. This is done so when viewing the RAM in a hex editor you can find a string of bytes that is both unique enough that it will not appear multiple times in the RAM and consistent with any Pokémon currently in the RAM. With that said the string of bytes that meets both of these conditions in most cases is the stat increase/decrease values with would be 06 06 06 06 06 06 06 06. Please note if an ability such as Intimidate or Download actives before dumping the RAM you will have to adjust the string of bytes accordingly. In a standard 1 vs 1 battle the first Pokémon that will appear in the RAM will be yours and the second one will be your opponents. From there follow how a Pokémon is stored in the save file in order to rearrange the data to create a valid PK4 file. Update: I have developed an application that can find and extract Pokémon from a generation 4 RAM dump file. Application can be downloaded from here Additional Reading
×
×
  • Create New...