• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

[ASM & Hex] Does place in a table determine the byte value a variable as listed as?

  • 853
    Posts
    4
    Years
    • Seen Nov 9, 2023
    So I was looking up some stuff in HMA, because I wanted to see if I could change/edit values by changing the bytes.

    I was looking at the pokemon table and saw grass listed as byte 0C.

    I know bytes store data so my biggest issue was knowing what type of data is stored there and what I should change the byte to, for the effect I'm pursuing.

    So I didn't know if value was for the name "GRASS" like the letters grass. Or actually stored the type data.

    Following the pointer to the type name table, I saw all the types, and then saw that grass was listed as number 12 within the table. Or the 12th value within the table.

    So then I thought, does that mean that the bytes are unlimited in options as far as changing them, but just shift to a different value within the table?

    Because 0C is 12 in hex.

    If so then changing bytes within the table, only create so many options because of all the places that refer to that table to pull its own information.


    If that's all true then if I went into a hex editor, and found any move I wanted, and changed the third byte to 0C, I could make any move grass?



    So before I can actually edit things with raw byte changes I have to know what table I'm referencing and the order of the data within said table?
    And any changes I make are limited to whats already in the table, so I'd have to expand the table, repoint and fill in definitions in any other relevant tables, before I could add something new?

    I think I get it, but If someone more experienced can assure me I'd appreciate it.
     
    @Meister_anon~Master_o f_None

    Check this.

    Every move's type is editable with a simple byte change, yes.

    Alright awesome, I haven't dove into it yet, but that looks like it'll solve all the problems I was having when I added the fairy type to mine.
     
    Back
    Top