Skip to content

Option to Skip Copyright and Intro

voloved edited this page Jan 19, 2023 · 1 revision

By devolov

Goal: Be able to choose to skip the intro in the future with a toggle.

joop1

Add a flag for if the intro should play:

-------------------------- include/constants/flags.h --------------------------
index 909bca651..1e16000e4 100644
@@ -1222,9 +1222,9 @@
-#define FLAG_UNUSED_0x499                                           0x499 // Unused Flag
+#define FLAG_SKIP_INTRO                                             0x499
 #define FLAG_UNUSED_0x49A                                           0x49A // Unused Flag
 #define FLAG_UNUSED_0x49B                                           0x49B // Unused Flag
 #define FLAG_UNUSED_0x49C                                           0x49C // Unused Flag
 #define FLAG_UNUSED_0x49D                                           0x49D // Unused Flag

Modify the copyright bootup function to load the save file first, then either play the copyright screen or go straight to the main menu:

The vanilla game shows the copyright screen first, then loads the save file, but I did not see a reason for this to be required aside from speeding up how fast the copyright screen loads. Though I don't notice a difference.

--------------------------------- src/intro.c ---------------------------------
index 961dbd14f..bbbe0556c 100644
@@ -24,8 +24,11 @@
 #include "util.h"
 #include "title_screen.h"
 #include "constants/rgb.h"
 #include "constants/battle_anim.h"
+#include "main_menu.h"
+#include "event_data.h"
+#include "constants/flags.h"
 
 /*
     The intro is grouped into the following scenes
     Scene 0. Copyright screen
@@ -1139,9 +1142,9 @@ static u8 SetUpCopyrightScreen(void)
 }
 
 void CB2_InitCopyrightScreenAfterBootup(void)
 {
-    if (!SetUpCopyrightScreen())
+    if ( gMain.state == 0)
     {
         SetSaveBlocksPointers(GetSaveBlocksPointersBaseOffset());
         ResetMenuAndMonGlobals();
         Save_ResetSaveCounters();
@@ -1150,8 +1153,12 @@ void CB2_InitCopyrightScreenAfterBootup(void)
             Sav2_ClearSetDefault();
         SetPokemonCryStereo(gSaveBlock2Ptr->optionsSound);
         InitHeap(gHeap, HEAP_SIZE);
     }
+    if (FlagGet(FLAG_SKIP_INTRO))
+        CB2_InitMainMenu();
+    else
+        SetUpCopyrightScreen();
 }
 
 void CB2_InitCopyrightScreenAfterTitleScreen(void)
 {

Write a script to allow the user to toggle the flag that was made:

----------- data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc -----------
index acf80f0e4..5dda8d45a 100644
@@ -662,8 +662,30 @@ LittlerootTown_ProfessorBirchsLab_EventScript_ScottAboardSSTidalCall::
 	clearflag FLAG_SCOTT_CALL_BATTLE_FRONTIER
 	releaseall
 	end
 
+LittlerootTown_ProfessorBirchsLab_EventScript_SkipIntro::
+	msgbox LittlerootTown_ProfessorBirchsLab_Text_SkipIntro, MSGBOX_YESNO
+	goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_SkipIntroNo
+	setflag FLAG_SKIP_INTRO
+	msgbox LittlerootTown_ProfessorBirchsLab_Text_SkipIntroYes, MSGBOX_SIGN
+	end
+
+LittlerootTown_ProfessorBirchsLab_EventScript_SkipIntroNo::
+	clearflag FLAG_SKIP_INTRO
+	msgbox LittlerootTown_ProfessorBirchsLab_Text_SkipIntroNo, MSGBOX_SIGN
+	end
+
+LittlerootTown_ProfessorBirchsLab_Text_SkipIntro:
+	.string "Would you like to skip\n"
+	.string "the intro in the future?$"
+
+LittlerootTown_ProfessorBirchsLab_Text_SkipIntroYes:
+	.string "The intro will now be skipped.$"
+
+LittlerootTown_ProfessorBirchsLab_Text_SkipIntroNo:
+	.string "The intro will not be skipped.$"
+
 LittlerootTown_ProfessorBirchsLab_Text_BirchAwayOnFieldwork:
 	.string "Hunh? PROF. BIRCH?\p"
 	.string "The PROF's away on fieldwork.\n"
 	.string "Ergo, he isn't here.\p"

Make it so the back computer in Birch's lab will open the script:

------------- data/maps/LittlerootTown_ProfessorBirchsLab/map.json -------------
index 5609e91c7..95e1047e2 100644
@@ -190,17 +190,17 @@
       "x": 4,
       "y": 1,
       "elevation": 0,
       "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
-      "script": "LittlerootTown_ProfessorBirchsLab_EventScript_PC"
+      "script": "LittlerootTown_ProfessorBirchsLab_EventScript_SkipIntro"
     },
     {
       "type": "sign",
       "x": 3,
       "y": 1,
       "elevation": 0,
       "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
-      "script": "LittlerootTown_ProfessorBirchsLab_EventScript_PC"
+      "script": "LittlerootTown_ProfessorBirchsLab_EventScript_SkipIntro"
     },
     {
       "type": "sign",
       "x": 1,
Clone this wiki locally