luigimud Newbie cheater
Reputation: 0
Joined: 04 Jul 2024 Posts: 10
|
Posted: Fri Jul 05, 2024 11:44 pm Post subject: |
|
|
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
|
|