• 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!
  • 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.

[Script✓] Script where Professor Birch gives you the Pokedex

  • 157
    Posts
    8
    Years
    • Seen Nov 19, 2023
    Hacking Emerald, wanting to make Professor Birch give you the National dex at instead of the regular dex at the start of the game. Only problem is, I haven't been able to find the script where he gives it to you. I have checked the levels scripts for his lab, along with all scripts for person events in his lab. If knows anything that might help me find it I'd really appreciate it!
     
    Last edited by a moderator:
    Hey man I think I've found where the scripts are. What I did was convert the beginning lines of dialogue to the game's alphabet in hex, and searched it up in HxD. Then I looked for any traces/pointers to the text to figure out what script calls the 'msgbox'. Next I used XSE to kind of trial-and-error it by decompiling the offsets repeatedly, counting backwards by 1 each time so I could locate the beginning of the main scripts. Eventually the scripts appeared with a normal structure, which is shown below. To be safe, I counted even further back when decompiling to make sure that they actually start at the offsets I found, so I'm almost completely sure these are their actual offsets. Only problem is that I don't know how they 'connect' to one another (as in after the first script is over the second starts with no break), only that each part of that dialogue begins with these offsets:

    Script that runs immediately after exiting house post-game:
    Spoiler:


    Once the previous script warps you to the lab:
    Spoiler:
     
    Last edited:
    Use special 0x1F3 to activate the national Dex in Emerald, like this:

    Avara said:
    #org @main
    lock
    faceplayer
    special 0x1F3
    msgbox @msg1 0x6
    release
    end

    #org @msg1
    = Your Pokédex was updated!
     
    Last edited:
    Hey man I think I've found where the scripts are. What I did was convert the beginning lines of dialogue to the game's alphabet in hex, and searched it up in HxD. Then I looked for any traces/pointers to the text to figure out what script calls the 'msgbox'. Next I used XSE to kind of trial-and-error it by decompiling the offsets repeatedly, counting backwards by 1 each time so I could locate the beginning of the main scripts. Eventually the scripts appeared with a normal structure, which is shown below. To be safe, I counted even further back when decompiling to make sure that they actually start at the offsets I found, so I'm almost completely sure these are their actual offsets. Only problem is that I don't know how they 'connect' to one another (as in after the first script is over the second starts with no break), only that each part of that dialogue begins with these offsets:

    Script that runs immediately after exiting house post-game:
    Spoiler:


    Once the previous script warps you to the lab:
    Spoiler:
    Thanks for this! Do you happen to know the offset for the script where the player initially receives the hoenn pokedex as well?
     
    I see that I'm half a year late but I found this thread because I was googling this problem myself. I too couldn't find where he gave the dex. I don't know if OP still needs it but I found it at 0x1FA2FB.
     
    Back
    Top