• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Scottie, Todd, Serena, Kris - 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] Need ASM Help

  • 82
    Posts
    7
    Years
    Hello, I am currently trying to add ORAS learnsets to each pokemon. I have a total of 511 moves and would like the pokemon to learn some of them as they level. You get it.

    I found this very nice tool here but it doesn't work. It does 2 things. It repoints the learnset table and then adds in the moves you chose.

    Here is a small example so you dont have to read through the file.

    Code:
    .equ offset_ptrs_to_learnsets,	0xXXXXXXXX
    .equ offset_learnset_data,	0xYYYYYYYY
    
    .equ Tackle,		0x0021
    .equ Snatch,		0x0121
    
    .word bulbasaur
    
    bulbasaur:
    .short Tackle
    .byte 1

    Now imagine .equ goes from 00 to whatever 511 in hex is and .word contains all pokemon.


    Tackle is 0x0021 so the following output is 21 00 01 BUT if youve looked at tackles hex code(for bulbasaur), you know its 21 02.

    To fix this, I(we :o) need to change a few things. First, the .byte needs to be added to the .short. 21 00 + 00 01 or something like that. But we need to multiply the byte by 2 before that. I can multiply the .bytes by 2 manually. I can do it in less than an hour so the main part is adding the 2 together.

    I thought about turning all .shorts to .byte so it just reads 21 01 as the output but the problem is when we hit move 100(hex) . Snatch is 0121 so it outputs 21 01 02(if the byte is 2). If i changed snatches .short to .byte, id get 21 02(Tackle level 2) as the output instead of 21 03(Snatch lvl 2) This is why i specifically want to add the .bytes and the shorts together.

    Main question: How do I take a variable like ".short x" and add ".byte y"? Snatch currently reads 21 01 01 so i need to add the byte data to the 21 01(.short data) to get the proper hex code. Any help would be a appreciated! Thank you! :)
     
    Last edited:
    Back
    Top