• 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?".
  • 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.

Research: Adding new trainer sprites to Pokemon Fire Red

215
Posts
11
Years
  • Seen Jul 14, 2020
So I really want to add a whole bunch of new trainer sprites to fire red but whenever I ask if this is possible, people say no. I have been asking for a year and people are saying no so I am assuming we haveyet to figure this out. However, wouldn't this be really easy?

If we used jambo51's trainer editor. We can see that the offset for trainer sprites is 0x23957C. Can't we just move that ofset to (0x900000) for example and start putting out trainer sprites there?

We would need a certain program that can insert sprites into that offset, but im pretty sure we can get NSE2.0 to do that, cant we?

I would love to get some feedback on this! Please and thank you!
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
I really want to see this go somewhere since it has come up about 5000000000000000 times in simple questions.:P I can tell you a little bit: just like you said, we can just move that table. However, there are about 5 routines that access that table. All of these have a limiter byte to prevent an overdraw from the table. It is these bytes that no one has bothered to find and post. I'm sure others have found them, but just haven't shared.
 
215
Posts
11
Years
  • Seen Jul 14, 2020
haha well I am going to try my best!

Just a little curious though, can you explain this 5 routines thing for my though? Cause right now it to me its seems like just putting the sprite data in the new offset and using that offset should work, right?

Also with these bytes you talk about, any idea on how I can find those bytes? I'm assuimg I start looking at 0x23957C to see what kind of special bytes calls the sprites and displays them? I am still kinda new to this kind of thing :P
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
haha well I am going to try my best!

Just a little curious though, can you explain this 5 routines thing for my though? Cause right now it to me its seems like just putting the sprite data in the new offset and using that offset should work, right?

Also with these bytes you talk about, any idea on how I can find those bytes? I'm assuimg I start looking at 0x23957C to see what kind of special bytes calls the sprites and displays them? I am still kinda new to this kind of thing :P

The limiters will be in the general area of the pointers to the table. I can't remember if you do, but the easiest way to find them is to know ASM, and just look for a cmp rX, #0x[#ofSprites] in that general area. The ceiling, without some severe ASM on every routine and the storage, will be 255 sprites, just FYI.
 

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
I should probably add that you also have to repoint the animation table at 0x238E8C, which is in charge of every trainer sprite's animation (which by default is set to be just static). Otherwise it'll start trying to pull random animation data which may or many not crash the game if not screw up how the sprite appears on screen.
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Yes, this is easily possible. All it will take is some repointing and perhaps some editing of limiter bytes (if any exist).

Also, I should note that you also have to repoint the animation table at 0x238E8C, which is in charge of every trainer sprite's animation (which by default is set to be just static).

I know they exist since I repointed the table once and it wouldn't accept the new sprites. I didn't bother to continue when I found 5 routines using the same table.:P Laziness prevailed, haha.

There is a trainer sprite animation? What? And they didn't use it? GAME FREAK! This is right up there with the 8 directional movement that they cancelled last minute
 
215
Posts
11
Years
  • Seen Jul 14, 2020
Thanks Quag! I was looking at that data and was wondering what it was there for! I thought it was random useless data! So could we use that data to add animations to our trainer sprites in fire red?

UPDATE!

Alright this is what I know.

So there is a table at 0x23957C which contains 148*8 bytes. The first 4 bytes represent where the sprite data is and the next 4 bytes just point to what trainer sprite we are looking at.

We also have the offset 0x239A1C which contains 148*8 bytes as well. These bytes point to the palette data for sprites in the same way the other data works. The first 4 bytes point to the offset data and the 4 bytes after that point to the trainer sprites who's palette it is pointing to.

There are also animations (thanks to shiny quagsire) that need to be taken into account. This offset is at 0x238E8C and they all point to the same data. This means they are all pointing to being inactive.

So far We have three different offsets:
Sprite Offset: 0x23957C
Pallete Offset: 0x239A1C
Animation Offset: 0x238E8C

Also I have discovered that 0x2390DC points to the data at 0x238E8C so what i believe is that the actual animation offset is 0x2390DC and 0x238E8C is just used to point it to emptyness.

Since these three offsets are so jam packed with data, If we wanted to add more trainer sprites we would need to repoint all the data to somewhere new.

My problem is I don't know where the animation offset comes in. Because the table points straight to the sprite offset and the pallette offset. However the animation offset doesn't come into play anywhere.
 
Last edited:
Back
Top