From 040994ebde80a58a0b66a51d3413edc6e190922c Mon Sep 17 00:00:00 2001 From: Neka Date: Sun, 22 Dec 2024 21:18:11 +0100 Subject: [PATCH 01/16] Init battling, tasks, and callback symbol to start debug Ruby JP --- .../symbols/patches/language/pokeruby.yml | 35 ++++++------------- 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/modules/data/symbols/patches/language/pokeruby.yml b/modules/data/symbols/patches/language/pokeruby.yml index 6830ccd88..e07fb0aca 100644 --- a/modules/data/symbols/patches/language/pokeruby.yml +++ b/modules/data/symbols/patches/language/pokeruby.yml @@ -194,17 +194,15 @@ SUB_8096B38: # Bag Menu # #--------------# sub_80A3118: - J: 0x809f6dc + J: ~ sCurrentBagPocket: - J: 0x2038258 + J: ~ gBagPocketScrollStates: - J: 0x3005c30 + J: ~ sub_80A5414: - J: 0x80a15d4 -gPaletteFade: - J: 0x202f0a8 + J: ~ sub_80A50C8: - J: 0x80a12c0 + J: ~ #---------------# #-----------------# @@ -212,9 +210,9 @@ sub_80A50C8: #-----------------# # Start Menu sub_80712B4: - J: 0x806e5f4 + J: ~ HandleDefaultPartyMenu: - J: 0x8086b4c + J: ~ sStartMenuCursorPos: J: 0x202e64c sNumStartMenuActions: @@ -227,25 +225,14 @@ sCurrentStartMenuActions: # Party Menu # #----------------# CB2_PartyMenuMain: - J: 0x80681f4 + J: ~ # Pokemon action menu sub_8089D94: - J: 0x8086c04 + J: ~ HandleBattlePartyMenu: - J: 0x8091c90 + J: ~ Task_HandlePopupMenuInput: - J: 0x8091f80 -# Pokemon switch -sub_806D198: - J: 0x806a408 -HandlePartyMenuSwitchPokemonInput: - J: 0x8069dd4 -sPokeMenuCursorPos: - J: 0x202fcc4 -sPokeMenuOptionsNo: - J: 0x202fcc5 -sPokeMenuOptionsOrder: - J: 0x202fcc6 + J: ~ #----------------# #-------------------# From 061865a56bbe4ca52d74d78ddbf6c592110bec90 Mon Sep 17 00:00:00 2001 From: Neka Date: Mon, 23 Dec 2024 00:26:23 +0100 Subject: [PATCH 02/16] Fix leader switch on Ruby EU --- .../symbols/patches/language/pokeruby.yml | 35 +++++++++++++------ 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/modules/data/symbols/patches/language/pokeruby.yml b/modules/data/symbols/patches/language/pokeruby.yml index e07fb0aca..6ab55b8ab 100644 --- a/modules/data/symbols/patches/language/pokeruby.yml +++ b/modules/data/symbols/patches/language/pokeruby.yml @@ -194,15 +194,17 @@ SUB_8096B38: # Bag Menu # #--------------# sub_80A3118: - J: ~ + J: 0x809f6dc sCurrentBagPocket: - J: ~ + J: 0x2038258 gBagPocketScrollStates: - J: ~ + J: 0x3005c40 sub_80A5414: - J: ~ + J: 0x80a15d4 +gPaletteFade: + J: 0x202f0a8 sub_80A50C8: - J: ~ + J: 0x80a12c0 #---------------# #-----------------# @@ -210,9 +212,9 @@ sub_80A50C8: #-----------------# # Start Menu sub_80712B4: - J: ~ + J: 0x806e5f4 HandleDefaultPartyMenu: - J: ~ + J: 0x8086b4c sStartMenuCursorPos: J: 0x202e64c sNumStartMenuActions: @@ -225,14 +227,25 @@ sCurrentStartMenuActions: # Party Menu # #----------------# CB2_PartyMenuMain: - J: ~ + J: 0x80681f4 # Pokemon action menu sub_8089D94: - J: ~ + J: 0x8086c04 HandleBattlePartyMenu: - J: ~ + J: 0x8091c90 Task_HandlePopupMenuInput: - J: ~ + J: 0x8091f80 +# Pokemon switch +sub_806D198: + J: 0x806a408 +HandlePartyMenuSwitchPokemonInput: + J: 0x8069dd4 +sPokeMenuCursorPos: + J: 0x202fcc4 +sPokeMenuOptionsNo: + J: 0x202fcc5 +sPokeMenuOptionsOrder: + J: 0x202fcc6 #----------------# #-------------------# From 99b340a776fa6b97fa8b01366c77a94a26dc1d45 Mon Sep 17 00:00:00 2001 From: Neka Date: Tue, 24 Dec 2024 00:30:25 +0100 Subject: [PATCH 03/16] Fix Menu parsing for Ruby JP --- modules/data/symbols/patches/language/pokeruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/data/symbols/patches/language/pokeruby.yml b/modules/data/symbols/patches/language/pokeruby.yml index 6ab55b8ab..6830ccd88 100644 --- a/modules/data/symbols/patches/language/pokeruby.yml +++ b/modules/data/symbols/patches/language/pokeruby.yml @@ -198,7 +198,7 @@ sub_80A3118: sCurrentBagPocket: J: 0x2038258 gBagPocketScrollStates: - J: 0x3005c40 + J: 0x3005c30 sub_80A5414: J: 0x80a15d4 gPaletteFade: From 6924bd2c866ca89269709aca3af03aca1d0100a7 Mon Sep 17 00:00:00 2001 From: Neka Date: Tue, 24 Dec 2024 14:39:38 +0100 Subject: [PATCH 04/16] Support Daycare for Ruby JP --- .../symbols/patches/language/pokeruby.yml | 42 ++++++++++--------- .../patches/language/pokeruby_rev1.yml | 14 ++----- wiki/pages/Mode - Daycare.md | 2 +- 3 files changed, 27 insertions(+), 31 deletions(-) diff --git a/modules/data/symbols/patches/language/pokeruby.yml b/modules/data/symbols/patches/language/pokeruby.yml index 6830ccd88..8b6f894ba 100644 --- a/modules/data/symbols/patches/language/pokeruby.yml +++ b/modules/data/symbols/patches/language/pokeruby.yml @@ -6,18 +6,19 @@ CB2_OVERWORLD: J: 0x8051618 # Door exit sub_8080B9C: - J: ~ + J: 0x807da78 Task_HandleYesNoInput: - J: ~ + J: 0x80b0b4c Task_FieldMessageBox: - J: ~ + J: 0x8061c2c +# 0x7 Std_MsgboxDefault: - J: ~ -# 0x6 + J: 0x817f404 +# 0x9 Std_MsgboxYesNo: - J: ~ + J: 0x817f40c WaitForAorBPress: - J: ~ + J: 0x8064401 Task_DuckBGMForPokemonCry: J: ~ CB2_FlyRegionMap: @@ -26,6 +27,8 @@ gMain: J: 0x30016e0 gFieldMessageBoxWindow: J: 0x202e5dc +sScriptContext1: + J: 0x3000520 sScriptContext2: J: 0x30005a0 #-------------------------------# @@ -163,22 +166,14 @@ Task_EvolutionScene: # Daycare Mode # #----------------# S_EggHatch: - J: ~ + J: 0x818bee4 # EggHatch party identification gSpecialVar_0x8004: - J: ~ + J: 0x202e620 Task_Fanfare: - J: ~ + J: 0x8071f50 #----------------# -#--------------# -# Listeners # -#--------------# - -CB2_EggHatch_1: - J: ~ -#---------------# - #-------------------------# # PC Menu / Storage # #-------------------------# @@ -313,5 +308,12 @@ BattleBeginFirstTurn: S_RepelWoreOff: J: ~ gEggHatchData: - J: ~ -#----------------# \ No newline at end of file + J: 0x300474c +CB2_EggHatch_1: + J: 0x804022d +#----------------# + +# Ununsed symbols that were conflicting with currently used symbols +# We set them to 0x0 to 'get them out of our way' and correctly target the desired symbol +LilycoveCity_House4_Text_18BEE8: + J: 0x0 \ No newline at end of file diff --git a/modules/data/symbols/patches/language/pokeruby_rev1.yml b/modules/data/symbols/patches/language/pokeruby_rev1.yml index 4d88192dc..62fa8e47c 100644 --- a/modules/data/symbols/patches/language/pokeruby_rev1.yml +++ b/modules/data/symbols/patches/language/pokeruby_rev1.yml @@ -228,16 +228,6 @@ Task_Fanfare: S: 0x80753d4 #----------------# -#--------------# -# Listeners # -#--------------# - -CB2_EggHatch_1: - F: 0x804341c - I: 0x8043344 - S: 0x804342c -#---------------# - #-------------------------# # PC Menu / Storage # #-------------------------# @@ -423,6 +413,10 @@ gEggHatchData: F: 0x300482c I: 0x300482c S: 0x300482c +CB2_EggHatch_1: + F: 0x804341c + I: 0x8043344 + S: 0x804342c # Poison faint 0x5 gUnknown_081A14B8: F: 0x81a699c diff --git a/wiki/pages/Mode - Daycare.md b/wiki/pages/Mode - Daycare.md index 5eb43f499..5c4b3a72b 100644 --- a/wiki/pages/Mode - Daycare.md +++ b/wiki/pages/Mode - Daycare.md @@ -36,7 +36,7 @@ not Shiny. | | πŸŸ₯ Ruby | πŸ”· Sapphire | 🟒 Emerald | πŸ”₯ FireRed | 🌿 LeafGreen | | :------- | :-----: | :---------: | :--------: | :--------: | :----------: | | English | βœ… | βœ… | βœ… | βœ… | βœ… | -| Japanese | ❌ | ❌ | βœ… | βœ… | βœ… | +| Japanese | βœ… | ❌ | βœ… | βœ… | βœ… | | German | βœ… | ❌ | βœ… | βœ… | βœ… | | Spanish | βœ… | ❌ | βœ… | βœ… | βœ… | | French | βœ… | ❌ | βœ… | βœ… | βœ… | From 56f1ce49aea2a3315789291dc513d8917acbe106 Mon Sep 17 00:00:00 2001 From: Neka Date: Tue, 24 Dec 2024 17:40:00 +0100 Subject: [PATCH 05/16] Support battling for Ruby JP --- .../symbols/patches/language/pokeruby.yml | 41 +++++++++++-------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/modules/data/symbols/patches/language/pokeruby.yml b/modules/data/symbols/patches/language/pokeruby.yml index 8b6f894ba..bfd36e238 100644 --- a/modules/data/symbols/patches/language/pokeruby.yml +++ b/modules/data/symbols/patches/language/pokeruby.yml @@ -20,9 +20,9 @@ Std_MsgboxYesNo: WaitForAorBPress: J: 0x8064401 Task_DuckBGMForPokemonCry: - J: ~ + J: 0x8072440 CB2_FlyRegionMap: - J: ~ + J: 0x80f71b0 gMain: J: 0x30016e0 gFieldMessageBoxWindow: @@ -103,7 +103,7 @@ gBattleMainFunc: gBattleResults: J: 0x3004210 gBattlerControllerFuncs: - J: 0x3004378 + J: 0x3004260 gBattlescriptCurrInstr: J: 0x2024970 GTASKS: @@ -135,25 +135,31 @@ gBattlePartyCurrentOrder: # Turn selection sub_8012324: - J: ~ + J: 0x800f630 sub_802C098: - J: ~ + J: 0x8029320 +HandleAction_ChooseMove: + J: 0x80298fd # Turn selection Safari bx_battle_menu_t6_2: - J: ~ + J: 0x8126310 HandleEndTurn_FinishBattle: - J: ~ + J: 0x8010fa4 BattleScript_HandleFaintedMon: J: ~ BattleScript_FaintedMonEnd: J: ~ CB2_WhiteOut: J: ~ +gActionSelectionCursor: + J: 0x2024bc0 +gMoveSelectionCursor: + J: 0x2024bc4 +# Replace move BattleScript_AskToLearnMove: J: ~ BattleScript_ForgotAndLearnedNewMove: J: ~ -# Replace move sub_809E260: J: ~ CB2_EvolutionSceneUpdate: @@ -178,11 +184,11 @@ Task_Fanfare: # PC Menu / Storage # #-------------------------# Task_PokemonStorageSystem: - J: ~ + J: 0x8092a14 Task_HandleMultichoiceInput: - J: ~ + J: 0x80b0928 SUB_8096B38: - J: ~ + J: 0x809363c #-------------------------# #--------------# @@ -255,19 +261,20 @@ Task_Fishing: #---------------------# # 0xa BattleScript_TryNicknameCaughtMon: - J: ~ + J: 0x81aa97b sub_80B5AA0: - J: ~ + J: 0x80b10e0 Task_HandleInput: - J: ~ + J: 0x80b1838 # 0x7 BattleScript_GiveCaughtMonEnd: - J: ~ + J: 0x81aa990 # 0x6 BattleScript_GotAwaySafely: - J: ~ + J: 0x81a98c1 namingScreenDataPtr: - J: ~ + J: 0x83a3198 + #---------------------# #---------------------# From c37ecad74a3791cb4f607b6fd8b6ee5ab6648444 Mon Sep 17 00:00:00 2001 From: Neka Date: Tue, 24 Dec 2024 22:42:30 +0100 Subject: [PATCH 06/16] Fix Keyboard for R/S Japanese --- modules/keyboard.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/keyboard.py b/modules/keyboard.py index c9b09fc01..385d7bb52 100644 --- a/modules/keyboard.py +++ b/modules/keyboard.py @@ -11,6 +11,7 @@ from modules.modes import BotModeError from modules.runtime import get_data_path from modules.tasks import get_task +from modules.roms import ROMLanguage if TYPE_CHECKING: pass @@ -120,11 +121,13 @@ def get_naming_screen_data() -> NamingScreen | None: return None data = context.emulator.read_bytes(pointer, 0x4A) cursor_sprite = get_game_sprite_by_id(data[0x0F]) + language_offset = 0 if context.rom.language == ROMLanguage.Japanese else 1 + return NamingScreen( enabled=bool(task.data_value(0)), state=NamingScreenState(data[0x00]), current_input=decode_string(data[0x11:0x21]), - keyboard_page=KeyboardPageType((data[0x0E] + 1) % 3), + keyboard_page=KeyboardPageType((data[0x0E]+language_offset) % 3), cursor_position=(cursor_sprite.data_value(0), cursor_sprite.data_value(1)), ) else: From f5d0d88c64734141528cd7c8007d7175578c3dc8 Mon Sep 17 00:00:00 2001 From: Neka Date: Wed, 25 Dec 2024 01:21:38 +0100 Subject: [PATCH 07/16] Support battling modes for Ruby JP --- .../symbols/patches/language/pokeruby.yml | 38 ++++++++++++------- wiki/pages/Mode - Acro Bike Bunny Hop.md | 2 +- wiki/pages/Mode - Daycare.md | 14 +++---- wiki/pages/Mode - Fishing.md | 2 +- wiki/pages/Mode - Level Grind.md | 2 +- wiki/pages/Mode - Spin.md | 2 +- wiki/pages/Mode - Sweet Scent.md | 2 +- 7 files changed, 37 insertions(+), 25 deletions(-) diff --git a/modules/data/symbols/patches/language/pokeruby.yml b/modules/data/symbols/patches/language/pokeruby.yml index bfd36e238..3d7ad11d8 100644 --- a/modules/data/symbols/patches/language/pokeruby.yml +++ b/modules/data/symbols/patches/language/pokeruby.yml @@ -26,7 +26,7 @@ CB2_FlyRegionMap: gMain: J: 0x30016e0 gFieldMessageBoxWindow: - J: 0x202e5dc + J: 0x202e5d4 sScriptContext1: J: 0x3000520 sScriptContext2: @@ -131,8 +131,7 @@ gBattleWeather: gBattleOutcome: J: 0x2024a86 gBattlePartyCurrentOrder: - J: 0x2038190 - + J: 0x203818c # Turn selection sub_8012324: J: 0x800f630 @@ -144,28 +143,30 @@ HandleAction_ChooseMove: bx_battle_menu_t6_2: J: 0x8126310 HandleEndTurn_FinishBattle: - J: 0x8010fa4 + J: ~ # 0x8010fa4 BattleScript_HandleFaintedMon: - J: ~ + J: 0x81a9713 BattleScript_FaintedMonEnd: - J: ~ + J: 0x81a981e CB2_WhiteOut: - J: ~ + J: 0x80516dc gActionSelectionCursor: J: 0x2024bc0 gMoveSelectionCursor: J: 0x2024bc4 # Replace move BattleScript_AskToLearnMove: - J: ~ + J: 0x81a99b1 BattleScript_ForgotAndLearnedNewMove: - J: ~ + J: 0x81a99de sub_809E260: - J: ~ + J: 0x809ab9c CB2_EvolutionSceneUpdate: - J: ~ + J: 0x810d168 Task_EvolutionScene: - J: ~ + J: 0x810d304 +RunBattleScriptCommands_PopCallbacksStack: + J: 0x801125c #--------------------# #----------------# @@ -253,7 +254,7 @@ sPokeMenuOptionsOrder: # Fishing Mode # #-------------------# Task_Fishing: - J: ~ + J: 0x80575c8 #-------------------# #---------------------# @@ -318,9 +319,20 @@ gEggHatchData: J: 0x300474c CB2_EggHatch_1: J: 0x804022d +# Poison faint 0x5 +gUnknown_081A14B8: + J: 0x8180bf5 +# 0x8 +EventScript_StartTrainerBattle: + J: ~ +# 0x4 +EventScript_DoTrainerBattle: + J: ~ #----------------# # Ununsed symbols that were conflicting with currently used symbols # We set them to 0x0 to 'get them out of our way' and correctly target the desired symbol LilycoveCity_House4_Text_18BEE8: + J: 0x0 +gTVRecentHappeningsText3: J: 0x0 \ No newline at end of file diff --git a/wiki/pages/Mode - Acro Bike Bunny Hop.md b/wiki/pages/Mode - Acro Bike Bunny Hop.md index 56ae0f2db..400ee215e 100644 --- a/wiki/pages/Mode - Acro Bike Bunny Hop.md +++ b/wiki/pages/Mode - Acro Bike Bunny Hop.md @@ -10,7 +10,7 @@ Register the Acro Bike and start the mode while in the overworld, in any patch o | | πŸŸ₯ Ruby | πŸ”· Sapphire | 🟒 Emerald | |:---------|:-------:|:-----------:|:----------:| | English | βœ… | βœ… | βœ… | -| Japanese | ❌ | ❌ | βœ… | +| Japanese | βœ… | ❌ | βœ… | | German | βœ… | ❌ | βœ… | | Spanish | βœ… | ❌ | βœ… | | French | βœ… | ❌ | βœ… | diff --git a/wiki/pages/Mode - Daycare.md b/wiki/pages/Mode - Daycare.md index 5c4b3a72b..ebd57d25f 100644 --- a/wiki/pages/Mode - Daycare.md +++ b/wiki/pages/Mode - Daycare.md @@ -34,13 +34,13 @@ not Shiny. ## Game Support | | πŸŸ₯ Ruby | πŸ”· Sapphire | 🟒 Emerald | πŸ”₯ FireRed | 🌿 LeafGreen | -| :------- | :-----: | :---------: | :--------: | :--------: | :----------: | -| English | βœ… | βœ… | βœ… | βœ… | βœ… | -| Japanese | βœ… | ❌ | βœ… | βœ… | βœ… | -| German | βœ… | ❌ | βœ… | βœ… | βœ… | -| Spanish | βœ… | ❌ | βœ… | βœ… | βœ… | -| French | βœ… | ❌ | βœ… | βœ… | βœ… | -| Italian | βœ… | ❌ | βœ… | βœ… | βœ… | +|:---------|:-------:|:-----------:|:----------:|:----------:|:------------:| +| English | βœ… | βœ… | βœ… | βœ… | βœ… | +| Japanese | βœ… | ❌ | βœ… | βœ… | βœ… | +| German | βœ… | ❌ | βœ… | βœ… | βœ… | +| Spanish | βœ… | ❌ | βœ… | βœ… | βœ… | +| French | βœ… | ❌ | βœ… | βœ… | βœ… | +| Italian | βœ… | ❌ | βœ… | βœ… | βœ… | βœ… Tested, working diff --git a/wiki/pages/Mode - Fishing.md b/wiki/pages/Mode - Fishing.md index 41f9f1f6a..65718d831 100644 --- a/wiki/pages/Mode - Fishing.md +++ b/wiki/pages/Mode - Fishing.md @@ -34,7 +34,7 @@ if your Safari Ball count drops below `15`. | | πŸŸ₯ Ruby | πŸ”· Sapphire | 🟒 Emerald | πŸ”₯ FireRed | 🌿 LeafGreen | |:---------|:-------:|:-----------:|:----------:|:----------:|:------------:| | English | βœ… | βœ… | βœ… | βœ… | βœ… | -| Japanese | ❌ | ❌ | βœ… | βœ… | βœ… | +| Japanese | βœ… | ❌ | βœ… | βœ… | βœ… | | German | βœ… | ❌ | βœ… | βœ… | βœ… | | Spanish | βœ… | ❌ | βœ… | βœ… | βœ… | | French | βœ… | ❌ | βœ… | βœ… | βœ… | diff --git a/wiki/pages/Mode - Level Grind.md b/wiki/pages/Mode - Level Grind.md index e3fb141d4..ff29d8010 100644 --- a/wiki/pages/Mode - Level Grind.md +++ b/wiki/pages/Mode - Level Grind.md @@ -52,7 +52,7 @@ Try another route that has an easy overland path to a PokΓ©mon Center. | | πŸŸ₯ Ruby | πŸ”· Sapphire | 🟒 Emerald | πŸ”₯ FireRed | 🌿 LeafGreen | |:---------|:-------:|:-----------:|:----------:|:----------:|:------------:| | English | βœ… | βœ… | βœ… | βœ… | βœ… | -| Japanese | ❌ | ❌ | βœ… | βœ… | βœ… | +| Japanese | βœ… | ❌ | βœ… | βœ… | βœ… | | German | βœ… | ❌ | βœ… | βœ… | βœ… | | Spanish | βœ… | ❌ | βœ… | βœ… | βœ… | | French | βœ… | ❌ | βœ… | βœ… | βœ… | diff --git a/wiki/pages/Mode - Spin.md b/wiki/pages/Mode - Spin.md index 44ddd8196..a17ba942d 100644 --- a/wiki/pages/Mode - Spin.md +++ b/wiki/pages/Mode - Spin.md @@ -30,7 +30,7 @@ if your Safari Ball count drops below `15`. | | πŸŸ₯ Ruby | πŸ”· Sapphire | 🟒 Emerald | πŸ”₯ FireRed | 🌿 LeafGreen | |:---------|:-------:|:-----------:|:----------:|:----------:|:------------:| | English | βœ… | βœ… | βœ… | βœ… | βœ… | -| Japanese | ❌ | ❌ | βœ… | βœ… | βœ… | +| Japanese | βœ… | ❌ | βœ… | βœ… | βœ… | | German | βœ… | ❌ | βœ… | βœ… | βœ… | | Spanish | βœ… | ❌ | βœ… | βœ… | βœ… | | French | βœ… | ❌ | βœ… | βœ… | βœ… | diff --git a/wiki/pages/Mode - Sweet Scent.md b/wiki/pages/Mode - Sweet Scent.md index af7e6b3fb..556c94c90 100644 --- a/wiki/pages/Mode - Sweet Scent.md +++ b/wiki/pages/Mode - Sweet Scent.md @@ -13,7 +13,7 @@ Start the mode while in the overworld, in any patch of grass/water/cave with enc | | πŸŸ₯ Ruby | πŸ”· Sapphire | 🟒 Emerald | πŸ”₯ FireRed | 🌿 LeafGreen | |:---------|:-------:|:-----------:|:----------:|:----------:|:------------:| | English | βœ… | βœ… | βœ… | βœ… | βœ… | -| Japanese | ❌ | ❌ | βœ… | βœ… | βœ… | +| Japanese | βœ… | ❌ | βœ… | βœ… | βœ… | | German | βœ… | ❌ | βœ… | βœ… | βœ… | | Spanish | βœ… | ❌ | βœ… | βœ… | βœ… | | French | βœ… | ❌ | βœ… | βœ… | βœ… | From f93be76e2b7dfce1fb884aae9adb15dc3da447d6 Mon Sep 17 00:00:00 2001 From: Neka Date: Thu, 26 Dec 2024 01:04:47 +0100 Subject: [PATCH 08/16] Support Berry blender for Ruby JP --- .../data/symbols/patches/language/pokeruby.yml | 6 +++--- modules/modes/berry_blend.py | 15 ++++++++++++--- wiki/pages/Mode - Berry Blender.md | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/modules/data/symbols/patches/language/pokeruby.yml b/modules/data/symbols/patches/language/pokeruby.yml index 3d7ad11d8..1d684188e 100644 --- a/modules/data/symbols/patches/language/pokeruby.yml +++ b/modules/data/symbols/patches/language/pokeruby.yml @@ -282,11 +282,11 @@ namingScreenDataPtr: # Berry blending # #---------------------# SUB_80501FC: - J: ~ + J: 0x804d378 gUnknown_08216303: - J: ~ + J: 0x81ec313 gBerryBlenderData: - J: ~ + J: 0x3004784 #---------------------# #-----------# diff --git a/modules/modes/berry_blend.py b/modules/modes/berry_blend.py index 974ad0449..9d907cfcc 100644 --- a/modules/modes/berry_blend.py +++ b/modules/modes/berry_blend.py @@ -3,6 +3,8 @@ from modules.items import get_item_by_name, get_item_bag, get_pokeblocks from modules.player import get_player_avatar +from modules.roms import ROMLanguage +from modules.context import context from . import BotModeError from ._interface import BotMode from .util import scroll_to_item_in_bag @@ -47,9 +49,16 @@ def run(self) -> Generator: play_callback_name = "SUB_80501FC" data_symbol = "gBerryBlenderData" hit_range_symbol = "gUnknown_08216303" - arrow_position_offset = 84 - speed_offset = 86 - number_of_players_offset = 136 + + if context.rom.language == ROMLanguage.Japanese: + arrow_position_offset = 74 + speed_offset = 76 + number_of_players_offset = 126 + else: + arrow_position_offset = 84 + speed_offset = 86 + number_of_players_offset = 136 + else: play_callback_name = "CB2_PLAYBLENDER" data_symbol = "sBerryBlender" diff --git a/wiki/pages/Mode - Berry Blender.md b/wiki/pages/Mode - Berry Blender.md index 15eed667f..fa9ce979f 100644 --- a/wiki/pages/Mode - Berry Blender.md +++ b/wiki/pages/Mode - Berry Blender.md @@ -15,7 +15,7 @@ one with 1-3 NPCs around it as the empty ones are for multiplayer only.) | | πŸŸ₯ Ruby | πŸ”· Sapphire | 🟒 Emerald | |:---------|:-------:|:-----------:|:----------:| | English | βœ… | βœ… | βœ… | -| Japanese | ❌ | ❌ | βœ… | +| Japanese | βœ… | ❌ | βœ… | | German | βœ… | 🟨 | βœ… | | Spanish | βœ… | ❌ | βœ… | | French | βœ… | ❌ | βœ… | From d5f4b98d6ac0d6f2501046b2a1ddf50cc6b4c43b Mon Sep 17 00:00:00 2001 From: Neka Date: Thu, 26 Dec 2024 01:19:11 +0100 Subject: [PATCH 09/16] Support Feebas for Ruby JP --- modules/data/symbols/patches/language/pokeruby.yml | 4 ++-- wiki/pages/Mode - Feebas.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/data/symbols/patches/language/pokeruby.yml b/modules/data/symbols/patches/language/pokeruby.yml index 1d684188e..cd91f9b30 100644 --- a/modules/data/symbols/patches/language/pokeruby.yml +++ b/modules/data/symbols/patches/language/pokeruby.yml @@ -294,10 +294,10 @@ gBerryBlenderData: #-----------# # Waterfall sub_8086F64: - J: ~ + J: 0x8083e20 # Surf sub_8088954: - J: ~ + J: 0x8085804 #-----------# #---------------------# diff --git a/wiki/pages/Mode - Feebas.md b/wiki/pages/Mode - Feebas.md index 52c4c0427..7ba27a233 100644 --- a/wiki/pages/Mode - Feebas.md +++ b/wiki/pages/Mode - Feebas.md @@ -56,7 +56,7 @@ The lakes marked in red are highly likely to contain a Feebas tile. | | πŸŸ₯ Ruby | πŸ”· Sapphire | 🟒 Emerald | |:---------|:-------:|:-----------:|:----------:| | English | βœ… | βœ… | βœ… | -| Japanese | ❌ | ❌ | βœ… | +| Japanese | βœ… | ❌ | βœ… | | German | βœ… | ❌ | βœ… | | Spanish | βœ… | ❌ | βœ… | | French | βœ… | ❌ | βœ… | From cd69f0dd62e79f010b4b781f98acbd1ea8d0b81c Mon Sep 17 00:00:00 2001 From: Neka Date: Fri, 27 Dec 2024 00:07:28 +0100 Subject: [PATCH 10/16] Support Puzzle Solver for Ruby JP --- modules/data/symbols/patches/language/pokeruby.yml | 2 +- wiki/pages/Mode - Puzzle Solver.md | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/data/symbols/patches/language/pokeruby.yml b/modules/data/symbols/patches/language/pokeruby.yml index cd91f9b30..874bcc035 100644 --- a/modules/data/symbols/patches/language/pokeruby.yml +++ b/modules/data/symbols/patches/language/pokeruby.yml @@ -314,7 +314,7 @@ BattleBeginFirstTurn: #----------------# # 0x8 S_RepelWoreOff: - J: ~ + J: 0x8195926 gEggHatchData: J: 0x300474c CB2_EggHatch_1: diff --git a/wiki/pages/Mode - Puzzle Solver.md b/wiki/pages/Mode - Puzzle Solver.md index 62b08f1cd..183f35371 100644 --- a/wiki/pages/Mode - Puzzle Solver.md +++ b/wiki/pages/Mode - Puzzle Solver.md @@ -145,23 +145,23 @@ Start bot mode anywhere inside the glass workshop. |:-----------------|:-------------|:-------:|:--------:|:------:|:-------:|:------:|:-------:| | **Mirage Tower** | 🟒 Emerald | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… | | **Sky Pillar** | 🟒 Emerald | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… | -| | πŸŸ₯ Ruby | βœ… | ❌ | βœ… | βœ… | βœ… | βœ… | +| | πŸŸ₯ Ruby | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… | | | πŸ”· Sapphire | βœ… | ❌ | ❌ | ❌ | ❌ | ❌ | | **Deoxys** | 🟒 Emerald | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… | | | πŸ”₯ Fire Red | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… | | | 🌿 LeafGreen | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… | -| **Regice** | πŸŸ₯ Ruby | βœ… | ❌ | βœ… | βœ… | βœ… | βœ… | +| **Regice** | πŸŸ₯ Ruby | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… | | | πŸ”· Sapphire | βœ… | ❌ | ❌ | ❌ | ❌ | ❌ | | | 🟒 Emerald | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… | -| **Regirock** | πŸŸ₯ Ruby | βœ… | ❌ | βœ… | βœ… | βœ… | βœ… | +| **Regirock** | πŸŸ₯ Ruby | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… | | | πŸ”· Sapphire | βœ… | ❌ | ❌ | ❌ | ❌ | ❌ | | | 🟒 Emerald | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… | -| **Registeel** | πŸŸ₯ Ruby | βœ… | ❌ | βœ… | βœ… | βœ… | βœ… | +| **Registeel** | πŸŸ₯ Ruby | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… | | | πŸ”· Sapphire | βœ… | ❌ | ❌ | ❌ | ❌ | ❌ | | | 🟒 Emerald | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… | | **Tanoby Key** | πŸ”₯ Fire Red | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… | | | 🌿 LeafGreen | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… | -| **White Flute** | πŸŸ₯ Ruby | βœ… | ❌ | βœ… | βœ… | βœ… | βœ… | +| **White Flute** | πŸŸ₯ Ruby | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… | | | πŸ”· Sapphire | βœ… | ❌ | ❌ | ❌ | ❌ | ❌ | | | 🟒 Emerald | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… | From db7d5a1322284c99822833d164e10d82e9279047 Mon Sep 17 00:00:00 2001 From: Neka Date: Fri, 27 Dec 2024 01:32:35 +0100 Subject: [PATCH 11/16] Support Roamer for Ruby JP --- .../symbols/patches/language/pokeruby.yml | 20 +++++++++---------- wiki/pages/Mode - Roamer Resets.md | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/data/symbols/patches/language/pokeruby.yml b/modules/data/symbols/patches/language/pokeruby.yml index 874bcc035..3162e5594 100644 --- a/modules/data/symbols/patches/language/pokeruby.yml +++ b/modules/data/symbols/patches/language/pokeruby.yml @@ -55,7 +55,7 @@ gMapHeader: gPlayerAvatar: J: 0x202e5b8 gRegionMap: - J: 0x20385e8 + J: 0x20385C4 gSaveBlock1: J: 0x2025494 gSaveBlock2: @@ -66,29 +66,29 @@ gSaveBlock2: # Main Menu # #-----------------# CB2_InitCopyrightScreenAfterBootup: - J: ~ + J: 0x813668c MainCB2_Intro: - J: ~ + J: 0x813634c CB2_InitTitleScreen: - J: ~ + J: 0x80790c4 MainCB2: - J: ~ + J: 0x8079418 CB2_MainMenu: - J: ~ + J: 0x8006cd0 CB2_ReturnToFieldLocal: - J: ~ + J: 0x8051880 #-----------------# #---------------------------# # SSR/SRA/SGR/Roamers # #---------------------------# gRngValue: - J: ~ + J: 0x3004748 # Fly Task_MapNamePopup: - J: ~ + J: 0x809f568 CB2_LoadMap: - J: ~ + J: 0x8051750 Task_BattleStart: J: ~ #--------------------# diff --git a/wiki/pages/Mode - Roamer Resets.md b/wiki/pages/Mode - Roamer Resets.md index cabe4f377..11cd8f3f6 100644 --- a/wiki/pages/Mode - Roamer Resets.md +++ b/wiki/pages/Mode - Roamer Resets.md @@ -57,7 +57,7 @@ Unlike Emerald version, Ruby and Sapphire are not restricted by the sequence tha | | πŸŸ₯ Ruby | πŸ”· Sapphire | 🟒 Emerald | πŸ”₯ FireRed | 🌿 LeafGreen | |:---------|:-------:|:-----------:|:----------:|:----------:|:------------:| | English | βœ… | βœ… | βœ… | βœ… | βœ… | -| Japanese | ❌ | ❌ | βœ… | βœ… | βœ… | +| Japanese | βœ… | ❌ | βœ… | βœ… | βœ… | | German | βœ… | ❌ | βœ… | βœ… | βœ… | | Spanish | βœ… | ❌ | βœ… | βœ… | βœ… | | French | βœ… | ❌ | βœ… | βœ… | βœ… | From 31ae1e874d85bba3696a2e8aa5c60143251a5648 Mon Sep 17 00:00:00 2001 From: Neka Date: Fri, 27 Dec 2024 01:38:14 +0100 Subject: [PATCH 12/16] Support Rock Smash Ruby JP --- wiki/pages/Mode - Rock Smash.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/pages/Mode - Rock Smash.md b/wiki/pages/Mode - Rock Smash.md index 134658460..2babd03ef 100644 --- a/wiki/pages/Mode - Rock Smash.md +++ b/wiki/pages/Mode - Rock Smash.md @@ -68,7 +68,7 @@ The mode will continuously try to enter the Safari Zone, so make sure you have s | | πŸŸ₯ Ruby | πŸ”· Sapphire | 🟒 Emerald | |:---------|:-------:|:-----------:|:----------:| | English | βœ… | βœ… | βœ… | -| Japanese | ❌ | ❌ | βœ… | +| Japanese | βœ… | ❌ | βœ… | | German | βœ… | ❌ | βœ… | | Spanish | βœ… | ❌ | βœ… | | French | βœ… | ❌ | βœ… | From ab8b4bcba3abafaa815db2183771918bb28e9809 Mon Sep 17 00:00:00 2001 From: Neka Date: Fri, 27 Dec 2024 01:54:50 +0100 Subject: [PATCH 13/16] Support Starters for Ruby JP --- modules/data/symbols/patches/language/pokeruby.yml | 4 ++-- wiki/pages/Mode - Starters.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/data/symbols/patches/language/pokeruby.yml b/modules/data/symbols/patches/language/pokeruby.yml index 3162e5594..8c969a784 100644 --- a/modules/data/symbols/patches/language/pokeruby.yml +++ b/modules/data/symbols/patches/language/pokeruby.yml @@ -304,9 +304,9 @@ sub_8088954: # Starters Hoenn # #---------------------# Task_StarterChoose2: - J: ~ + J: 0x81050f8 BattleBeginFirstTurn: - J: ~ + J: 0x800ee0c #---------------------# #----------------# diff --git a/wiki/pages/Mode - Starters.md b/wiki/pages/Mode - Starters.md index a00c8dcbf..7bcd1c08e 100644 --- a/wiki/pages/Mode - Starters.md +++ b/wiki/pages/Mode - Starters.md @@ -42,7 +42,7 @@ Soft resets for starter PokΓ©mon. | | πŸŸ₯ Ruby | πŸ”· Sapphire | 🟒 Emerald | πŸ”₯ FireRed | 🌿 LeafGreen | |:---------|:-------:|:-----------:|:----------:|:----------:|:------------:| | English | βœ… | βœ… | βœ… | βœ… | βœ… | -| Japanese | ❌ | ❌ | βœ… | βœ… | βœ… | +| Japanese | βœ… | ❌ | βœ… | βœ… | βœ… | | German | βœ… | ❌ | βœ… | βœ… | βœ… | | Spanish | βœ… | ❌ | βœ… | βœ… | βœ… | | French | βœ… | ❌ | βœ… | βœ… | βœ… | From 9927a8be074192aa48ae7a7ce4d447f9bbcd3df3 Mon Sep 17 00:00:00 2001 From: Neka Date: Fri, 27 Dec 2024 02:13:27 +0100 Subject: [PATCH 14/16] Support SGR for Ruby JP --- modules/data/symbols/patches/language/pokeruby.yml | 2 ++ wiki/pages/Mode - Static Gift Resets.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/data/symbols/patches/language/pokeruby.yml b/modules/data/symbols/patches/language/pokeruby.yml index 8c969a784..5f43e0149 100644 --- a/modules/data/symbols/patches/language/pokeruby.yml +++ b/modules/data/symbols/patches/language/pokeruby.yml @@ -91,6 +91,8 @@ CB2_LoadMap: J: 0x8051750 Task_BattleStart: J: ~ +SummaryScreenHandleKeyInput: + J: 0x809aad8 #--------------------# # Battling Symbols # #--------------------# diff --git a/wiki/pages/Mode - Static Gift Resets.md b/wiki/pages/Mode - Static Gift Resets.md index bcd4ad450..78b23ba8d 100644 --- a/wiki/pages/Mode - Static Gift Resets.md +++ b/wiki/pages/Mode - Static Gift Resets.md @@ -138,7 +138,7 @@ Soft reset for a static gift PokΓ©mon that are directly added to your party with | | πŸŸ₯ Ruby | πŸ”· Sapphire | 🟒 Emerald | πŸ”₯ FireRed | 🌿 LeafGreen | |:---------|:-------:|:-----------:|:----------:|:----------:|:------------:| | English | βœ… | 🟨 | βœ… | βœ… | βœ… | -| Japanese | ❌ | ❌ | βœ… | βœ… | βœ… | +| Japanese | βœ… | ❌ | βœ… | βœ… | βœ… | | German | βœ… | ❌ | βœ… | βœ… | βœ… | | Spanish | βœ… | ❌ | βœ… | βœ… | βœ… | | French | βœ… | ❌ | βœ… | βœ… | βœ… | From 98de6596d0170c5aa05e47c8722e75dd0357d69a Mon Sep 17 00:00:00 2001 From: Neka Date: Fri, 27 Dec 2024 18:43:15 +0100 Subject: [PATCH 15/16] Support SSR for Ruby JP --- modules/data/symbols/patches/language/pokeruby.yml | 4 ++-- modules/keyboard.py | 2 +- wiki/pages/Mode - Static Soft Resets.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/data/symbols/patches/language/pokeruby.yml b/modules/data/symbols/patches/language/pokeruby.yml index 5f43e0149..ffe3a1953 100644 --- a/modules/data/symbols/patches/language/pokeruby.yml +++ b/modules/data/symbols/patches/language/pokeruby.yml @@ -90,7 +90,7 @@ Task_MapNamePopup: CB2_LoadMap: J: 0x8051750 Task_BattleStart: - J: ~ + J: 0x807e838 SummaryScreenHandleKeyInput: J: 0x809aad8 #--------------------# @@ -145,7 +145,7 @@ HandleAction_ChooseMove: bx_battle_menu_t6_2: J: 0x8126310 HandleEndTurn_FinishBattle: - J: ~ # 0x8010fa4 + J: 0x8010fa4 BattleScript_HandleFaintedMon: J: 0x81a9713 BattleScript_FaintedMonEnd: diff --git a/modules/keyboard.py b/modules/keyboard.py index 385d7bb52..4bc60fa19 100644 --- a/modules/keyboard.py +++ b/modules/keyboard.py @@ -127,7 +127,7 @@ def get_naming_screen_data() -> NamingScreen | None: enabled=bool(task.data_value(0)), state=NamingScreenState(data[0x00]), current_input=decode_string(data[0x11:0x21]), - keyboard_page=KeyboardPageType((data[0x0E]+language_offset) % 3), + keyboard_page=KeyboardPageType((data[0x0E] + language_offset) % 3), cursor_position=(cursor_sprite.data_value(0), cursor_sprite.data_value(1)), ) else: diff --git a/wiki/pages/Mode - Static Soft Resets.md b/wiki/pages/Mode - Static Soft Resets.md index 35f2a25b0..7a5c2e279 100644 --- a/wiki/pages/Mode - Static Soft Resets.md +++ b/wiki/pages/Mode - Static Soft Resets.md @@ -46,7 +46,7 @@ Static soft reset mode targets static PokΓ©mon by simply spamming the A button u | | πŸŸ₯ Ruby | πŸ”· Sapphire | 🟒 Emerald | πŸ”₯ FireRed | 🌿 LeafGreen | |:---------|:-------:|:-----------:|:----------:|:----------:|:------------:| | English | βœ… | 🟨 | βœ… | βœ… | βœ… | -| Japanese | ❌ | ❌ | βœ… | βœ… | βœ… | +| Japanese | βœ… | ❌ | βœ… | βœ… | βœ… | | German | βœ… | ❌ | βœ… | βœ… | βœ… | | Spanish | βœ… | ❌ | βœ… | βœ… | βœ… | | French | βœ… | ❌ | βœ… | βœ… | βœ… | From 9cbbaa7b48183a91af7b2d052920b67ef1dcc288 Mon Sep 17 00:00:00 2001 From: Neka Date: Fri, 27 Dec 2024 19:34:25 +0100 Subject: [PATCH 16/16] Support trainer battle listener for Ruby JP --- modules/data/symbols/patches/language/pokeruby.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/data/symbols/patches/language/pokeruby.yml b/modules/data/symbols/patches/language/pokeruby.yml index ffe3a1953..c0077803b 100644 --- a/modules/data/symbols/patches/language/pokeruby.yml +++ b/modules/data/symbols/patches/language/pokeruby.yml @@ -326,10 +326,10 @@ gUnknown_081A14B8: J: 0x8180bf5 # 0x8 EventScript_StartTrainerBattle: - J: ~ + J: 0x817f41c # 0x4 EventScript_DoTrainerBattle: - J: ~ + J: 0x817f503 #----------------# # Ununsed symbols that were conflicting with currently used symbols