• 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] Enable National Dex in PokeRuby, PokeFireRed & PokeEmerald when you first receive the normal PokeDex

  • 58
    Posts
    13
    Years
    • Seen Oct 12, 2024
    As the title says, I need help to activate the National Dex as soon as you receive the regular PokeDex in all Gen III dissassemblies. Here are the problems that I am facing;

    PokeRuby - SPECIAL_EnableNationalPokedex doesn't seem to exist in PokeRuby, as they say the event is ''undefined''. I dunno what to do with that...
    PokeFireRed - Build properly, get a silent white freezing screen when loading the ROM
    PokeEmerald - Same as PokeFireRed, blank screen, game won't load.

    I could not find any decomp tutorials to enable the National Dex, only hex ones (and I don't use hex for my projects.) Here are my scripts that I use.

    POKERUBY
    LittlerootTown_ProfessorBirchsLab_EventScript_152E6D:: @ 8152E6D
    playfanfare MUS_OBTAIN_ITEM
    message LittlerootTown_ProfessorBirchsLab_Text_17422F
    waitfanfare
    waitmessage
    setflag FLAG_SYS_POKEDEX_GET
    special SetUnlockedPokedexFlags
    special EnableNationalDex
    return

    POKEFIRERED
    PalletTown_ProfessorOaksLab_EventScript_ReceiveDexScene:: @ 816961E
    msgbox PalletTown_ProfessorOaksLab_Text_OakHaveSomethingForMe
    textcolor 3
    playfanfare MUS_OBTAIN_TMHM
    message PalletTown_ProfessorOaksLab_Text_DeliveredOaksParcel
    waitmessage
    waitfanfare
    call EventScript_RestorePrevTextColor
    removeitem ITEM_OAKS_PARCEL, 1
    msgbox PalletTown_ProfessorOaksLab_Text_OakCustomBallIOrdered
    playbgm MUS_ENCOUNTER_RIVAL, 0
    msgbox PalletTown_ProfessorOaksLab_Text_RivalGramps
    closemessage
    compare VAR_FACING, DIR_NORTH
    call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalEnterNorth
    compare VAR_FACING, DIR_SOUTH
    call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalEnterSouth
    compare VAR_FACING, DIR_EAST
    call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalEnterEastWest
    compare VAR_FACING, DIR_WEST
    call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalEnterEastWest
    fadedefaultbgm
    msgbox PalletTown_ProfessorOaksLab_Text_RivalWhatDidYouCallMeFor
    closemessage
    delay 30
    playse SE_PIN
    applymovement LOCALID_PROF_OAK, Movement_ExclamationMark
    waitmovement 0
    applymovement LOCALID_PROF_OAK, Movement_Delay48
    waitmovement 0
    compare VAR_FACING, DIR_SOUTH
    call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneOakFacePlayerAndRivalSouth
    compare VAR_FACING, DIR_EAST
    call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneOakFacePlayerAndRivalEast
    compare VAR_FACING, DIR_WEST
    call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneOakFacePlayerAndRivalWest
    compare VAR_FACING, DIR_NORTH
    call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneOakFacePlayerAndRivalNorth
    msgbox PalletTown_ProfessorOaksLab_Text_OakHaveRequestForYouTwo
    closemessage
    compare VAR_FACING, DIR_NORTH
    call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneOakWalkToDeskNorth
    compare VAR_FACING, DIR_SOUTH
    call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneOakWalkToDeskSouth
    compare VAR_FACING, DIR_EAST
    call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneOakWalkToDeskEast
    compare VAR_FACING, DIR_WEST
    call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneOakWalkToDeskWest
    msgbox PalletTown_ProfessorOaksLab_Text_OakPokedexOnDesk
    closemessage
    delay 40
    msgbox PalletTown_ProfessorOaksLab_Text_OakTakeTheseWithYou
    closemessage
    applymovement LOCALID_PROF_OAK, Movement_WalkInPlaceFastestUp
    waitmovement 0
    removeobject LOCALID_POKEDEX_1
    delay 10
    removeobject LOCALID_POKEDEX_2
    delay 25
    compare VAR_FACING, DIR_NORTH
    call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverNorth
    compare VAR_FACING, DIR_SOUTH
    call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverSouth
    compare VAR_FACING, DIR_EAST
    call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverEast
    compare VAR_FACING, DIR_WEST
    call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverWest
    delay 10
    textcolor 3
    playfanfare MUS_OBTAIN_KEY_ITEM
    message PalletTown_ProfessorOaksLab_Text_ReceivedPokedexFromOak
    waitmessage
    waitfanfare
    call EventScript_RestorePrevTextColor
    setflag FLAG_SYS_POKEDEX_GET
    special SetUnlockedPokedexFlags
    special EnableNationalPokedex
    (script continues below this one)

    POKEEMERALD

    LittlerootTown_ProfessorBirchsLab_EventScript_ReceivePokedex:: @ 81FA3AC
    playfanfare MUS_OBTAIN_ITEM
    message LittlerootTown_ProfessorBirchsLab_Text_ReceivedPokedex
    waitfanfare
    setflag FLAG_SYS_POKEDEX_GET
    setflag FLAG_RECEIVED_POKEDEX_FROM_BIRCH
    special SetUnlockedPokedexFlags
    special EnableNationalPokedex
    setvar VAR_CABLE_CLUB_TUTORIAL_STATE, 1
    return
     
    PokeFireRed - Build properly, get a silent white freezing screen when loading the ROM
    PokeEmerald - Same as PokeFireRed, blank screen, game won't load.
    Are you playing on an emulator? Which one?
    If you're using VBA, you need to set the Save Type to Flash 128K by going to Options -> Emulator -> Save Type.
    By default, VBA uses Flash 64K, which is not compatible with neither Pokémon FireRed nor Emerald.

    Also yeah, Pokeruby doesn't have a preset scripting special to unlock the National Dex.
    However, the exact same function of code that is used to enable it in an overworld script normally in FRLG and Emerald is present in Pokeruby.
    In other words, you just have to define EnableNationalPokedex in data/specials.inc just like the rest of the specials, and then you'll be able to use it normally in your scripts.
     
    Last edited:
    As the title says, I need help to activate the National Dex as soon as you receive the regular PokeDex in all Gen III dissassemblies. Here are the problems that I am facing;

    I don't know if you've solved this already but I just wanted to drop in my 2 cents.

    So depending on what your actual goal is there's a couple different ways you can go about this.

    For my stuff all I cared about was removing the non-region evolution block, that's as simple as finding and changing that part of the function for the dex within the code. So you don't even need to script for that.

    Also you code possibly delete the regional dex and have it just give the national dex, (I haven't learned scripting yet, so I don't know if that would cause problems if script specifically refers to the other dex name/ID) .

    Alternately you can swap the code for the regional dex out for the code for the national dex, so when you get the first dex you'd actually activate the other one.

    Don't know if I was saying this to you before or someone else, but there's a LOT of options for solving problems with romhacks.
    And that's what I really love about it most. :)
     
    Back
    Top