• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

What is the Data Structure for Trainer Teams Data in Pokémon Emerald?

55
Posts
9
Years
    • Seen May 4, 2024
    Also can anyone point me to the offset where the data is located in the ROM?

    I haven't been able to find anything about this in regards to Pokémon Emerald so I had to post a thread here.

    Once I figure out how this data is stored and where it's at, it'll br almost trivial for me to edit this data with a Hex Editor on my Android phone.

    Yes I am using an Android Phone, because I have no computer or laptop to make Romhacks.

    Thanks in advance.
     
    55
    Posts
    9
    Years
    • Seen May 4, 2024
    Thanks, now I just need to know how then data is structured and what each hex value is and I'll be able to take it from there.
     

    Asith

    Uwao
    237
    Posts
    3
    Years
    • Seen yesterday
    Thanks, now I just need to know how then data is structured and what each hex value is and I'll be able to take it from there.
    1.png
    Here's a formatted version of the table courtesy of hexmaniacadvance
    Each cell is one byte
     
    55
    Posts
    9
    Years
    • Seen May 4, 2024
    Hmm looking at it it appears some of the data entries in the structure table are represented by single byte integer and some are 16-bit and 32-bit.

    What's confusing is that some of the cells appear blank so I don't know what those bytes are for.

    I really wish I could use HMA on an Android.

    Also it would help to know the exact possible hex values that could be used for each data entry in the structure. That would probably be asking to much however.

    It seems the value on that table suggest that whether the trainer is fought in a single or double battle takes up 2-bytes. And it seems the same is true for Pokémon Count. AI flags use 4 bytes, but that leaves several bytes in between these unnacounted for.
     
    Last edited:

    Asith

    Uwao
    237
    Posts
    3
    Years
    • Seen yesterday
    Hmm looking at it it appears some of the data entries in the structure table are represented by single byte integer and some are 16-bit and 32-bit.

    What's confusing is that some of the cells appear blank so I don't know what those bytes are for.

    I really wish I could use HMA on an Android.

    Also it would help to know the exact possible hex values that could be used for each data entry in the structure. That would probably be asking to much however.

    It seems the value on that table suggest that whether the trainer is fought in a single or double battle takes up 2-bytes. And it seems the same is true for Pokémon Count. AI flags use 4 bytes, but that leaves several bytes in between these unnacounted for.

    No that is correct. Single/double battles and pokecount take 1 byte ONLY but have room for 4 bytes. A double battle is "01 00 00 00" and a pokecount of 3 is "03 00 00 00". AI flags use 4 bytes. Any unaccounted for bytes are just unused bytes and are shown blank in hma. Their raw value would just be 00 by default and are not read by the game.
     
    Last edited:
    55
    Posts
    9
    Years
    • Seen May 4, 2024
    Ok thanks, I really appreciate it. I got the format mapped out in spreadsheet.

    All I need to do is figure out how many entries in this data there are here total. Ergo how many Trainers I can edit here.
     

    Asith

    Uwao
    237
    Posts
    3
    Years
    • Seen yesterday
    Ok thanks, I really appreciate it. I got the format mapped out in spreadsheet.

    All I need to do is figure out how many entries in this data there are here total. Ergo how many Trainers I can edit here.

    The final row starts at 3185A0 and ends at 3185C7. 854 trainers total, plus one dummy entry row at the very start
     
    Back
    Top