40Cakes / pokebot-gen3

PokéBot Gen3 is a shiny hunting bot, written in Python that runs libmgba + mGBA Python bindings under the hood. Pokémon Ruby, Sapphire, Emerald, FireRed and LeafGreen are supported.
https://www.youtube.com/@40_Cakes/streams
GNU General Public License v3.0
147 stars 47 forks source link

Emerald Sudowoodo and Rocksmash in all Languages #303

Closed Terasol closed 4 months ago

Terasol commented 4 months ago

Description

This adds all needed symbols for Sudowoodo and Rocksmash modes to work in all languages in Emerald.

To get this to work the logic for loading the language patches had to be extended. Symbols that get patched now get their old addresses actively removed. With this symbols that get wrongly picked when using get_symbol_name_before() can now be "disabled" for specific languages by directly setting their address to 0 in the language patch. Additionally some symbol names are used multiple times in the symbol files, to allow that to be done in the language patches the bot now can handle lists of addresses for symbols.

Changes

modules/game.py -> new handling for language patches modules/data/symbols/patches/language/pokeemerald.json -> new symbols

Notes

The method to convert this in Code instead of requiring a list in every entry in the patch was chosen for simpler ease of use creating the patch files.

Checklist