From 4582fd15456e2c84588026cdfbe70d6b6e558a35 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Fri, 22 Feb 2019 19:52:11 -0500 Subject: Name a ton of commonly used event scripts --- data/maps/Route119_WeatherInstitute_2F/scripts.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data/maps/Route119_WeatherInstitute_2F/scripts.inc') diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc index bbee65df8..6826e5fe0 100644 --- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc @@ -98,7 +98,7 @@ Route119_WeatherInstitute_2F_EventScript_270085:: @ 8270085 compare VAR_RESULT, 0 goto_if_eq Route119_WeatherInstitute_2F_EventScript_2700EA call Route119_WeatherInstitute_2F_EventScript_27378B - call Route119_WeatherInstitute_2F_EventScript_2723DD + call Common_EventScript_NameReceivedPokemon goto Route119_WeatherInstitute_2F_EventScript_2700EA end -- cgit v1.2.3 From 0de831fd290b44b6b7236fb849e2e0318f9ebe3f Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Fri, 22 Feb 2019 20:09:14 -0500 Subject: Name some common single-entry movements --- data/maps/Route119_WeatherInstitute_2F/scripts.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data/maps/Route119_WeatherInstitute_2F/scripts.inc') diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc index 6826e5fe0..21d34eed1 100644 --- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc @@ -55,9 +55,9 @@ Route119_WeatherInstitute_2F_EventScript_26FFC8:: @ 826FFC8 msgbox Route119_WeatherInstitute_2F_Text_270568, MSGBOX_DEFAULT closemessage playse SE_PIN - applymovement 3, Route119_WeatherInstitute_2F_Movement_272598 + applymovement 3, Common_Movement_ExclamationMark waitmovement 0 - applymovement 3, Route119_WeatherInstitute_2F_Movement_27259A + applymovement 3, Common_Movement_Delay48 waitmovement 0 msgbox Route119_WeatherInstitute_2F_Text_2705DD, MSGBOX_DEFAULT closemessage -- cgit v1.2.3 From 8816aa527d7f3adfa10988ac661b9842bf78e64b Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Fri, 22 Feb 2019 02:28:32 -0500 Subject: Update map script files --- data/maps/Route119_WeatherInstitute_2F/scripts.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data/maps/Route119_WeatherInstitute_2F/scripts.inc') diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc index 21d34eed1..7d557fdef 100644 --- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc @@ -1,5 +1,5 @@ Route119_WeatherInstitute_2F_MapScripts:: @ 826FF1E - map_script 3, Route119_WeatherInstitute_2F_MapScript1_26FF24 + map_script MAP_SCRIPT_ON_TRANSITION, Route119_WeatherInstitute_2F_MapScript1_26FF24 .byte 0 Route119_WeatherInstitute_2F_MapScript1_26FF24: @ 826FF24 -- cgit v1.2.3 From fe55580fe1e51c669033939125c939ed13a555d0 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Wed, 27 Feb 2019 03:42:04 -0500 Subject: Reverse engineer unusual weather events --- data/maps/Route119_WeatherInstitute_2F/scripts.inc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'data/maps/Route119_WeatherInstitute_2F/scripts.inc') diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc index 7d557fdef..2eaeceb2f 100644 --- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc @@ -137,11 +137,13 @@ Route119_WeatherInstitute_2F_EventScript_2700F7:: @ 82700F7 end Route119_WeatherInstitute_2F_EventScript_27010A:: @ 827010A + @ This code uses VAR_0x8004 to count the number of legendaries the player has defeated + @ already. setvar VAR_0x8004, 0 - call_if_set FLAG_DEFEATED_KYOGRE, Route119_WeatherInstitute_2F_EventScript_270160 - call_if_set FLAG_DEFEATED_GROUDON, Route119_WeatherInstitute_2F_EventScript_270160 + call_if_set FLAG_DEFEATED_KYOGRE, WeatherInstitute_UnusualWeather_IncrementLegendCount + call_if_set FLAG_DEFEATED_GROUDON, WeatherInstitute_UnusualWeather_IncrementLegendCount compare VAR_0x8004, 2 - goto_if_eq Route119_WeatherInstitute_2F_EventScript_270166 + goto_if_eq WeatherInstitute_UnusualWeather_LegendariesAlreadyDefeated call_if_unset FLAG_TEMP_2, Route119_WeatherInstitute_2F_EventScript_270159 specialvar VAR_RESULT, sub_813B374 compare VAR_RESULT, 1 @@ -156,16 +158,16 @@ Route119_WeatherInstitute_2F_EventScript_27014F:: @ 827014F end Route119_WeatherInstitute_2F_EventScript_270159:: @ 8270159 - special sub_813B2E4 + special CreateUnusualWeatherEvent setflag FLAG_TEMP_2 return -Route119_WeatherInstitute_2F_EventScript_270160:: @ 8270160 +WeatherInstitute_UnusualWeather_IncrementLegendCount:: @ 8270160 addvar VAR_0x8004, 1 return -Route119_WeatherInstitute_2F_EventScript_270166:: @ 8270166 - msgbox Route119_WeatherInstitute_2F_Text_2708FC, MSGBOX_DEFAULT +WeatherInstitute_UnusualWeather_LegendariesAlreadyDefeated:: @ 8270166 + msgbox WeatherInstitute_UnusualWeather_LegendariesAlreadyDefeatedText, MSGBOX_DEFAULT release end @@ -325,7 +327,7 @@ Route119_WeatherInstitute_2F_Text_270873: @ 8270873 .string "Could that mean, somewhere near\n" .string "{STR_VAR_1}…$" -Route119_WeatherInstitute_2F_Text_2708FC: @ 82708FC +WeatherInstitute_UnusualWeather_LegendariesAlreadyDefeatedText: @ 82708FC .string "Abnormal weather conditions are\n" .string "no longer being reported.\p" .string "The occasional rainfall is a blessing,\n" -- cgit v1.2.3 From c1348d22f3d85cbc7425e8498a023b9b525f7207 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Wed, 27 Feb 2019 04:27:54 -0500 Subject: Name most event scripts related to unusual weather --- data/maps/Route119_WeatherInstitute_2F/scripts.inc | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'data/maps/Route119_WeatherInstitute_2F/scripts.inc') diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc index 2eaeceb2f..fa2664d68 100644 --- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc @@ -131,43 +131,43 @@ Route119_WeatherInstitute_2F_EventScript_2700EA:: @ 82700EA end Route119_WeatherInstitute_2F_EventScript_2700F7:: @ 82700F7 - goto_if_set FLAG_SYS_GAME_CLEAR, Route119_WeatherInstitute_2F_EventScript_27010A + goto_if_set FLAG_SYS_GAME_CLEAR, Route119_WeatherInstitute_2F_EventScript_TryStartUnusualWeather msgbox Route119_WeatherInstitute_2F_Text_27077E, MSGBOX_DEFAULT release end -Route119_WeatherInstitute_2F_EventScript_27010A:: @ 827010A +Route119_WeatherInstitute_2F_EventScript_TryStartUnusualWeather:: @ 827010A @ This code uses VAR_0x8004 to count the number of legendaries the player has defeated @ already. setvar VAR_0x8004, 0 - call_if_set FLAG_DEFEATED_KYOGRE, WeatherInstitute_UnusualWeather_IncrementLegendCount - call_if_set FLAG_DEFEATED_GROUDON, WeatherInstitute_UnusualWeather_IncrementLegendCount + call_if_set FLAG_DEFEATED_KYOGRE, WeatherInstitute_UnusualWeather_EventScript_IncrementLegendCount + call_if_set FLAG_DEFEATED_GROUDON, WeatherInstitute_UnusualWeather_EventScript_IncrementLegendCount compare VAR_0x8004, 2 - goto_if_eq WeatherInstitute_UnusualWeather_LegendariesAlreadyDefeated - call_if_unset FLAG_TEMP_2, Route119_WeatherInstitute_2F_EventScript_270159 - specialvar VAR_RESULT, sub_813B374 + goto_if_eq WeatherInstitute_UnusualWeather_EventScript_ShowLegendariesAlreadyDefeated + call_if_unset FLAG_TEMP_2, WeatherInstitute_UnusualWeather_EventScript_DoCreateUnusualWeather + specialvar VAR_RESULT, GetUnusualWeatherMapNameAndType compare VAR_RESULT, 1 - goto_if_eq Route119_WeatherInstitute_2F_EventScript_27014F - msgbox Route119_WeatherInstitute_2F_Text_2707F1, MSGBOX_DEFAULT + goto_if_eq WeatherInstitute_UnusualWeather_EventScript_ShowKyogreWeatherMessage + msgbox WeatherInstitute_UnusualWeather_GroudonWeatherText, MSGBOX_DEFAULT release end -Route119_WeatherInstitute_2F_EventScript_27014F:: @ 827014F - msgbox Route119_WeatherInstitute_2F_Text_270873, MSGBOX_DEFAULT +WeatherInstitute_UnusualWeather_EventScript_ShowKyogreWeatherMessage:: @ 827014F + msgbox WeatherInstitute_UnusualWeather_KyogreWeatherText, MSGBOX_DEFAULT release end -Route119_WeatherInstitute_2F_EventScript_270159:: @ 8270159 +WeatherInstitute_UnusualWeather_EventScript_DoCreateUnusualWeather:: @ 8270159 special CreateUnusualWeatherEvent setflag FLAG_TEMP_2 return -WeatherInstitute_UnusualWeather_IncrementLegendCount:: @ 8270160 +WeatherInstitute_UnusualWeather_EventScript_IncrementLegendCount:: @ 8270160 addvar VAR_0x8004, 1 return -WeatherInstitute_UnusualWeather_LegendariesAlreadyDefeated:: @ 8270166 - msgbox WeatherInstitute_UnusualWeather_LegendariesAlreadyDefeatedText, MSGBOX_DEFAULT +WeatherInstitute_UnusualWeather_EventScript_ShowLegendariesAlreadyDefeated:: @ 8270166 + msgbox WeatherInstitute_UnusualWeather_EventScript_ShowLegendariesAlreadyDefeatedText, MSGBOX_DEFAULT release end @@ -311,7 +311,7 @@ Route119_WeatherInstitute_2F_Text_27077E: @ 827077E .string "years, but it's ridiculous to think that\l" .string "humans can freely change the weather.$" -Route119_WeatherInstitute_2F_Text_2707F1: @ 82707F1 +WeatherInstitute_UnusualWeather_GroudonWeatherText: @ 82707F1 .string "I track weather patterns over\n" .string "the HOENN region.\p" .string "Presently, a drought has been recorded\n" @@ -319,7 +319,7 @@ Route119_WeatherInstitute_2F_Text_2707F1: @ 82707F1 .string "Could that mean, somewhere near\n" .string "{STR_VAR_1}…$" -Route119_WeatherInstitute_2F_Text_270873: @ 8270873 +WeatherInstitute_UnusualWeather_KyogreWeatherText: @ 8270873 .string "I track weather patterns over\n" .string "the HOENN region.\p" .string "Presently, heavy rainfall has been\n" @@ -327,7 +327,7 @@ Route119_WeatherInstitute_2F_Text_270873: @ 8270873 .string "Could that mean, somewhere near\n" .string "{STR_VAR_1}…$" -WeatherInstitute_UnusualWeather_LegendariesAlreadyDefeatedText: @ 82708FC +WeatherInstitute_UnusualWeather_EventScript_ShowLegendariesAlreadyDefeatedText: @ 82708FC .string "Abnormal weather conditions are\n" .string "no longer being reported.\p" .string "The occasional rainfall is a blessing,\n" -- cgit v1.2.3