• 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!
  • Dawn, Gloria, Juliana, or Summer - 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.

Firered: open save menu when healing at pokecenter

  • 9
    Posts
    14
    Days
    • Seen yesterday
    Hello, I'm trying to make a system in my romhack where you save at the pokecenter when you heal, instead of from the start menu. Just as a sort of strategic thing. I found the codes to save in src/save.c, and the code that calls the menu and everything is in src/start_menu.c; my plan was to try and call the code from start_menu.c during the heal process, if I could find where that process is located.
    Can anyone give some input? Where the save process is located in the code, and whether or not my plan as is will be successful.
     
    Where the save process is located in the code
    FRLG has 2 special functions to call the save prompt in the overworld, CableClub_AskSaveTheGame and Field_AskSaveTheGame.
    The former goes unused, while the other one is used to open the save prompt in the overworld whenever it's needed.

    What I'd do if I were you is to remove STARTMENU_SAVE from enum StartMenuOption, { gText_MenuSave, {.u8_void = StartMenuSaveCallback} }, from sStartMenuActionTable and AppendToStartMenuItems(STARTMENU_SAVE); from SetUpStartMenu_NormalField.
    This will remove the access to the Save menu from the start menu completely.
    The rest is a matter of modifying Nurse Joy's script to add a call to the aforementioned special function that opens the save prompt before the text string Text_WeHopeToSeeYouAgain is printed.

    Ex:
    Diff:
    diff --git a/data/scripts/pkmn_center_nurse.inc b/data/scripts/pkmn_center_nurse.inc
    index 507c8a498..80ed2af11 100644
    --- a/data/scripts/pkmn_center_nurse.inc
    +++ b/data/scripts/pkmn_center_nurse.inc
    @@ -42,6 +42,7 @@ EventScript_PkmnCenterNurse_ReturnPkmn::
         waitmessage
         applymovement VAR_LAST_TALKED, Movement_Bow
         waitmovement 0
    +    call EventScript_AskSaveGame
         msgbox Text_WeHopeToSeeYouAgain
         return
     
    @@ -53,10 +54,12 @@ EventScript_PkmnCenterNurse_PlayerWaitingInUnionRoom::
         waitmessage
         applymovement VAR_LAST_TALKED, Movement_Bow
         waitmovement 0
    +    call EventScript_AskSaveGame
         msgbox Text_WeHopeToSeeYouAgain
         return
     
     EventScript_PkmnCenterNurse_Goodbye::
    +    call EventScript_AskSaveGame
         msgbox Text_WeHopeToSeeYouAgain
         return
     
    diff --git a/src/start_menu.c b/src/start_menu.c
    index f39176ccc..a767ac5b6 100644
    --- a/src/start_menu.c
    +++ b/src/start_menu.c
    @@ -43,7 +43,6 @@ enum StartMenuOption
         STARTMENU_POKEMON,
         STARTMENU_BAG,
         STARTMENU_PLAYER,
    -    STARTMENU_SAVE,
         STARTMENU_OPTION,
         STARTMENU_EXIT,
         STARTMENU_RETIRE,
    @@ -117,7 +116,6 @@ static const struct MenuAction sStartMenuActionTable[] = {
         { gText_MenuPokemon, {.u8_void = StartMenuPokemonCallback} },
         { gText_MenuBag, {.u8_void = StartMenuBagCallback} },
         { gText_MenuPlayer, {.u8_void = StartMenuPlayerCallback} },
    -    { gText_MenuSave, {.u8_void = StartMenuSaveCallback} },
         { gText_MenuOption, {.u8_void = StartMenuOptionCallback} },
         { gText_MenuExit, {.u8_void = StartMenuExitCallback} },
         { gText_MenuRetire, {.u8_void = StartMenuSafariZoneRetireCallback} },
    @@ -217,7 +215,6 @@ static void SetUpStartMenu_NormalField(void)
             AppendToStartMenuItems(STARTMENU_POKEMON);
         AppendToStartMenuItems(STARTMENU_BAG);
         AppendToStartMenuItems(STARTMENU_PLAYER);
    -    AppendToStartMenuItems(STARTMENU_SAVE);
         AppendToStartMenuItems(STARTMENU_OPTION);
         AppendToStartMenuItems(STARTMENU_EXIT);
     }

    [PokeCommunity.com] Firered: open save menu when healing at pokecenter
     
    Back
    Top