Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Help with Pokemon rom GBA hack tables

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
luigimud
Newbie cheater
Reputation: 0

Joined: 04 Jul 2024
Posts: 10

PostPosted: Thu Jul 04, 2024 8:16 am    Post subject: Help with Pokemon rom GBA hack tables Reply with quote

Hello there, would you kindly be able to help me with the some Pokemon rom GBA hack tables?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 146

Joined: 06 Jul 2014
Posts: 4462

PostPosted: Thu Jul 04, 2024 11:05 am    Post subject: Reply with quote

Pokemon data structures are well documented on bulbapedia. Search for "pokemon data structure generation III"
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
luigimud
Newbie cheater
Reputation: 0

Joined: 04 Jul 2024
Posts: 10

PostPosted: Fri Jul 05, 2024 11:44 pm    Post subject: Reply with quote

Thank you for pointing me in the right direction.

Post checking bulba & other documentations of various GenIII save editors, each Pokémon's data is stored in a 100-byte structure when in the player's party and an 80-byte structure when in the PC.

The data is stored in little-endian order (least significant byte is stored first). The structure includes various fields such as personality value, OT ID, nickname, and stats (HP, Att, Def, etc...)

The Pokémon data is divided into four substructures: Growth, Attacks, EVs & Condition, and Miscellaneous. Each substructure is 12 bytes long and stored in an encrypted form. The order of these substructures is determined by the personality value modulo 24.
E.g.:
Growth: Species, Item held, Experience, PP bonuses, Friendship.
Attacks: Moves and their respective PP.
EVs & Condition: EVs for each stat, condition stats like Coolness, Beauty, Cuteness, etc.
Miscellaneous: Pokérus status, Met location, IVs, Ribbons, and Obedience.

Here's where I am in the CT creating process:
To create a CT for modifying Pokémon data, I'm scanning to edit these values, by search for the Pokémon's current level in Cheat Engine, then changing the level in-game and searching again to narrow down the addresses. I am then testing varios other stat modifications using their respective byte sizes (changing values in-game and search again to find the correct addresses) basically performing what tools like A-Save, PkHex, or the more advanced G3HS perform.

lua
-- Example Lua script for Cheat Engine
pID = getOpenedProcessID()
print("Process ID: " .. pID)

-- Function to print Pokémon data
function printPokemonData(pokemonAddress)
local level = readBytes(pokemonAddress + 0x54, 1)
local hp = readBytes(pokemonAddress + 0x56, 2)
local attack = readBytes(pokemonAddress + 0x5A, 2)
local defense = readBytes(pokemonAddress + 0x5C, 2)
print("Level: " .. level)
print("HP: " .. hp)
print("Attack: " .. attack)
print("Defense: " .. defense)
end

-- Example address of a Pokémon in memory
pokemonAddress = 0x02024284
printPokemonData(pokemonAddress)

For example, one of my party mons HP is 35, I search for the value '35' in Cheat Engine. Once found, I look at surrounding addresses to identify the rest of the data structure. This can be tedious, but once mapped out the structure, I can create a cheat table to easily modify these values in the future.

Any one that can help with this would be hightly appreciated
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites