PDA

View Full Version : Animated Sprites in Ruby and FireRed


altariaking
June 20th, 2010, 10:19 AM
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.
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:
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
FF FF 00 00
So, here is an example of it all in action:
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. :\

ZodiacDaGreat
June 21st, 2010, 10:32 PM
Shouldn't be too hard, ...uhm, just find the location where the animation or loading data is.

Darthatron
June 21st, 2010, 10:44 PM
Very nice. Thanks for the info. :) I'll be looking into FireRed offsets now. ;)

EDIT: I just tried this, and nothing happened. :\

altariaking
June 23rd, 2010, 01:06 PM
Very nice. Thanks for the info. :) I'll be looking into FireRed offsets now. ;)

EDIT: I just tried this, and nothing happened. :\

I realised the example I posted was too short, so I edited the example and it should work now :D

Flandre Scarlet
June 23rd, 2010, 01:11 PM
Very nice. Thanks for the info. :) I'll be looking into FireRed offsets now. ;)

EDIT: I just tried this, and nothing happened. :\

One for Fire Red will be awesome. xD I hope this works.

Well sorry for double posting, but I just found the offsets for FireRed, so now we can have animations in FireRed too! :D

Go to 2349BC in your ROM using a Hex editor, and repoint the offset there. I used B00000 (00 00 B0 08).

Then use Altariaking's 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

Then you have to save it, and add the animations to EVERY Pokemon or it will be buggy.

If you use this, please give credits to:

Flandre Scarlet (me)
Altariaking
Shiny Quagsire
Crazybuizel

giradialkia
June 23rd, 2010, 02:59 PM
Excellent work. I'm already hacking Emerald so I wont try it, but it's brilliant if it works.

Orinjmate
June 24th, 2010, 04:14 AM
This sounds rly good! But I probably won't use it because it will take aaagggeeesss to put in a second frame for every pokemon.

Chaos Rush
June 24th, 2010, 05:12 PM
For anyone who's interested, I've made secondary frames of FR/LG sprites:
http://www.pokecommunity.com/showthread.php?t=222966

Even though I've only uploaded up to Parasect, I have up to Slowbro complete. Here's a video of an animated FR/LG Slowbro:
http://img688.imageshack.us/img688/7651/slowbrolol.mp4

xGGxToiZ
June 27th, 2010, 12:15 AM
Alright, finally! I've been pondering about this all week and now it's true!
That's amazing!

But, I have "bug" if you may want to call it reports:
1. When in battle, when you go to your Pokémon Menu and then do anything that leads you back to the battle screen, the battling Pokémon will move again! (Weird stuff !:))

2. When you encounter a wild Pokémon, it does it's animations long before it gets to its rightful position (You know the big circle?) thus making it look like it doesn't for some Pokémon. (How do you add delay?)

Oddities:
1. All of the Pokémon move even the (?)'s when viewed (Not in the description page.) in the PokéDex. (Ruby)

Oh, and one more thing, the 0F byte in 01/00 00 0F 00 not only controls its duration of being displayed but also when turned into a value like let's say, FF, it will flip the Pokémon in the status screen accordingly! (Used Ruby for this "behavior stuff")

It's not yet perfect yet but it totally works!
I hope that we could get it to move (Animations) at the proper moment. :)

P.S. How do you make the trainer sprites move? :p

vediel
June 27th, 2010, 08:53 AM
hello a question could put pictures and do not understand the point of re-displacement, and that point what I understand, I'm very interested to learn ^ ^

Full Metal
June 27th, 2010, 09:10 AM
Alright, finally! I've been pondering about this all week and now it's true!
That's amazing!

But, I have "bug" if you may want to call it reports:
1. When in battle, when you go to your Pokémon Menu and then do anything that leads you back to the battle screen, the battling Pokémon will move again! (Weird stuff !:))

2. When you encounter a wild Pokémon, it does it's animations long before it gets to its rightful position (You know the big circle?) thus making it look like it doesn't for some Pokémon. (How do you add delay?)

Oddities:
1. All of the Pokémon move even the (?)'s when viewed (Not in the description page.) in the PokéDex. (Ruby)

Oh, and one more thing, the 0F byte in 01/00 00 0F 00 not only controls its duration of being displayed but also when turned into a value like let's say, FF, it will flip the Pokémon in the status screen accordingly! (Used Ruby for this "behavior stuff")

It's not yet perfect yet but it totally works!
I hope that we could get it to move (Animations) at the proper moment. :)

P.S. How do you make the trainer sprites move? :p


for the bugs (1 and 2) i think that would be because we have edited the routine that loads the images, not the routine that executes during battle.
basically, instead of

readybattle(&battleinfo);
get_battle_pokemon(&battleinfo,&spriteinfo);
load_battle_pokemon_sprite_pointer(&spriteinfo);
load_battle_pokemon_sprite(&spriteinfo);
get_battle_pokemon(&battleinfo,&spriteinfo1);
load_battle_pokemon_sprite_pointer(&spriteinfo1);
load_battle_pokemon_sprite(&spriteinfo1);
initiate_battle(&battleinfo,&spriteinfo1,&spriteinfo);

it might look more like this:

void load_sprite(battleinfo* battleinfo,spriteinfo* spriteinfo,spriteinfo* spriteinfo1)
{
get_battle_pokemon(&battleinfo,&spriteinfo);
load_battle_pokemon_sprite_pointer(&spriteinfo);
load_battle_pokemon_sprite(&spriteinfo);
get_battle_pokemon(&battleinfo,&spriteinfo1);
load_battle_pokemon_sprite_pointer(&spriteinfo1);
load_battle_pokemon_sprite(&spriteinfo1);
}
wild_encounter()
{
readybattle(&battleinfo);
load_sprite();
update_battle_screen();
initiate_battle(&battleinfo,&spriteinfo1,&spriteinfo);
}


and "update_battle_screen()" would occur every time you reload the screen from something (like the bag, or the pokemon party menu, etc).
but, this is just a thoery (and no, more than likely, that will *never* compile in any language xD)

altariaking
June 27th, 2010, 10:49 AM
Alright, finally! I've been pondering about this all week and now it's true!
That's amazing!

But, I have "bug" if you may want to call it reports:
1. When in battle, when you go to your Pokémon Menu and then do anything that leads you back to the battle screen, the battling Pokémon will move again! (Weird stuff !:))

like full metal said, it changes the loading of the sprites and not the battle start.

2. When you encounter a wild Pokémon, it does it's animations long before it gets to its rightful position (You know the big circle?) thus making it look like it doesn't for some Pokémon. (How do you add delay?)
just add a ew more of 00 00 0F 00 and that will show only the first frame for as long as you want[/quote]

Oddities:
1. All of the Pokémon move even the (?)'s when viewed (Not in the description page.) in the PokéDex. (Ruby)

Oh, and one more thing, the 0F byte in 01/00 00 0F 00 not only controls its duration of being displayed but also when turned into a value like let's say, FF, it will flip the Pokémon in the status screen accordingly! (Used Ruby for this "behavior stuff")

It's not yet perfect yet but it totally works!
I hope that we could get it to move (Animations) at the proper moment. :)

P.S. How do you make the trainer sprites move? :p


to ake the trainer move I think it would already work with this code, as long as you add a second frame

Shiny Quagsire
June 27th, 2010, 09:11 PM
Wow, never expected this to happen! :P
Anyways, glad this came into the R&D! :)

Wow, never expected this to happen! :P
Anyways, glad this came into the R&D! :)

Stupid browser sent it twice...

Flandre Scarlet
June 28th, 2010, 02:09 AM
I tried it with trainers, unfortunately it doesn't work. I'm researching into it more, though.

Shiny Quagsire
June 28th, 2010, 07:09 AM
Oh, quick reminder. you could also loop an animation by putting this instead:


EF FF 00 00


With that, it will continuously loop forever and ever, and ever, and so on.

Also, I always get a black screen when I do this. I repointed the first pointer to B00000, like you said. I go outside of a building, it's all black. Go into battle, it freezes. :\
Fixed it! ;)

*edit*
I think I found the offset for some other animation! It's at 3cc290. I'm not sure what it is though, but it could be a trainer's animation.

xGGxToiZ
June 29th, 2010, 05:31 AM
Oh, quick reminder. you could also loop an animation by putting this instead:


EF FF 00 00
With that, it will continuously loop forever and ever, and ever, and so on.

Also, I always get a black screen when I do this. I repointed the first pointer to B00000, like you said. I go outside of a building, it's all black. Go into battle, it freezes. :\
Fixed it! ;)

*edit*
I think I found the offset for some other animation! It's at 3cc290. I'm not sure what it is though, but it could be a trainer's animation.

3cc290 is for FR, right? Well, I replaced the bytes found there with this:
00 00 A0 08. Then @ A00000 I used altariaking's code. Then added 2 extra frames to my trainer sprite.

I tested it in-game but nothing happened, I checked the tile viewer in real time and I saw no extra frame in it at all.

But I know it's located somewhere in there . .

P.S. I also tried to change the bytes after 3cc294 and nothing happened.

Shiny Quagsire
June 29th, 2010, 06:29 AM
Maybe it goes to something else :\ I never did say it was for trainers.

Flandre Scarlet
June 29th, 2010, 01:02 PM
Oh, quick reminder. you could also loop an animation by putting this instead:


EF FF 00 00


With that, it will continuously loop forever and ever, and ever, and so on.

Also, I always get a black screen when I do this. I repointed the first pointer to B00000, like you said. I go outside of a building, it's all black. Go into battle, it freezes. :\
Fixed it! ;)

*edit*
I think I found the offset for some other animation! It's at 3cc290. I'm not sure what it is though, but it could be a trainer's animation.

Yeah same, I was hoping it was the trainers animation. Guess it wasn't. :S

Also I can't seem to be able to loop the animation with EF FF 00 00. It freezes as soon as it should loop.

Shiny Quagsire
June 29th, 2010, 01:19 PM
Wait, I forgot to mention he said not to do it with pokemon, and he did it with "Ivan's" backsprite. I've played his game, and the player's backsprite is moving. Maybe the place I found is the backsprite, or some other animation.

Corvus of the Black Night
June 29th, 2010, 03:15 PM
Make sure you repoint the animation if it's larger han the original (which it probably will be). Also, I'm way too lazy and unmotivated to find the pointer for FR, so mine only works for Ruby. I was able to edit both the Pokemon sprites (whose back and front animations are connected and thus the same) and also the backsprite. Actually all three character backsprites use different animations but I just set them all the same because it was easier, lol

By the way, I was using a different Edian than is used with Hex Editors (I was using a tile viewer after all), so try switching the values around a bit.

If this helps, you should be able to find it near the sprite tables.

By the way, this is Crazybuizel, if you didn't know already >_>

Shiny Quagsire
June 29th, 2010, 04:59 PM
Yeah, I knew that. I'll try to find it, but fire red's backsprites are uncompressed, so it will most likely not be around the sprite tables.

*offtopic* I love your hack. It's awesome :)

sir.euge
June 29th, 2010, 06:28 PM
Wow now someone can make all of them animated and then upload their ips patch for all of us! Yay

altariaking
June 29th, 2010, 06:36 PM
Wow now someone can make all of them animated and then upload their ips patch for all of us! Yay

why? it's not that hard, why don't you do it yourself instead of relying on other people to do it for you?

Shiny Quagsire
June 29th, 2010, 07:27 PM
why? it's not that hard, why don't you do it yourself instead of relying on other people to do it for you?

I agree. If they had a patch, everyone would have animated sprites, and it would be too common of a feature. It's easy enough to do as is.

xGGxToiZ
June 29th, 2010, 08:01 PM
Oh, right. I see now.

Well, I have some time in my hands so I could look for them.

And a patch for animations? If that were to happen, then all hacks that wish to have those animations in there hack will have the same animations. shiny quagsire's right, it'll make animations not so unique anymore. You could edit it but hey why bother? We can make it ourselves err.. right? :\

Oh and altariaking, thanks for the delay tip! :)

Shiny Quagsire
July 2nd, 2010, 07:47 AM
I found some more animation data. It's huge though,

01 00 14 00
02 00 06 00
03 00 06 00
04 00 18 00
00 00 01 00
FF FF 00 00

01 00 14 00
02 00 06 00
03 00 06 00
04 00 18 00
00 00 01 00
FF FF 00 00

01 00 18 00
02 00 09 00
03 00 18 00
00 00 09 00
FF FF 00 00

01 00 18 00
02 00 09 00
03 00 18 00
00 00 09 00
FF FF 00 00

00 00 18 00
01 00 09 00
02 00 18 00
00 00 09 00
03 00 32 00
FF FF 00 00

00 00 18 00
01 00 09 00
02 00 18 00
00 00 09 00
03 00 32 00
FF FF 00 00

it's at offset 239EBB.There are 6 different trainers: the boy, the girl, trainer dude, old man, brendan, and may. plus, they're all the same!I played with the values, and it's correct. These are the animations for the trainer backsprites! Funny, there are pointers to 2347E8, which contains this:

00 00 00 00 FF FF 00 00

I fiddled with the first value, the frame, and changed it to 05, and check out the result!
http://i46.tinypic.com/bjecg9.png
Oh, and I was a boy at the time.

ERROR
July 4th, 2010, 09:17 PM
never would have though that it was possible :D
overwhelming :'(

xGGxToiZ
July 10th, 2010, 03:05 PM
Hey look you guys! I've stumbled upon something on Youtube last night. (Out of boredom.)
Avn538l96qA

What do you think?
It's not perfect but it's not that shabby, r-right? :|

Shiny Quagsire
July 10th, 2010, 03:10 PM
That's exacly what I've been looking for!

Ben.
July 10th, 2010, 03:28 PM
Wow, this looks great.
I'm going to make a .IPS patch but not realising to the public.
I will be doing some more research on this, and will report to you soon.

aSeRo141414
July 10th, 2010, 03:28 PM
very helpful! but it's many offset I'm dizzy, anyway.. I try this later XD

Flandre Scarlet
July 10th, 2010, 05:29 PM
Hey look you guys! I've stumbled upon something on Youtube last night. (Out of boredom.)
Avn538l96qA

What do you think?
It's not perfect but it's not that shabby, r-right? :|


Holy mackerel! I wonder where he found the animation data :O

aSeRo141414
July 10th, 2010, 05:33 PM
The animation in trainer? I thought you know it XD

Shiny Quagsire
July 11th, 2010, 01:22 PM
very helpful! but it's many offset I'm dizzy, anyway.. I try this later XD

This is real hacking kiddo! :)

The animation in trainer? I thought you know it XD

No, but he does. I tried asking but he wouldn't tell me :(

sir.euge
July 11th, 2010, 03:52 PM
what program do u use? i want to research some animation stuff. now its possible to find the move animations and i want to help out.

Binary
July 12th, 2010, 12:40 AM
Hey look you guys! I've stumbled upon something on Youtube last night. (Out of boredom.)
Avn538l96qA

What do you think?
It's not perfect but it's not that shabby, r-right? :|

:o
It's near perfect enough.
what program do u use? i want to research some animation stuff. now its possible to find the move animations and i want to help out.
A hex editor and some knowledge C:

Heart's Soul
July 14th, 2010, 07:46 AM
Any luck on Trainer animations?

SSJ4 Furanki
August 21st, 2010, 07:43 AM
I've got the animations activated. But, I'm confused on how to insert them. I've got a bunch of sprites from DarkCopper that have 2 frames.

EDIT: Nevermind, got it.

Spiky-Eared Pichu
September 5th, 2010, 01:52 PM
If we can animate the Pokémon sprites, we can make something interesting with the loop feature. I think you know what I'm thinking...

We can try to do something like the sprites in Black and White! But the problem is that it would need a lot of space, we'll likely have to enlarge the roms to 32mb...

SSJ4 Furanki
May 7th, 2011, 06:17 PM
I altered the ff ff to fe ff, and it seems to work it won't stop playing the animation and it looks like it's non glitchy.

I'll get a video of it up. I'll add a second frame!

EDIT: Not quite, the battle won't totally load, but I'll keep playing with it.

Hackrex
November 9th, 2011, 08:42 AM
hi,
I have a little problem with my English. My English is bad therefore I can´t understand differrent things....
Is it possible to make a guide with pictures which shows what you are trying to explain?

I also have this question: Where can I find the second frame after I changed it? Or where I have to replace the second frame?

Crimson5M
November 15th, 2011, 09:33 AM
hi,
I have a little problem with my English. My English is bad therefore I can´t understand differrent things....
Is it possible to make a guide with pictures which shows what you are trying to explain?

I also have this question: Where can I find the second frame after I changed it? Or where I have to replace the second frame?

Made some changes to the OP, should be much easier to understand now. Screenshots will be there eventually.
For the second frame just insert a 64x128 instead of 64x64 image into Unlz-GBA.

droomph
November 30th, 2011, 05:21 PM
Hi

I'm interested in the animation code, such as how they expand or contract the sprite without additional sprites (do they? I don't think so...)...

But I don't have the offset in Emerald, and I can't find it either, since I don't know any Python, Java, C, etc.:(

So if someone could give me the offset, or tell me a good way to find it, that would be awesome.

Thanks
Oh and this is my first post and I'm really really worried that I'm doing something wrong:paranoid:

IIMarckus
November 30th, 2011, 06:43 PM
I'm interested in the animation code, such as how they expand or contract the sprite without additional sprites (do they? I don't think so...)...There are no additional sprites—the GBA itself can rotate and scale sprites (http://nocash.emubase.de/gbatek.htm#lcdobjoamrotationscalingparameters). It’s just a graphical effect done by the hardware.

droomph
December 1st, 2011, 03:47 PM
Originally Posted by IIMarckus
There are no additional sprites—the GBA itself can rotate and scale sprites. It’s just a graphical effect done by the hardware.

Thanks! :) I was wondering about that. But how would you go about to use the actual rotation/scaling feature? It sounds pretty easy to use. (Are they the two empty bytes in the animation instructions?)

I have a couple other questions. I hope you don't mind:\

Firstly, what is the offset in Emerald for the animations nonetheless? Or what would be a relatively quick way to search for it, if it hasn't been found yet? I don't want to trouble anybody.

And secondly, and can there be more than two sprites? I don't think you can, but I just want to make sure.

Thank you, I have only been doing this for a couple months. :nervous: Please excuse me if I ask any dumb questions. You are all awesome :)

I also hope to be of some help to this community in the future *joy*

Shiny Quagsire
December 1st, 2011, 06:34 PM
Thanks! :) I was wondering about that. But how would you go about to use the actual rotation/scaling feature? It sounds pretty easy to use. (Are they the two empty bytes in the animation instructions?)

I have a couple other questions. I hope you don't mind:\

Firstly, what is the offset in Emerald for the animations nonetheless? Or what would be a relatively quick way to search for it, if it hasn't been found yet? I don't want to trouble anybody.

And secondly, and can there be more than two sprites? I don't think you can, but I just want to make sure.

Thank you, I have only been doing this for a couple months. :nervous: Please excuse me if I ask any dumb questions. You are all awesome :)

I also hope to be of some help to this community in the future *joy*

I really don't know. Emerald's animation system is much more different than the previous animations. As for more than two, Just continue the pattern, we described it well. However, every pokemon will need to have 3, or 4 sprites. I once made an ASM hack where you can have a unique animation for each pokemon. If anyone wants it, I can pull up the code.

droomph
December 2nd, 2011, 03:44 PM
I really don't know. Emerald's animation system is much more different than the previous animations.

Well, poop. If there's a tutorial anywhere, and/or if you know someone who can guide me to start "researching", can you point me to there? I just think Emerald has so many more possibilities for long games/hacks (YEAH THE NAMES, I KNOW). I'm not wierd I swear


As for more than two, Just continue the pattern, we described it well. However, every pokemon will need to have 3, or 4 sprites.

Hm, shouldn't be too hard. Thanks! I'll keep that in mind.

Also, is there a limit (not considering space)? Is it up to FF, or FFFF? I know this is common sense, but I just want to make sure.


I once made an ASM hack where you can have a unique animation for each pokemon. If anyone wants it, I can pull up the code.

OOHOOHOOH I WANT IT sorry
Wait, what version is this for?

Thank you for your answers! They don't solve my problem, but they sure do point me in the direction I need to go, something I couldn't have done myself! Thanks a million!

Heh, and as a side note, I noticed you all do this very late at night. Just sayin' :)

Chaos Rush
December 3rd, 2011, 07:05 PM
I found one of the offset's for Emerald's animations: 0x308CBC

This is a table that seems to control how long each frame lasts. Each Pokemon has two pointers, meaning that starting at 0x308CBC, the first two pointers (the first 8 bytes) is Missingno, then the 3rd and 4th pointer is Bulbasaur, the 5th and 6th pointer is Ivysaur, the 7th and 8th pointer is Venusaur, etc.

Messing around with Bulbasaur's second pointer (0x308CC8), I managed to make it's second frame do this:
http://img401.imageshack.us/img401/4385/limiterremoval.png

Unfortunately the table I found only seems to control how long each frame lasts and some other stuff I don't know. I don't think it controls the movement of the sprite, because no matter what I do to Bulbasaur's pointers, he still moves around on the same (meaning the sprite jumps around)


EDIT: There's another table at 0x309AAC that's definitely related to the animations, but at this table it's only 1 pointer per Pokemon, unlike the table at 0x308CBC.

droomph
December 3rd, 2011, 08:07 PM
I found one of the offset's for Emerald's animations: 0x308CBC

This is a table that seems to control how long each frame lasts. Each Pokemon has two pointers, meaning that starting at 0x308CBC, the first two pointers (the first 8 bytes) is Missingno, then the 3rd and 4th pointer is Bulbasaur, the 5th and 6th pointer is Ivysaur, the 7th and 8th pointer is Venusaur, etc.

Messing around with Bulbasaur's second pointer (0x308CC8), I managed to make it's second frame do this:

Unfortunately the table I found only seems to control how long each frame lasts and some other stuff I don't know. I don't think it controls the movement of the sprite, because no matter what I do to Bulbasaur's pointers, he still moves around on the same (meaning the sprite jumps around)

:D Thanks, I'll try that
-----------------------------
WAIT A MINUTE that code IS the actual code I was looking for, so that means there's something else to discover...

sadface:surprised:

(I wonder what the first pointer is for? It seems to be just lonely and empty... )

EDIT: There's another table at 0x309AAC that's definitely related to the animations, but at this table it's only 1 pointer per Pokemon, unlike the table at 0x308CBC.

*GASP*

Wait, can I ask you how you can go about to searching for 25 iterations of the same group of numbers? I can tell you're using that trick, and I would love to use it :)

*Later*
These, apparently, are all pointers to pointers to that same chunk of "00 00 00 00 FF FF 00 00" from the stuff from the other table.

Chaos Rush
December 4th, 2011, 11:26 AM
Wait, can I ask you how you can go about to searching for 25 iterations of the same group of numbers? I can tell you're using that trick, and I would love to use it :)
Um what? I have no idea what you're talking about. I simply found the table by going to where the sprite stuff was in Emerald in a hex editor, then I scrolled up and I'm like, "oh look, it's a table. Let's mess with it". Then I made Bulbasaur upside-down.

droomph
December 4th, 2011, 01:02 PM
Um what? I have no idea what you're talking about. I simply found the table by going to where the sprite stuff was in Emerald in a hex editor, then I scrolled up and I'm like, "oh look, it's a table. Let's mess with it". Then I made Bulbasaur upside-down.

Ah. I couldn't ever concentrate that long :\

So by "sprite stuff" you mean the region generally around 0x300000 to 0x400000, right? I'll be looking.

:DThat's what I was looking for.

MINDBLOW: Why would you need a pointer to a pointer to the actual data? Seriously?

EDIT: also, is there any way to trace the graphics on GBA? We can search it up that way?

sufiz
March 22nd, 2012, 11:35 PM
how to find the offset on Hex Workshop? help anyone?

Haru~
May 15th, 2012, 04:30 AM
I altered the ff ff to fe ff, and it seems to work it won't stop playing the animation and it looks like it's non glitchy.

I'll get a video of it up. I'll add a second frame!

EDIT: Not quite, the battle won't totally load, but I'll keep playing with it.

It seems that I've found a "loop" command for those animation codes.
Use: FD FF XX XX ; where XX XX is the number of times the animation will loop (In little endian, of course).
Though it seems to have a limit, the value can only reach ~FDFD times. (From my testing, FFFF crashes the game.)

Note: It repeats the code from the beginning up to the last code before the loop and when the limit is reached, it will proceed to the next code, if any.
Oh, when you do the code like this:
00 00 09 00 01 00 09 00 FD FF 01 00 FD FF 01 00 FF FF 00 00
'From frame 1 to frame 2 and the animation repeats over and over to no end...
It seems to loop infinitely with no adverse effects at all.
That means, B/W-style pokemon is indeed possible.

I've tested all this with trainer animations and it works perfectly.
I ought to share it here because I'm quite sure that this can also apply
to pokemon animations. But then I could be wrong...

I might post a video sometime.

Tetra
May 15th, 2012, 09:55 AM
Pawniard has a very simple animation. I have ripped it, and put it into 10 different pictures that are all 64x64. If we do ever have sprites working like they are in B/W, i'll carry on. I wonder how much free space it would take if you would do that for every single Pokémon... you'd have to expand the ROMs to 32MB. But you never know.

Shiny Quagsire
May 15th, 2012, 02:45 PM
It seems that I've found a "loop" command for those animation codes.
Use: FD FF XX XX ; where XX XX is the number of times the animation will loop (In little endian, of course).
Though it seems to have a limit, the value can only reach ~FDFD times. (From my testing, FFFF crashes the game.)

Note: It repeats the code from the beginning up to the last code before the loop and when the limit is reached, it will proceed to the next code, if any.
Oh, when you do the code like this:
00 00 09 00 01 00 09 00 FD FF 01 00 FD FF 01 00 FF FF 00 00
'From frame 1 to frame 2 and the animation repeats over and over to no end...
It seems to loop infinitely with no adverse effects at all.
That means, B/W-style pokemon is indeed possible.

I've tested all this with trainer animations and it works perfectly.
I ought to share it here because I'm quite sure that this can also apply
to pokemon animations. But then I could be wrong...

I might post a video sometime.
Awesome. :)

Both animation systems are exactly identical, so it should work both ways. However, it may present a few issues with Pokemon animations. I'd test it, but I can't get my Windows multiboot to work so I can't work on hacks at the moment. :(

Darthatron
May 15th, 2012, 04:09 PM
Pawniard has a very simple animation. I have ripped it, and put it into 10 different pictures that are all 64x64. If we do ever have sprites working like they are in B/W, i'll carry on. I wonder how much free space it would take if you would do that for every single Pokémon... you'd have to expand the ROMs to 32MB. But you never know.

Uncompressed, 10 sprites for every Gen 3 Pokemon would take up about 7.7mb. So We can guess about... 5mb, I guess. So yeah, you would HAVE to expand.

ShadowTails
May 16th, 2012, 02:32 PM
Would it be possible to remove animations from Emerald using this knowledge? I'm just curious because I was never a fan of the two frame animation in Emerald and it's the game I want to hack.

Hideos
May 16th, 2012, 02:42 PM
Would it be possible to remove animations from Emerald using this knowledge? I'm just curious because I was never a fan of the two frame animation in Emerald and it's the game I want to hack.It is possible, just requires some research and effort. You could also replace the second frame with the first one, definitely not the best solution but no one would notice anyway.

ShadowTails
May 16th, 2012, 03:04 PM
Well, I found the stuff that controls the animations and which frames play, so I suppose I could just make it so the second frame never plays, but the sprites would still bounce around all over the place. 305F68 is ? the place holder, and then after each FFFF is the end of the animation as has already been stated in the thread. Bulbasaur is at 305F76 and so on and so forth with the FFFF's. I suppose I could repoint this stuff and make the animations non existent that way? somehow? I mean I dunno, if I just did that it wouldn't change the actual animation part of the animations, but I suppose this is a fix, as it doesn't ever call upon the second frame if I edit them this way.

Haru~
May 19th, 2012, 12:16 AM
Pawniard has a very simple animation. I have ripped it, and put it into 10 different pictures that are all 64x64. If we do ever have sprites working like they are in B/W, i'll carry on. I wonder how much free space it would take if you would do that for every single Pokémon... you'd have to expand the ROMs to 32MB. But you never know.

I recommend you stick with 8 sprites each (64x512; anything larger than that may cause the game to crash upon loading the sprite). Each 64x512 image when compressed takes about 0x1954(?) bytes. Wait, I was wrong with the size. It's different for each pokemon **facepalms** but it should take more or less that amount.

Tetra
May 19th, 2012, 03:01 AM
Okay, that should work. Victini has 7 sprites, but i'll see if I can expand it to 8.

ShadowTails
May 19th, 2012, 05:35 PM
I understand, I addressed that later in my post that they'd still stretch and bounce.

destinedjagold
May 29th, 2012, 06:38 AM
It seems that I've found a "loop" command for those animation codes.
Use: FD FF XX XX ; where XX XX is the number of times the animation will loop (In little endian, of course).
Though it seems to have a limit, the value can only reach ~FDFD times. (From my testing, FFFF crashes the game.)

Note: It repeats the code from the beginning up to the last code before the loop and when the limit is reached, it will proceed to the next code, if any.
Oh, when you do the code like this:
00 00 09 00 01 00 09 00 FD FF 01 00 FD FF 01 00 FF FF 00 00
'From frame 1 to frame 2 and the animation repeats over and over to no end...
It seems to loop infinitely with no adverse effects at all.
That means, B/W-style pokemon is indeed possible.

I've tested all this with trainer animations and it works perfectly.
I ought to share it here because I'm quite sure that this can also apply
to pokemon animations. But then I could be wrong...

I might post a video sometime.

For curiosity's sake, I tried the code, and followed the instructions on the first post.
I used a Ruby ROM (obviously).
It did have animations, but the battle won't load.
I mean, during a wild battle, my trainer won't send out his PKMN to battle the animated enemy PKMN. =/
My guess is that it'll also be the same on trainer battles.

Shiny Quagsire
May 30th, 2012, 06:38 AM
I thought that might happen. I don't know why, but it seems to wait for the animation to end before sending out another pokemon, and it might take some ASM hacking to fix that.

Darkest Shade of Light
June 2nd, 2012, 11:18 PM
There's a guy on YouTube that did this like two or three years ago. I'll see if I can find it. But anyways, yeah, it's the same concept. He had animations for Pokémon and the trainer's backsprite in Ruby.

Shiny Quagsire
June 3rd, 2012, 05:36 PM
There's a guy on YouTube that did this like two or three years ago. I'll see if I can find it. But anyways, yeah, it's the same concept. He had animations for Pokémon and the trainer's backsprite in Ruby.

You mean crazybuizel? That's actually who made this whole discovery, and he explained it in the comments of one of his videos (http://www.youtube.com/watch?v=xqXg0nMQTo8), and we later found the tables in Fire Red as well.

I actually made a hack of this to support different animations for each Pokemon (Similar to trainer animations, as they have a table for each sprite), however, I lost it from Windows deciding to erase one of my hard drives on installation. I'll probably recreate it if enough people want it.

Tetra
June 5th, 2012, 04:58 AM
Here are some examples of what I mean. They are not indexed, but there is a way to inserted non-indexed images in Advanced Sprite Editor made by Wichu.

Attachments are below.

Darkest Shade of Light
June 7th, 2012, 01:44 PM
You mean crazybuizel? That's actually who made this whole discovery, and he explained it in the comments of one of his videos (http://www.youtube.com/watch?v=xqXg0nMQTo8), and we later found the tables in Fire Red as well.

I actually made a hack of this to support different animations for each Pokemon (Similar to trainer animations, as they have a table for each sprite), however, I lost it from Windows deciding to erase one of my hard drives on installation. I'll probably recreate it if enough people want it.
Yep. That'd be it :P Was looking for so long, and couldn't find it D:

Haru~
June 7th, 2012, 11:03 PM
For curiosity's sake, I tried the code, and followed the instructions on the first post.
I used a Ruby ROM (obviously).
It did have animations, but the battle won't load.
I mean, during a wild battle, my trainer won't send out his PKMN to battle the animated enemy PKMN. =/
My guess is that it'll also be the same on trainer battles.

That's a drag...
I knew it was too good to be true.

But shiny quagsire is right, it'll require ASM.

But if done on trainer animations, does it work for you?

alypkm
September 25th, 2012, 05:25 AM
I need some help. how do I re point the offset ? I'm using NSE HEX editor, I dont even know where to put the code ! I'm new in rom Hacking.

I open the HEX editor , select Sprite Table and then went to 2349B and I dont know what to do next :/

BlackWhiteRobin
October 11th, 2012, 05:21 PM
Can someone make a video about this? Please?

Shiny Quagsire
October 12th, 2012, 08:19 AM
Can someone make a video about this? Please?

Chances are that even if we did make a video, you still wouldn't understand. Start with the basics, like scripting, and work your way up to understanding hex editing.

BlackWhiteRobin
October 13th, 2012, 07:19 PM
How about a step by step tutorial about this with pictures? I understand some of those but I'm stuck at repointing the offsets and using AltariaKing's code

Another question, if I successfully do it, can I use Wichu's Sprite Editor to add Sprites into the frames or do I have to use another program like unlz etc?



EDIT: Finally did it! At least I think so. But the problem is the sprite only blinks no matter how many times I edit the sprite in unlz? I think I need help.

thjenvuongxh
October 17th, 2012, 05:28 PM
You find a ASM routine at 0x3F860
I want very much to have a wild battle with animations
but my understanding with ASM is very bad

please help!

BlackWhiteRobin
November 4th, 2012, 09:49 PM
Is this a dead thread? Please help me!

tajaros
November 5th, 2012, 04:11 AM
Ok, I got it to work but, i have 2 questions... :D

Does anyone know how to implement this to the enemy only? Cause I don't need the backsprite to be animated. (It's because I'm using Emerald Sprites...)

Do I have to just put another Backsprite to make the Illusion that it's not moving? ? :/

thjenvuongxh
November 6th, 2012, 06:02 AM
Animations table in this 308CBC
But not to animate the backsprites
if you do, freeze the battle

I say this because already worked with before Pokemon Emerald.

tajaros
November 7th, 2012, 01:57 AM
Animations table in this 308CBC
But not to animate the backsprites
if you do, freeze the battle

I say this because already worked with before Pokemon Emerald.

No, I'm using FireRed but Importing Emerald Sprites... :/

Thanks anyway when you make the 2nd frame like the 1st frame it looks like it doesn't have an animation at all... :D

thjenvuongxh
November 7th, 2012, 05:30 AM
Perhaps with a ASM routine would be possible insert a
Pokemon Emerald animation...
...this is my one desire:
"a NEW ANIMATION".
...But I do not know anything about creating ASM routines...

timson733333
November 11th, 2012, 05:01 PM
Is it possible to change some animations in Emerald? I'm currently toying around with some sprites in Emerald but it's really annoying when the 2nd frames don't line up with the 2nd frames of the original Pokemon I wrote it over.

thjenvuongxh
November 12th, 2012, 04:44 AM
As I already explained, animations table in this 308CBC.
But the jumps and bumps...
...I have no idea where this...
...editing even less...
BUT IT MUST BE BLESSED WITH ASM ROUTINE
http://www.pokecommunity.com/data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAEU0lEQVRoge2awZHiMBBFCUEpcJzjpMCREJwGaRCCr4QwR6UwIfg4KXDUHP7w/emWbGEbbGpX5dpijC39193qbnvZpTcfu7UFzB3/DECM8ak6Jq+1UQ/UM1QBdF03Q8yUEWOsZBgH6Lru9QBYt4ZhBCDGuIr6+qVHANYyf/3qQwDrqqeA4UAqAsCDCvDKTFrS4EcRoLsN/lm68tDsJ0ssLU1jGRl+5AG8+tIUh2Yff07PYDCj5P9aAN6vWqF+KQC1kQcoWTADoPccmj0PKD5/93IBoGdCCHMAfPConqwTigCHZt+0x/P3iQcwKJfm55kQQtMeJzMYY/sYzjrBAsQYVXrTHvUAAGGgHn9CPQDUaQNDjZ2cyVNuN3snWABKbNqjuRri+m9v5gcACTlDjStMkFCiD/1SSr0DgOGNdJ0LEiFdATTA6tX7+bNhM+yEHoDqzf16QfzpbZ/FGFXvY8ADqGITkN4JfwAwHtRnPcWNoboRNvXqKSvLwCCBbgxdDhhDAEb6SQa3rKqnaIQWzmDhUQbjCjLg9mwiIYbeu1P11I1ZNBxN6BPGRD89PgpgjEXpJu817ZGX0eE6/w6suAjSdQ1aC1Or+bUGewAcmC3rE2NyI13DycSMYfgDgPTuvpjDU/xXI5LRopOSgWqAwfqgPBy8gPbW3czhGTDbDnYCscmexmAGgIJUPUs1lOkmIYY/aUxO0SarqjyW/B1D0CjWq1GeS0mT2wC2ZPCYa7CkN7M3eSl41Kx0QhHA3Kadj9H99RG+PgKkw/BQb0r1tbswWUU3mEZP98OLoWV7AB9n2b5P+whognSoR0S1508PQPVYkk7gxtPdbMLYk6gTegAfM/6GdL//UkoEgPRrd2nPnwwVLRHX7sJayRkwMz5kS4eaVTFw0gKUhg+tEAKl0/zX7gKVzD+mjeXB5aCPWSS7ujkPBkiqAvAlkwxU5tXrfjWHsTT3fUmAX50MfRYaBih9pYncA/DBQP9U9ayAwwB+KECMcfzN3MC3mjf52ZvclzCWC7qxHgAMPcCwxNF3Qb4L0OrLWMJl6qhFAFJKQwCVb7KwDSAU6qHS9BRGvVbiCS81GI1zAdT8ambmTeR+bVpNHz4NgGNoD9TEj0YLI9s/XvruQ6vEZPUjAKPDRL8WYC3DWtd8EzVHwFMAfBdUAvBl4aUAbN1M4jfhYR44fXe9JoCvuEGeyLKN9EBVXgfApEsfLaXmwhTmFQDSbQ/wCSbcHgaMpVnatJlFnt0EQDY2tP30MCgU83PoXIDkWgl9H1FyBfH0sW41AGKw10eLn8VjS7dgOVsMgHtAAcy3PKM5amZDsdhvJdDcAmA0vRgnzEmsS/7Y43D7f5rRK7XkzSwOq/1apZTBHg2kzQE8yrBFgIeiaEMAzGDvAZByz0MoI+8EoIZn9GdfiZbGygAsHfjwrgBsMdL9O9CasfKvFrX2TXs82MrPLic/3GwFYPL4D7D2eHuAXzhkLcTPcyIDAAAAAElFTkSuQmCC
http://www.pokecommunity.com/data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAEU0lEQVRoge2awZHiMBBFCUEpcJzjpMCREJwGaRCCr4QwR6UwIfg4KXDUHP7w/emWbGEbbGpX5dpijC39193qbnvZpTcfu7UFzB3/DECM8ak6Jq+1UQ/UM1QBdF03Q8yUEWOsZBgH6Lru9QBYt4ZhBCDGuIr6+qVHANYyf/3qQwDrqqeA4UAqAsCDCvDKTFrS4EcRoLsN/lm68tDsJ0ssLU1jGRl+5AG8+tIUh2Yff07PYDCj5P9aAN6vWqF+KQC1kQcoWTADoPccmj0PKD5/93IBoGdCCHMAfPConqwTigCHZt+0x/P3iQcwKJfm55kQQtMeJzMYY/sYzjrBAsQYVXrTHvUAAGGgHn9CPQDUaQNDjZ2cyVNuN3snWABKbNqjuRri+m9v5gcACTlDjStMkFCiD/1SSr0DgOGNdJ0LEiFdATTA6tX7+bNhM+yEHoDqzf16QfzpbZ/FGFXvY8ADqGITkN4JfwAwHtRnPcWNoboRNvXqKSvLwCCBbgxdDhhDAEb6SQa3rKqnaIQWzmDhUQbjCjLg9mwiIYbeu1P11I1ZNBxN6BPGRD89PgpgjEXpJu817ZGX0eE6/w6suAjSdQ1aC1Or+bUGewAcmC3rE2NyI13DycSMYfgDgPTuvpjDU/xXI5LRopOSgWqAwfqgPBy8gPbW3czhGTDbDnYCscmexmAGgIJUPUs1lOkmIYY/aUxO0SarqjyW/B1D0CjWq1GeS0mT2wC2ZPCYa7CkN7M3eSl41Kx0QhHA3Kadj9H99RG+PgKkw/BQb0r1tbswWUU3mEZP98OLoWV7AB9n2b5P+whognSoR0S1508PQPVYkk7gxtPdbMLYk6gTegAfM/6GdL//UkoEgPRrd2nPnwwVLRHX7sJayRkwMz5kS4eaVTFw0gKUhg+tEAKl0/zX7gKVzD+mjeXB5aCPWSS7ujkPBkiqAvAlkwxU5tXrfjWHsTT3fUmAX50MfRYaBih9pYncA/DBQP9U9ayAwwB+KECMcfzN3MC3mjf52ZvclzCWC7qxHgAMPcCwxNF3Qb4L0OrLWMJl6qhFAFJKQwCVb7KwDSAU6qHS9BRGvVbiCS81GI1zAdT8ambmTeR+bVpNHz4NgGNoD9TEj0YLI9s/XvruQ6vEZPUjAKPDRL8WYC3DWtd8EzVHwFMAfBdUAvBl4aUAbN1M4jfhYR44fXe9JoCvuEGeyLKN9EBVXgfApEsfLaXmwhTmFQDSbQ/wCSbcHgaMpVnatJlFnt0EQDY2tP30MCgU83PoXIDkWgl9H1FyBfH0sW41AGKw10eLn8VjS7dgOVsMgHtAAcy3PKM5amZDsdhvJdDcAmA0vRgnzEmsS/7Y43D7f5rRK7XkzSwOq/1apZTBHg2kzQE8yrBFgIeiaEMAzGDvAZByz0MoI+8EoIZn9GdfiZbGygAsHfjwrgBsMdL9O9CasfKvFrX2TXs82MrPLic/3GwFYPL4D7D2eHuAXzhkLcTPcyIDAAAAAElFTkSuQmCC

Shiny Quagsire
November 19th, 2012, 02:54 PM
As I already explained, animations table in this 308CBC.
But the jumps and bumps...
...I have no idea where this...
...editing even less...
BUT IT MUST BE BLESSED WITH ASM ROUTINE

Chances are the rotations, movement and dilating is done via a table of some sort, or even another script-like bytecode. You could have 1 byte for the type, then 3 for arguments (or less...)

Chances are, however, that it will require some extreme decompiling to even find it.

thjenvuongxh
November 19th, 2012, 03:17 PM
The routine is at 0x011d65

I can say this because I already caught in the pokemon in battle when he was coming!


're getting close... hihihi...

HyperXhydra
March 29th, 2013, 02:34 PM
It would be nice if someone makes a patch for this.

Shiny Quagsire
March 30th, 2013, 02:44 PM
It would be nice if someone makes a patch for this.

It's 28 bytes, do we really need a patch for that? No, no we don't.

Just use a hex editor, they don't byte. :)

HyperXhydra
March 31st, 2013, 06:42 PM
It's 28 bytes, do we really need a patch for that? No, no we don't.

Just use a hex editor, they don't byte. :)

I know nothing about hex editing...
Seriously, people should make more video tutorials, if it's easy then it won't take much of their time.
Cool stuff like battle animation editing also needs a video tutorial.
all I can find on youtube is super simple stuff about hacking, and why does everyone hate Pokemon ruby?...
or how about someone make tools.

BlackWhiteRobin
April 12th, 2013, 03:13 PM
So everyone what's the final code for FR that loops the animation and has no bugs?

Shiny Quagsire
April 12th, 2013, 10:22 PM
So everyone what's the final code for FR that loops the animation and has no bugs?

The answer is D, none of the above.

BlackWhiteRobin
April 12th, 2013, 11:35 PM
The answer is D, none of the above.

Wait, I didn't quite catch that? I put
DF FF 00 00?

Spherical Ice
April 13th, 2013, 02:13 AM
Wait, I didn't quite catch that? I put
DF FF 00 00?

No, it was a joke; there is no version for FireRed yet that loops the animation and has no bugs.

BlackWhiteRobin
April 14th, 2013, 06:09 PM
Then there is still no way to ASM hack it?

Shiny Quagsire
April 14th, 2013, 06:10 PM
In theory, it can be done. It's just a matter of whether anyone even wants to do it.

BlackWhiteRobin
April 14th, 2013, 06:33 PM
I would do it if I only know how to make ASM codes but right now all I know is compiling.
But do you have any idea on how it should be structured?

I think this might be pretty easy if someone could just find out where the code continues after reaching FF FF 00 00.

Shiny Quagsire
April 15th, 2013, 01:03 PM
The issue isn't with the looping mechanism, it's the fact that the battle routine pauses until the animation is done. Finding it isn't as easy as you think, you'd have to dig through several, perhaps hundreds of routines before finding out how to fix it.

Shadowraze
April 16th, 2013, 09:03 PM
The issue isn't with the looping mechanism, it's the fact that the battle routine pauses until the animation is done. Finding it isn't as easy as you think, you'd have to dig through several, perhaps hundreds of routines before finding out how to fix it.

Woah a hundred routines? :3 That would really take a while.

But how about the routine that makes the sprite move for the backsprite in emerald have you got luck in finding it? :3

BugMania
November 8th, 2013, 06:17 AM
I discovered a way of letting an animation similar to BW.




Well, if we know that an offset as 0x2FF7D00 is an area of ​​memory that can change.
We can go to 0x082349BC and insert these bytes: 00 7D FF 02


Now, go to the Game Boy and go to "Memory view".


Walk to 0x2FF7D00 and insert bytes as follows: 00 00 0A 00 01 00 0A 00 FF FF 00 00
Thus, when in a wild battle, just a touch as FE FF under FF FF will make the pokemon dance.




Let's go to the Hex again. In 0xD7360, we will see what I like to call "routines for setwildbattlemessages".

To facilitate the understanding of what I want to show, put something like this:
64 73 0D C6 08 F1 80 08 30 C6 80 08 60 C6 80 08 80 C6 C1 08 90 C6 80 08 54 76 0D 08


Then, go to 0x80C4BC and put this:
B4 30 05 2D 4D 88 02 4E 35 80 04 48 30 BC 00 47 18 7D FF 02 C0 70 03 02 C2 70 03 02 29 74 0D 08 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 30 B4 2D 4D 05 88 02 4E 35 80 04 48 30 BC 00 47 18 7D FF 02 C0 70 03 02 70 03 02 C2 C9 74 0D 08 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 05 4D 30 B4 2D 88 02 4E 35 80 04 48 30 BC 00 47 18 7D FF 02 C0 70 03 02 C2 70 03 02 75 0D 08 F1 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 30 4D 04 2D 88 B4 02 4E 35 80 04 48 30 BC 00 47 18 7D FF 02 C0 70 03 02 C2 70 03 02 59 75 0D 08 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 30 B4 04 88 02 4D 2D 4D 35 80 04 48 30 BC 00 47 18 7D FF 02 C0 70 03 02 C2 70 03 02 73 7D 0D 08





The routines I did was to load that is within variables 0x8004 and 0x8005 in 0x2FF7D18.

Therefore, before using any battle, run a script like:
setvar 0x8004 0xFFFF
setvar 0x8005 0xFFFE
end
(...)

I need help to improve this routine!

...Sorry for bad english.

Shiny Quagsire
November 8th, 2013, 02:03 PM
I discovered a way of letting an animation similar to BW.




Well, if we know that an offset as 0x2FF7D00 is an area of ​​memory that can change.
We can go to 0x2349BC and insert these bytes: 00 7D FF 02


Now, go to the Game Boy and go to "Memory view".


Walk to 0x2FF7D00 and insert bytes as follows: 00 00 0A 00 01 00 0A 00 FF FF 00 00
Thus, when in a wild battle, just a touch as FE FF under FF FF will make the pokemon dance.




Let's go to the Hex again. In 0xD7360, we will see what I like to call "routines for setwildbattlemessages".

To facilitate the understanding of what I want to show, put something like this:
64 73 0D C6 08 F1 80 08 30 C6 80 08 60 C6 80 08 80 C6 C1 08 90 C6 80 08 54 76 0D 08


Then, go to 0x80C4BC and put this:
B4 30 05 2D 4D 88 02 4E 35 80 04 48 30 BC 00 47 18 7D FF 02 C0 70 03 02 C2 70 03 02 29 74 0D 08 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 30 B4 2D 4D 05 88 02 4E 35 80 04 48 30 BC 00 47 18 7D FF 02 C0 70 03 02 70 03 02 C2 C9 74 0D 08 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 05 4D 30 B4 2D 88 02 4E 35 80 04 48 30 BC 00 47 18 7D FF 02 C0 70 03 02 C2 70 03 02 75 0D 08 F1 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 30 4D 04 2D 88 B4 02 4E 35 80 04 48 30 BC 00 47 18 7D FF 02 C0 70 03 02 C2 70 03 02 59 75 0D 08 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 30 B4 04 88 02 4D 2D 4D 35 80 04 48 30 BC 00 47 18 7D FF 02 C0 70 03 02 C2 70 03 02 73 7D 0D 08





The routines I did was to load that is within variables 0x8004 and 0x8005 in 0x2FF7D18.

Therefore, before using any battle, run a script like:
setvar 0x8004 0xFFFF
setvar 0x8005 0xFFFE
end
(...)
I need help to improve this routine!

...Sorry for bad english.

Nice, do you think you could also provide the source ASM so that we can get a better insight as to how this works? I'm sure I and several others would also like to have this ASM available to improve on in case any errors or special needs for their hacks arise.

BugMania
November 9th, 2013, 03:39 AM
Nice, do you think you could also provide the source ASM so that we can get a better insight as to how this works? I'm sure I and several others would also like to have this ASM available to improve on in case any errors or special needs for their hacks arise.

It is a very simple routine:
(This is to run the animation).

.text
.align 2
.thumb
main:
push {r5, r4, r0}
LDR r5, var2
LDRH r5, [r5]
LDR R6, anim
strh r5, [r6]
LDR R0, go !Continue the Battle
pop {r5, r4, r0}
BX R0

.align 2
anim: .word 0x2FF7D18
var: .word 0x020370c0
var2: .word 0x020370c2
go: .word 0x080XXXXX






This 0x80xxxxx is for a byte that you would continue. Example: 0x80D737D (In table SetwildbattleMessages).

(This is to no run the animation).
.text
.align 2
.thumb
main:
push {r5, r4, r0}
LDR r5, var
LDRH r5, [r5]
LDR R6, anim
strh r5, [r6]
LDR R0, go !Continue the Battle
pop {r5, r4, r0}
BX R0

.align 2
anim: .word 0x2FF7D18
var: .word 0x020370c0
var2: .word 0x020370c2
go: .word 0x080XXXXX

Sniper
November 9th, 2013, 03:42 AM
Whoa, are you serious?! Well, I'm not that surprised.
I was wondering how Pokemon Skyline did that trick.

BugMania
November 9th, 2013, 12:16 PM
I managed to fix some bugs typical of a Asm-Noob.
When you restarted the game, the memory disappeared.

Go to the byte 0x8040574 and add an offset XXXXXX08

In 08XXXXXX, take this routine:
70 B4 06 48 00 24 00 26 50 2E 03 D0 35 18 2C 60 04 36 F9 E7 70 BC 02 48 00 47 00 00 60 7D FF 02 YY YY YY 08

set at any offset it: *FF FF # FE FF 00 00
warning: the order os needed!

In 08YYYYYY, throw it:

30 B4 04 4D 2D 88 02 4E 35 80 04 48 30 BC 00 47 1C 7D FF 02 AA AA AA 08 BB BB BB 08 ZZ ZZ ZZ 08

... at *, put the pointer in AAAAAA08
and #, is in BBBBBB08

In a free space (0x08 RR RR RR), put something like:

00 00 0A 00 01 00 0A 00 02 00 0A 00 03 00 0A 00 02 00 0A 00 01 00 0A 00 00 00 00 00 FF FF 00 00

at 0x08 ZZ ZZ ZZ, set this:
91 B4 0F 48 00 88 20 28 0E D0 FF D3 0A 4F C7 19 3F 88 0A 4C 04 19 27 80 09 48 00 88 02 30 08 4C 20 80 91 BC 07 48 00 47 05 48 00 88 00 1A 04 4C 20 80 91 BC 04 48 00 47 RR RR RR 08 00 7D FF 02 20 7D FF 02 ZZ ZZ ZZ 08 F3 06 04 08

if in doubt, do not think twice to let me know!

Let me know about BUGS!

BugMania
March 31st, 2014, 03:31 AM
To facilitate...
http://www.mediafire.com/download/qou5ljny92hxegj/Pokemon+-+Fire+Red.rar

Smeargle
March 31st, 2014, 09:06 AM
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.

AtecainCorp.
April 1st, 2014, 12:50 AM
Ok. But someone found adreses for Pokemon Ruby about Behaviour Data?

BugMania
April 1st, 2014, 03:16 AM
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
April 4th, 2014, 09:57 AM
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.

Huy567
July 17th, 2014, 01:30 PM
Hey, do you think we could do this for trainer sprites in battle as well?

Windsong
July 17th, 2014, 03:13 PM
Hey, do you think we could do this for trainer sprites in battle as well?According to this thread, someone already achieved that four years ago.

http://www.youtube.com/watch?v=Avn538l96qA

Shiny Quagsire
July 17th, 2014, 08:52 PM
Hey, do you think we could do this for trainer sprites in battle as well?

According to this thread, someone already achieved that four years ago.

http://www.youtube.com/watch?v=Avn538l96qA

Yes, that would be me and another hacker which did it. I actually made a thread on it (http://www.pokecommunity.com/showthread.php?t=236456#.U8inr3VSGKE) which is only one page down in the R&D subforum. Same process as this one, but with the trainers you can animate specific sprites to your will.