• 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: Animated Sprites in Ruby and FireRed

Smeargle

Illusory
160
Posts
11
Years
This is wondeful :D, I've been spending the last week trying to duplicate it.
I came very close, but thank you very much for this. You really are going to help enhance a lot of pokemon roms.
I see what went wrong now, I was very close.

I will work on ruby and emerald variations as well as pre-made ones, full credit given to you for the code of course.
 

BugMania

The Bug Master
32
Posts
10
Years
  • Seen Nov 4, 2016
Ok. But someone found adreses for Pokemon Ruby about Behaviour Data?
Well... There would be no problem doing this with RUBY too.
But so can only possible with the offsets of messages. ... so we must find such offsets and play the routines inside it.
 

Smeargle

Illusory
160
Posts
11
Years
I won't be working on emerald until I squash the bugs regarding castform and deoxys, shouldn't be to difficult *though I'm still a noob*. I'm going to work on it tonight when I get the time and post a hopefully bug-free patch when i finish.
 

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years

Blah

Free supporter
1,924
Posts
11
Years
First of all, it's great that this method exists for two framed sprites. Second of all, no matter how I look at this, I am left thinking that using the object callback to animate the sprite is far superior than this method. While this works for a mere 2 frames animation, when it comes to something more interesting like a looped animation, using an object callback would be excellent as it'd execute independently from the battle engine. At the same time allow for more interesting animations including positional movement/pal change and rotscale modifications as seen here:

https://www.youtube.com/watch?v=LUS5xmJpW_s&ab_channel=astridjoeroeja

Note Pikachu turns yellow for a second. So for an initial animation, use this method, for a looped animation or animation with cool effects using the object callback seems more logical to me.
 
4
Posts
8
Years
  • Age 27
  • Seen Oct 23, 2019
We all know that from Emerald the Pokemon were animated. However, what if this was possible in Ruby and FireRed?
Well, it is.
The offset 1E7C64 in Ruby (2349BC in FireRed) is the pointer to the data that tells us how the sprites behave when they appear. So, first of all, simply repoint it to another offset. Simply take your desired offset (I'll be using 0xB00000) and split it into segments.
Code:
B0 00 00
Then, swap the first two digits (B0) with the last two (00), and then add 08 to the end. So now we have this:
Code:
00 00 B0 08
Now, we must go to the offset it was repointed to, and then we need the animation data.
The first byte is the frame number.
The second byte does nothing.
The third byte is how long the image is displayed.
The fourth byte, again, does nothing.
To end the animation you must add
Code:
FF FF 00 00
So, here is an example of it all in action:
Code:
00 00 0F 00
01 00 0F 00
00 00 0F 00
01 00 0F 00
00 00 0F 00
FF FF 00 00
Of course you can make this code longer if you want, and even add more frames.
Now, all sprites will have a second frame, so now just insert the two frames for every sprite. A good, efficient way to do this is to insert a blank 128x64 image over every Pokemon in Unl-Z GBA, and then use Advanced Sprite Editor to insert all of the individual frames. You must do this for EVERY Pokemon and their Backsprite, otherwise there are a lot of bugs. Like turning into the Hero.

There are, however, a few bugs with using this. For instance, as I stated previously, if you don't insert two frames for a Pokemon, it will turn into the player's backsprite. When you exit the bag, or Pokemon menu during a battle, the Pokemon's sprite will move again. Also, if you make the animation data short, then you might not see it during wild battles, and if you make it too long then it will take a while before it does its thing in Trainer battles and the stats screen and such. I think that's it. :\

I was wondering if it is possible to increase the frame to the front of the sprite Pokemon, it would not be possible to develop something like this to increase the back sprites?
 
30
Posts
7
Years
  • Age 21
  • Seen yesterday
Hi,sorry if this message is thrash but...I don't understand very well because I'm spanish.Any people can explain me more clear?
 

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
Is it possible to do it with selected Pokémons only? Say for instance, I will do it to all except Castform...

I've done this once, it requires modifying the routine which assigns the animation to the Pokemon sprite to load them from a table, like trainer animations do. Don't think I have the source to that anywhere though...
 

Lunos

Random Uruguayan User
3,108
Posts
15
Years

BluRose

blu rass
811
Posts
9
Years
I gave this patch a try but I don't really know how to implement the 2nd Frame of a Pokemon.
I thought that maybe a 256x128 sheet could work for some reason, but it doesn't.
Is it even possible to make Advanced Series recognize that the Pokémon can have a 2nd Frame even though it's FireRed?
his hack uses 3 frames but is easily editable as well, the subsequent frames are to be implemented exactly as you thought but manually replacing the image in like unLZ.gba or something, so you'll have two images: front sprite normal, and then back sprite shiny,
and it should be like 64x196
I want to do it!
i mean, go for it ahaha
 
33
Posts
10
Years
  • Age 28
  • Seen Apr 27, 2020
Has anyone created an asm routine or figured out another way to delay the animation in wild battles so that the animation syncs up to the battle starting like in a trainer battle?
 
Back
Top