• 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!
  • Dawn, Serena, Hilda, Wes - 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✓] How can I modify the first Pokémon encountered when rescuing Prof. Birch?

  • 3
    Posts
    8
    Years
    • Seen Nov 21, 2016
    Recently I started hacking GBA Sapphire ROM. When rescuing Prof. Birch at Route 101, the player encounters a Poochyena. I dug into the event and found that it is likely to be a part of a special event. Isn't it possible to modify this Pokémon?
     
    Last edited:
    You better check out the script of Professor Birch's bag

    I did so, it calls a special event 0x9C and then dialogues after the battle. Here's the script (I was using a Japanese ROM):

    #org 0x14DB81
    lock
    faceplayer
    setflag 0x800
    setflag 0x52
    fadescreen 0x1
    hidesprite 0x4
    movesprite 0xFF 0x6 0xD
    applymovement MOVE_PLAYER 0x81803D9
    waitmovement 0x0
    special 0x9C
    waitstate
    applymovement 0x2 0x814DBD9
    waitmovement 0x0
    msgbox 0x814DC42 MSG_KEEPOPEN
    special 0x0
    setflag 0x2D0
    clearflag 0x2D1
    setflag 0x2BC
    setvar 0x4084 0x2
    setvar 0x4060 0x3
    clearflag 0x4000
    warp 0x1 0x4 0xFF 0x6 0x5
    waitstate
    release
    end


    The Pokémon's data is likely to be inside the special event 0x9C. Seems that this event consists of choosing starter and first battle vs Poochyena.
     
    Last edited:
    Recently I started hacking GBA Sapphire ROM. When rescuing Prof. Birch at Route 101, the player encounters a Poochyena. I dug into the event and found that it is likely to be a part of a special event. Isn't it possible to modify this Pokémon?

    I don't know about Sapphire, but in Emerald:

    Change byte at 08032706 to pokeID / 2. If you'd like a poke with an odd ID, then you'd have to change the code.
    The instructions at 08032706 are:
    mov r0, #0x90
    lsl r0, r0, #1 //multiply 0x90 by two

    Btw, the byte responsible for level is at 08032714.
     
    I don't know about Sapphire, but in Emerald:

    Change byte at 08032706 to pokeID / 2. If you'd like a poke with an odd ID, then you'd have to change the code.
    The instructions at 08032706 are:
    mov r0, #0x90
    lsl r0, r0, #1 //multiply 0x90 by two

    Btw, the byte responsible for level is at 08032714.

    Thank you very much. I've successfully located corresponding code in Sapphire and done my modification:
    08008e54 218f mov r1, #0x8f
    08008e56 0049 lsl r1, r1, #0x01
    08008e58 9500 str r5, [sp, #0x0]
    08008e5a 9501 str r5, [sp, #0x4]
    08008e5c 9502 str r5, [sp, #0x8]
    08008e5e 9503 str r5, [sp, #0xc]
    08008e60 1c20 add r0, r4, #0x0
    08008e62 2202 mov r2, #0x2
    08008e64 2320 mov r3, #0x20
    08008e66 f02e bl $08037ba4
     
    Thank you very much. I've successfully located corresponding code in Sapphire and done my modification:
    08008e54 218f mov r1, #0x8f
    08008e56 0049 lsl r1, r1, #0x01
    08008e58 9500 str r5, [sp, #0x0]
    08008e5a 9501 str r5, [sp, #0x4]
    08008e5c 9502 str r5, [sp, #0x8]
    08008e5e 9503 str r5, [sp, #0xc]
    08008e60 1c20 add r0, r4, #0x0
    08008e62 2202 mov r2, #0x2
    08008e64 2320 mov r3, #0x20
    08008e66 f02e bl $08037ba4

    Just one thing. Sapphire is (along with Leaf Green) the least supported rom out there. No research has been on that game, no resources, no patches, etc.
    I'd suggest switching to Emerald(or Fire Red) as it has thousands of new features whereas Sapphire has nothing.
     
    Back
    Top