Thread: Research: Adding New Moves to Gen 3
View Single Post
  #51    
Old May 15th, 2012 (03:27 AM).
Jambo51's Avatar
Jambo51
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
Quote originally posted by Leafbarrett:
So basically I'm screwed and Flare Blitz is stuck with goddamn Odor Sleuth's animation, and I don't know what I'm supposed to be doing with that Flare Blitz script or where it needs to go. Absolutely fantastic.
Bit much on the attitude! Chill out. For what it's worth, my post had a bit too much attitude yesterday, so I'm sorry about that.

You can only have a maximum of 255 battle script effects due to how the data table for the attacks is laid out. The effect it uses is only allocated a single byte, which is obviously too little for any more. My solution on FR uses one of the padding bytes to set a table value. What this means is that I have a table of tables in my ROM, and the aforementioned value sets which of the tables I want to get the Battle Script from, and then it reads the effect byte to get the actual script from the wanted table. It works, but is not ideal, since there are potential clashes (and also helpful coincidences - like I set Flare Blitz to Table 1 Effect 75 (or something like that) and because the existing code in the ROM doesn't check the table ID, Flare Blitz inherits its melting ice effect as well).

I explicitly stated in the post that you quoted that if you searched for a certain string of bytes that it would most likely be in the ROM. I ensured I left out anything BPRE specific in that string, so try searching for it. It should only appear once in the entire ROM and it should appear in a string looking somewhat like this:

Code:
00 01 XX XX XX 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 15 19 00 00 00 00 00 00
This string of commands is the workhorse of the battle scripting attack system. It generally executes most attacks, and most of their effects, which is why I branch back to it after executing the first effect (the recoil) to continue execution. The goto command in Battle Scripting is 28, so if you see a 28 followed by a pointer, it is likely to be a goto command.

The script should work as is as long as you "correct" the pointers after the 01 and 28 commands. I told you above how to track down the script which I go to after executing the Flare Blitz script. You can find the necessary pointer to go after the 01 command by finding that string of commands.

This should help somewhat. Sadly, I genuinely can't help with the animations.
__________________
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!
Reply With Quote