The big hex list
Posted by: likebeingawesome
Date: 2017-09-18 06:53:19
Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.
You can join Glitch City Research Institute to ask questions or discuss current developments.
You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.
So I use the big hex list alot and I feel like it needs updating to add things like quantity ids(what numbers are worth in Hexadecimal) , text and tile ids, building ids, etc. Unfortunately I am not the most knowledgeable on these subjects so I may not be of much help.
So other things I thought of that should be on the table are type ids and the ids the game uses for trainer battles (If that's how it works)
I just took a look.
It seems if you're willing to replicate the initial battle initialisation code, put the trainer class index in the a register then jump to the middle of InitBattleCommon, you can set up a trainer battle with any trainer class.
https://github.com/pret/pokered/blob/7a9a1b1e55f4a7f6c339a86d8cdb7fbf1bee7838/engine/battle/core.asm#L6861
To be more clear, your payload would be doing everything up to the bankswitched call to InitBattleVariables, setting the a register then jumping to [tt]ld [wTrainerClass],a[/tt].