Hexadecimal Numbers?!

Discussion in 'GBA - Game Development, ROM Hacks and Translations' started by mbcrazed, Feb 28, 2013.

  1. mbcrazed
    OP

    mbcrazed GBAtemp Advanced Fan

    Member
    647
    230
    Nov 10, 2012
    China
    GBATemp
    How can I figure out the hex numbers in Pokemon Emerald? Thanks Tempers!~
     
  2. DiscostewSM

    DiscostewSM GBAtemp Guru

    Member
    5,018
    2,658
    Feb 10, 2009
    United States
    Sacramento, California
    A hex number is simply a counting number using base 16. Much like how we use base 10 for regular counting (0 to 9, then 10 to 19, etc), Hex counts from 0 to F (where A to F represent 10 to 15), then the next count from 10 to 1F, then 20 to 2F, ... , E0 to EF, F0 to FF, 100 to 10F, etc etc.

    A representation of a base 10 number separating the digits for say 1569 could be shown as

    (1 * 10^3) + (5 * 10^2) + (6 * 10^1) + (9 * 10^0)

    So, say we have a hex number like h4EA3. What would it equal as base 10?

    (4 * 16^3) + (14 * 16^2) + (10*16^1) + (3 * 16^0) = 16384 + 3584 + 160 + 3 = 20131
     
  3. mbcrazed
    OP

    mbcrazed GBAtemp Advanced Fan

    Member
    647
    230
    Nov 10, 2012
    China
    GBATemp
    Hmm.... So How can you tell which Pokemon you have? ( Sorry if It's a stupid question, I'm kind of a noob when it comes to this stuff)
     
  4. DiscostewSM

    DiscostewSM GBAtemp Guru

    Member
    5,018
    2,658
    Feb 10, 2009
    United States
    Sacramento, California
    Well, that would require having information about the game on hand, which I do not have. But I'm sure whatever it is will have addresses (location in the file) of what is what, like what pokemon you have, what their level is, etc, and that will likely be held in hex format.
     
  5. mbcrazed
    OP

    mbcrazed GBAtemp Advanced Fan

    Member
    647
    230
    Nov 10, 2012
    China
    GBATemp
    Thanks for this information! The reason I was needing to know is because I'm working on a, " Project."
     
  6. Snailface

    Snailface My frothing demand for 3ds homebrew is increasing

    Member
    4,324
    1,983
    Sep 20, 2010
    Engine Room with Cyan, watching him learn.
    Um.. you can play the game of course. But since you are talking about hex numbers, I guess you want a more hacky way.

    Open your pokemon save file with this. http://filetrip.net/nds-downloads/utilities/download-pokegen-3110-f30882.html

    It'll do the hex number reading for you. :P
     
  7. ouch123

    ouch123 GBAtemp Fan

    Member
    353
    133
    Aug 2, 2012
    United States
    He already covered converting from hex to decimal so I'll go over converting from decimal to hex, which I'm assuming is what's confusing you.

    Let's take your post count as an example.
    15 < 231 < 255. So, we know that your post count can be represented using two hexadecimal digits (hexits).
    231 / 16 = 14, Remainder 7.
    14 = 0xE
    7 = 0x7
    Then, 231 = 0xE7.

    Edit: Urgh, misinterpreted the source of your confusion. If you want to know what Pokémon is associated with a given hexadecimal value, you will have to either consult a table or make one, in all likelihood.
     
  8. mbcrazed
    OP

    mbcrazed GBAtemp Advanced Fan

    Member
    647
    230
    Nov 10, 2012
    China
    GBATemp
    I have Pokegen for uploading my shinies to pokecheck! :D It won't open though, It's a Pokemon Emerald save!
     
  9. Snailface

    Snailface My frothing demand for 3ds homebrew is increasing

    Member
    4,324
    1,983
    Sep 20, 2010
    Engine Room with Cyan, watching him learn.
  10. mbcrazed
    OP

    mbcrazed GBAtemp Advanced Fan

    Member
    647
    230
    Nov 10, 2012
    China
    GBATemp
  11. mbcrazed
    OP

    mbcrazed GBAtemp Advanced Fan

    Member
    647
    230
    Nov 10, 2012
    China
    GBATemp
    Thanks!! This made things a little not confusing about hexits! I'm pretty good at math, but the thing that's going to get me is the 0 through 9 A through F Thing!