• 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 Trainer Sprites in Ruby and Fire Red

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
OK, so me and xGGxToiZ have decided to release our knowledge to the general public. This knowledge is the knowledge of trainer animations!

xGGxToiZ noticed the pointer I found to a blank animation while looking at the trainer's back animations (No, this is not the front animations!). Here's the origanal post:
Spoiler:

It was quite odd, because it also led to the trainer's sprite, and several other things we don't know.

So how do we do this? Simple! Let me quote xGGxTioZ:
xGGxTioZ said:
Okay, each trainer sprite has their own pointer to E8 47 23 08. So I searched for that and voila!
Code:
Table starts at: 0x238E8C
Select: 250h Bytes. (148d * 4d)

This means, each trainer can have their own number of frames! Exciting, huh? And if we can expand it, who knows what are the possibilities!

So, like he said, each trainer gets it's own animation pointer. So go to the table, and multiply your trainer's sprite's number (Starting from 0) by 4, and add it to the table offset. Now repoint the following pointer to free space, and write out your animation data. Here's how it works:

Animation data is a sequence of 4 bytes, giving data on various information, and ends in FF FF 00 00.

The first byte is the frame number from 0 Up to as many frames as you want!
The second byte is unknown, but I'll look into the ASM coding to figure it out.
The third byte is the duration. 0x10 is about a half second.
The fourth byte is unknown

The format is two bytes for the frame, two bytes for the duration. The values are simple flipped half-words.

After you've typed up as many of these sequences you want, end it in FF FF 00 00. Here's one I used for Pokemon Chrome:

Code:
00 00 00 00
02 00 FE 00
02 00 30 00
01 00 0F 00
00 00 30 00
FF FF 00 00

I'm not sure why I used the 0's, but it works. This is a good example of going in any order. I went from my 3rd frame, to my second, to my first. The duration of 30 at the end delays when the pokemon are sent out.
 
Last edited:

Sierraffinity

Desperately trying to retire from ROM hacking
1,069
Posts
16
Years
OK, so me and xGGxToiZ have decided to release our knowledge to the general public. This knowledge is the knowledge of trainer animations!
I'm not entirely sure about this... This seems to be for trainer backsprites, but all throughout the thread, you mention "trainer sprites"...
Is this for trainer front- or back-sprites?
EDIT: I see. In this thread, there's info on the frames for back sprites AND for front sprites.
Awesome!
 
Last edited:

knizz

192
Posts
16
Years
  • Seen Oct 28, 2020
Great find! (Why didn't you tell me about this earlier?!)

So... which animation is front and which is back?
 
Last edited:

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
Great find! (Why didn't you tell me about this earlier?!)

So... which animation is front and which is back?
I couldn't tell you because I promised xGGxTioZ to keep it a secret. In fact, he posted this video in the pokemon animations thread. (Which he actually made, but he never told anyone that)

Spoiler:


The back animations are at 239EBB, and the front onse are in a table of pointers to each trainer's animation at 238E8C
 
8
Posts
14
Years
  • Seen Nov 19, 2012
please How can I animate the pokemon too in fire red ? and where do I put this code ?
 
8
Posts
14
Years
  • Seen Nov 19, 2012
If you scrolled down in R&D . ;)

I'm using the HEX editor in NSE..I searched the Sprite table and entered this code then the game freeze once I start a wild battle even after I added 2 sprites for the pokemon.

how do I repoint it to another offset ?
 
534
Posts
11
Years
  • Age 26
  • Seen Jul 24, 2023
What's the Final Code? I'm using FR and I need 3 frames each for some trainers. I can apply this to whoever I just want animated right?
 

BugMania

The Bug Master
32
Posts
10
Years
  • Seen Nov 4, 2016
Instead of using the HEX code, podemon well use a space in memory of the ROM.

example:

Go to the 0x82349BC.
You'll notice that the code uses an offset to 0x823499C, ie 9C 49 23 08.

To have an offset memory, we replace XX XX XX 08 to XX XX XX 02

In the end, find a space memory FREE, and inserted a routine battle system that changes the bytes FF FF 00 00 to FE FF 00 00.

I'm sorry that I did not bring the solution ready.


And of course, my bad English.
 

BLAx501!

Pokemon Flux
80
Posts
10
Years
Sorry for reviving this post but since I got working the animated sprites for Pokemon, I wanted to get some trainers animated too. The only problem I find came when I have to add the frames. I've been trying all evening diferent ways to do it without getting anything correct... So I summon you Shiny Quagsire... How did you do to add the frames?
 
Back
Top