Seen 5 Hours Ago
Posted 1 Week Ago
174 posts
4.8 Years
POKEEMERALD
PSS IN THE START MENU
First, we add a new Flag in include/constants/flags.h
FLAG_POKEMONPCMENU
(this will be used after)
Then, we go to include/pokemon_storage_system.h
There, we add anywhere:
void EnterPokeStorage(u8);
Then we go to src/pokemon_storage_system.c, and we delete
static void EnterPokeStorage(u8);
(when its definied, the first one)
and we search for "static void EnterPokeStorage(u8 boxOption)", then we erase the "static " (the second one)
Then, we search for:
static void FieldTask_ReturnToPcMenu(void)
And we replace it entirely for this:
static void FieldTask_ReturnToPcMenu(void)
{
    u8 taskId;
    MainCallback vblankCb = gMain.vblankCallback;
	if (FlagGet(FLAG_POKEMONPCMENU)==TRUE)
	{
		SetVBlankCallback(NULL);
		taskId = CreateTask(Task_PCMainMenu, 80);
		gTasks[taskId].tState = 0;
		gTasks[taskId].tSelectedOption = sPreviousBoxOption;
		Task_PCMainMenu(taskId);
		SetVBlankCallback(vblankCb);
		FadeInFromBlack();
	}
	else {
		ScriptContext2_Disable();
		EnableBothScriptContexts();
		SetVBlankCallback(CB2_ReturnToField);
		FadeInFromBlack();
	}
}
Then, we go to src/start_menu.c, and we search for: static bool8 StartMenuBagCallback(void);, and right after, we add:
static bool8 StartMenuPCCallback(void);
Then, we go to "{gText_MenuBag, {.u8_void = StartMenuBagCallback}}," and again we add bellow:
{gText_MenuPC, {.u8_void = StartMenuPCCallback}},
Then, we go to "static bool8 StartMenuBagCallback(void)" and after the whole funcion we add:
static bool8 StartMenuPCCallback(void)
{
	u8 taskId;
    if (!gPaletteFade.active)
    {
        PlayRainStoppingSoundEffect();
        RemoveExtraStartMenuWindows();
		EnterPokeStorage(x);
        return TRUE;
    }

    return FALSE;
}
(in my case, its "0" the number for the Move Pokémon System, but I have made some changes {I changed the Move option to the first place}, and I'm sure the original number for the option is "2"...)

Then, we search for: "MENU_ACTION_BAG"
And after we add: "MENU_ACTION_PC,"

Now we go to: "if (FlagGet(FLAG_SYS_POKEMON_GET) == TRUE)" and inside there we add:
AddStartMenuAction(MENU_ACTION_PC);
Like this:
    if (FlagGet(FLAG_SYS_POKEMON_GET) == TRUE)
    {
        AddStartMenuAction(MENU_ACTION_POKEMON);
		AddStartMenuAction(MENU_ACTION_PC);
    }
Then, we go to "AddStartMenuAction(MENU_ACTION_BAG);" and right after we add:
AddStartMenuAction(MENU_ACTION_PC);

Then, we go to data/scripts/pc.inc and we add this after "playse SE_PC_ON" in "EventScript_PC:: @ 8271D92":
setflag FLAG_POKEMONPCMENU
Now, after "special DoPCTurnOffEffect", in "EventScript_TurnOffPC:: @ 8271E47" we add:
clearflag FLAG_POKEMONPCMENU

Lastly, we need to add the strings for the PC in the Start Menu, (thanks, Lunos)
We go to include/strings.h and we add this somewhere:

extern const u8 gText_MenuPC[];

And this is the last step. We go to src/strings.c and we add this somewhere:
const u8 gText_MenuPC[] = _("PC");

And we're done! this time, we are We should be able to enter the Move Pokémon PC, and the Pokécenter PC's won't be affected.