• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Development: Creating New Battle Animations

timson733333

Woah.
135
Posts
16
Years
The codes are exactly the same, except for the pointers. The scrolling animation code I had in the first post is for FireRed, so you would need to find the corresponding Emerald pointers and then replace it, then it should work.

How would I find them?

Also, I'd like to know whether it's possible to remove a background from an existing animation, like Mach Punch or ExtremeSpeed.
 
1,323
Posts
16
Years
  • Seen Dec 9, 2023
How would I find them?

Also, I'd like to know whether it's possible to remove a background from an existing animation, like Mach Punch or ExtremeSpeed.
You could do one of these:

1. Using a hex editor with a search function, such as GoldFinger, search the FireRed code byte-by-byte in an Emerald ROM, but have blank spots where the pointers are. I can guarantee that this is the easiest and fastest way, but you have to know how to use a hex editor.

or

2. Calculate the offsets of the pointers in the FireRed code, go to that offset in a FireRed ROM, and then search the exact same bytes of that offset in an Emerald rom, and then reverse-calculate that offset for Emerald to get a pointer (just write it down in Notepad or MS Word or something), then use a search function to find that new pointer in an Emerald ROM.
 
248
Posts
12
Years
  • Age 43
  • Seen Jan 30, 2017
Can You Do A Video Explaining Everything That Would Be Very Helpful
 

timson733333

Woah.
135
Posts
16
Years
Anyone tried to do the same thing with BW and B2W2 ?

Why would anyone want to add new moves to the games that have all the moves that people want already? I'm pretty sure that B/W and B2/W2 have a completely different hex language than the GBA games, anyways, so it'd be very hard to do.

Also, I recently tried adding the new animations to FireRed. I grabbed the False Swipe animation and pasted your background code for Night Slash before it (because I think that False Swipe's animation fits Night Slash better than regular Slash, but that's just me.) Then, I repointed (using PGE's Attack Editor) to the offset that I pasted the animation code in. It didn't work; it did the animation for Pound instead. So I grabbed the Night Slash code you made and repointed to that instead. Same thing, didn't work. Am I doing something wrong?
 
Last edited:

Gamer2020

Accept no Imitations!
1,062
Posts
15
Years
Why would anyone want to add new moves to the games that have all the moves that people want already? I'm pretty sure that B/W and B2/W2 have a completely different hex language than the GBA games, anyways, so it'd be very hard to do.

Also, I recently tried adding the new animations to FireRed. I grabbed the False Swipe animation and pasted your background code for Night Slash before it (because I think that False Swipe's animation fits Night Slash better than regular Slash, but that's just me.) Then, I repointed (using PGE's Attack Editor) to the offset that I pasted the animation code in. It didn't work; it did the animation for Pound instead. So I grabbed the Night Slash code you made and repointed to that instead. Same thing, didn't work. Am I doing something wrong?
Double check and make sure AttackAnimationTable=&H1C68F4 is in your roms.ini
 

timson733333

Woah.
135
Posts
16
Years
Think I messed up somewhere here. I tried to create the Drain Punch anim by merging Comet Punch and Leech Life. I don't know how to discern where an animation ends, so I probably screwed up something. The code I have is right here, and apologies if it's really bad:

Code:
00 97 27 00 9F 27 0A 01 0C 0C 08 11 91 7E 1C 08 B6 7E 1C 08 03 F9 89 09 08 02 05 01 00 03 00 00 00 06 00 01 00 19 84 00 3F 05 0B 01 0D 08 02 08 00 97 27 0A 03 2A 01 0C 0C 08 04 01 02 78 72 3E 08 02 03 EC FF 0F 00 0C 00 05 02 08 7C 3E 08 02 04 00 00 00 00 01 00 02 00 19 AD 00 3F 04 02 03 F9 89 09 08 05 05 01 00 00 00 05 00 05 00 01 00 05 02 24 7B 3E 08 02 05 01 00 01 00 00 00 07 00 00 00 05 0E 44 EC 1C 08 05 04 0F 0E C9 56 1D 08 05 02 24 7B 3E 08 02 05 01 00 01 00 07 00 00 00 00 00 05 0B 03 0D 08 00 2F 27 00 41 27 03 DD 9B 0B 08 02 06 02 00 02 00 02 00 00 00 10 00 FB 4B 19 85 00 C0 0E 9E 56 1D 08 05 0E C9 56 1D 08 00 B1 27 00 A3 27 04 01 00 2F 27 00 97 27 0A 03 2A 01 0C 0C 08 04 01 02 78 72 3E 08 02 03 EC FF 0F 00 0C 00 05 02 08 7C 3E 08 02 04 00 00 00 00 01 00 02 00 19 AD 00 3F 04 02 03 F9 89 09 08 05 05 01 00 00 00 05 00 05 00 01 00 05 02 24 7B 3E 08 02 05 01 00 01 00 00 00 07 00 00 00 05 0E 44 EC 1C 08 05 04 0F 0E C9 56 1D 08 05 02 24 7B 3E 08 02 05 01 00 01 00 07 00 00 00 00 00 05 0B 03 0D 08 00 2F 27 00 41 27 03 DD 9B 0B 08 02 06 02 00 02 00 02 00 00 00 10 00 FB 4B 19 85 00 C0 0E 9E 56 1D 08 05 0E C9 56 1D 00 B1 27 00 A3 27 04 01 00 2F 27 00 97 27 0A 03 2A 01 0C 0C 08 04 01 02 78 72 3E 08 02 03 EC FF 0F 00 0C 00 05 02 08 7C 3E 08 02 04 00 00 00 00 01 00 02 00 19 AD 00 3F 04 02 03 F9 89 09 08 05 05 01 00 00 00 05 00 05 00 01 00 05 02 24 7B 3E 08 02 05 01 00 01 00 00 00 07 00 00 00 05 0E 44 EC 1C 08 05 04 0F 0E C9 56 1D 08 05 02 24 7B 3E 08 02 05 01 00 01 00 07 00 00 00 00 00 05 0B 03 0D 08 00 2F 27 00 41 27 03 DD 9B 0B 08 02 06 02 00 02 00 02 00 00 00 10 00 FB 4B 19 85 00 C0 0E 9E 56 1D 08 05 0E C9 56 1D 08
 
69
Posts
11
Years
  • Seen Jul 22, 2019
Hi can someone explain to me or point me in the direction of how to import the test background chaos rush gave us? I tried repointing te table and stuff but I ended up with a a very glitched white screen. Also does the background table only have one pointer?
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
For those looking to hack Ruby, I just found the animation pointer table. It is at 0x1C7168. It is probably posted somewhere else, but I've been searching for it for the past hour and couldn't find it.
 
Last edited:
69
Posts
11
Years
  • Seen Jul 22, 2019
not sure if you know this yet, but for scrolling background command ZZ, 01 and 00 control the direction. As far as I know when you use a move a the background will always scroll right, but if the enemy uses the move the direction can be changed.

00 - background will scroll right when enemy uses the move
01 - background will scroll left when the enemy uses the move
 
20
Posts
11
Years
  • Seen Feb 7, 2013
As for particles i don't know if this helps but the code for the purple bubbles coming out at the end of a poison attack is

00 A7 27 00 A6 27 05 04 0F 0E 5B 57 1D 08 05 08

Right now I am searching for the ice-crystals and other part-animations and I will post them all if someone needs them :)
 

DoesntKnowHowToPlay

Tiny Umbrella with Lots and Lots of Good
265
Posts
12
Years
  • Seen Feb 24, 2024
Some random things I've found while fiddling with the animations recently:

15 17 and 15 16 appear to reset the background to normal.

21 07 XX 00 YY YY YY YY branches to YY YY YY YY if the side the attacker is on matches XX. Mega Punch's custom background operates by placing two of these in a row (with XX = 00 and 01) to branch to subroutines that set the background to the correct one and then return.

0F appears to return to where the initial script left off after a branch.

The first parameter of the 02 command always seems to be a pointer to some animation data- this structure is 24 bytes long.

The first two bytes indicate what image data to use, while the next two bytes indicate the palette. The enumeration for this is the same as that of the 00 command- in order for an effect to work properly, the 00 command must have been called for both of these- otherwise the palette and/or image will not be loaded. While the existing animations appear to always have these be the same, they don't have to be- you can for instance give the Stun Spore seeds Fire Blast's palette this way. For some animations both of these are 00- I believe these are effects that don't use images, such as Earthquake's screen-shaking.

I'm not entirely sure what the rest of the bytes do, but it appears the two pointers after these values contains more image data (I think the dimensions and how it animates, respectively) while the rest of it has to do with how the effect plays out. I've fiddled with it a bit and done some interesting things like these:

DuOL9.png
GL54F.png

BuX7r.png
nh2ZO.png
 
44
Posts
12
Years
I'm new to this hex-editing...

I still don't understand how to know when the animation starts and end, is there any other way? or can someone explain it? D:

Also, i've already point my move to my custom animation(well its slash with the darkcloud BG), but when i tried it out, it didn't work...

and, how do i know the move's animation offset?(for pointing it to my custom animation)

EDIT: i know about the offset now, still don't know about how to figure the start and the end of the animaton though
 
Last edited:
69
Posts
11
Years
  • Seen Jul 22, 2019
The first two bytes indicate what image data to use, while the next two bytes indicate the palette. The enumeration for this is the same as that of the 00 command- in order for an effect to work properly, the 00 command must have been called for both of these- otherwise the palette and/or image will not be loaded. While the existing animations appear to always have these be the same, they don't have to be- you can for instance give the Stun Spore seeds Fire Blast's palette this way. For some animations both of these are 00- I believe these are effects that don't use images, such as Earthquake's screen-shaking.

I'm not entirely sure what the rest of the bytes do, but it appears the two pointers after these values contains more image data (I think the dimensions and how it animates, respectively) while the rest of it has to do with how the effect plays out. I've fiddled with it a bit and done some interesting things like these:

DuOL9.png
GL54F.png

BuX7r.png
nh2ZO.png

I'm sorry I don't understand what byte you are talking about to change the pallete you don't mean one these bytes for example 00 B1 27 when loading something I don't remember what
 

DoesntKnowHowToPlay

Tiny Umbrella with Lots and Lots of Good
265
Posts
12
Years
  • Seen Feb 24, 2024
I still don't understand how to know when the animation starts and end, is there any other way? or can someone explain it? D:

It begins at where the animation's pointer points to and ends at the 08 command. Since non-terminating 08s are rather common, what I usually do is just grab around x200 bytes, move it into free space, and chop bits off until the game crashes. There's probably a more efficient way to do this but it works. Also note that a few animations (I think Comet Punch) end in jumps instead of 08 commands.

I'm sorry I don't understand what byte you are talking about to change the pallete you don't mean one these bytes for example 00 B1 27 when loading something I don't remember what

This really isn't specific enough for me to help you. The 00 command loads palette and image data. basially, if you change an effect's image or palette data to XX YY, then you'll need to have an 00 XX YY command before the effect gets called, otherwise you'll have either borked image data, a borked palette (solid black), or both. If you've ever broken an animation such that it has solid black rectangles floating around, this is what I'm talking about- avoiding this is why you need the 00 command.
 
69
Posts
11
Years
  • Seen Jul 22, 2019
[/QUOTE]This really isn't specific enough for me to help you. The 00 command loads palette and image data. basially, if you change an effect's image or palette data to XX YY, then you'll need to have an 00 XX YY command before the effect gets called, otherwise you'll have either borked image data, a borked palette (solid black), or both. If you've ever broken an animation such that it has solid black rectangles floating around, this is what I'm talking about- avoiding this is why you need the 00 command.[/QUOTE]

I'm sorry. Yes I know that if you change those bytes you get the black boxes, that's why I am confused. Originally I thotght you were talking about those bytes. If you could tell me the bytes to change for the green shadow ball that would help because I could figure it out from there because I have not a clue as too which bytes you are referring to. Sorry
 

DoesntKnowHowToPlay

Tiny Umbrella with Lots and Lots of Good
265
Posts
12
Years
  • Seen Feb 24, 2024
I'm sorry. Yes I know that if you change those bytes you get the black boxes, that's why I am confused. Originally I thotght you were talking about those bytes. If you could tell me the bytes to change for the green shadow ball that would help because I could figure it out from there because I have not a clue as too which bytes you are referring to. Sorry
The bytes I'm talking about are the bytes in the effect data, which is not in the battle script proper. It is pointed to by the 02 command, always (as far as I've seen) as the first parameter. The values are usually in the x3EXXXX range- if you're looking around there you're probably in the right place.



That's not what I'm posting to talk about, however. To do colored backgrounds like Giga Drain, insert the following:

02 24 7B 3E 08 02 05 01 00 SS 00 00 00 YY 00 XX XX 05

Where XX XX is the color you want, YY is the intensity (0C for Giga Drain- 10 replaces the background entirely with the given color), and SS is the speed of the transition (01 for Giga Drain, but I imagine Hyper Beam and other attacks use the same logic with a higher value). To revert the background to normal, place the following:

02 24 7B 3E 08 02 05 01 00 SS 00 YY 00 00 00 XX XX 05 0B 03 0D

The values here do not have to be the same, but I'd advise making the color and intensity the same or it will abruptly change at the start of the transition back.

This allows us to accomplish animations that benefit from backgrounds without always having to insert new ones, like so:

G3p1e.png
6DIim.png
 
69
Posts
11
Years
  • Seen Jul 22, 2019
The bytes I'm talking about are the bytes in the effect data, which is not in the battle script proper. It is pointed to by the 02 command, always (as far as I've seen) as the first parameter. The values are usually in the x3EXXXX range- if you're looking around there you're probably in the right place.

Well obviously I wasn't looking in the right place. I thought only 11 and 0E pointed to else where. Unfortunately I still haven't found bytes that edit palette what I did do though, (for shadow ball) I went to the offset x3E7608 which got me something, and I thought oh maybe this is what he was talking about. So after the first 2 bytes I tried changing it to something, but only got a pure black shadow ball. :/

Since we're posting useful stuff...

I found that there's a special code or something to use backgrounds that are different depending on if you use the move or if the opponent does because if you use a regular command for example if you try the high power background you'll understand. I came across two pointers, one to use for the scroll flying type background and one for the high power one.

High Power - 0E 89 7D 1C 08
Flying background - 0E CF 59 1D 08
 
Last edited:

DoesntKnowHowToPlay

Tiny Umbrella with Lots and Lots of Good
265
Posts
12
Years
  • Seen Feb 24, 2024
If you got a pure black shadow ball, then you're probably changing the right bytes- you have to have loaded whatever palette you change it to with the 00 command. For the green ball in the screenshot I gave, I used palette B0 27.
 
69
Posts
11
Years
  • Seen Jul 22, 2019
If you got a pure black shadow ball, then you're probably changing the right bytes- you have to have loaded whatever palette you change it to with the 00 command. For the green ball in the screenshot I gave, I used palette B0 27.

Ok so I changed just the palette at the x3EXXXX command and got black ball, then i tried changing the palette and the actual ball graphics to 00 B0 27 and I got green box of text O.o

Edit: I know what you mean know and got it. Thanks :)
 
Last edited:
Back
Top