The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
Research & Development programs in this forum are subject to moderator approval before they are displayed.


Reply
Click here to go to the first staff post in this thread.  
Thread Tools
  #1    
Old June 20th, 2010, 10:19 AM
altariaking's Avatar
altariaking
Needs NO VMs...
 
Join Date: Dec 2009
Location: Scotland, Lesmahagow
Age: 39
Gender: Male
Nature: Naive
Send a message via Windows Live Messenger to altariaking
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. :\
__________________
http://www.pokecommunity.com/member.php?u=253113

Last edited by altariaking; November 15th, 2011 at 09:28 AM.
Reply With Quote
  #2    
Old June 21st, 2010, 10:32 PM
ZodiacDaGreat's Avatar
ZodiacDaGreat
Working on a Mobile System
 
Join Date: Feb 2007
Location: South Pacific
Age: 21
Gender: Male
Nature: Relaxed
Send a message via ICQ to ZodiacDaGreat
Shouldn't be too hard, ...uhm, just find the location where the animation or loading data is.
__________________
Reply With Quote
  #3    
Old June 21st, 2010, 10:44 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
Gender: Male
Nature: Modest
Very nice. Thanks for the info. I'll be looking into FireRed offsets now.

EDIT: I just tried this, and nothing happened. :\
__________________
あなた は しきしゃ です
わたし は ばか です

Last edited by Darthatron; June 21st, 2010 at 11:45 PM.
Reply With Quote
  #4    
Old June 23rd, 2010, 01:06 PM
altariaking's Avatar
altariaking
Needs NO VMs...
 
Join Date: Dec 2009
Location: Scotland, Lesmahagow
Age: 39
Gender: Male
Nature: Naive
Send a message via Windows Live Messenger to altariaking
Quote:
Originally Posted by Darthatron View Post
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
__________________
http://www.pokecommunity.com/member.php?u=253113
Reply With Quote
  #5    
Old June 23rd, 2010, 01:11 PM
Flandre Scarlet's Avatar
Flandre Scarlet
Free your mind.
Community Supporter
 
Join Date: Feb 2008
Location: Australia
Age: 18
Gender: Male
Nature: Adamant
Quote:
Originally Posted by Darthatron View Post
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.

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
__________________

Last edited by Flandre Scarlet; June 24th, 2010 at 04:02 AM. Reason: Your double post has been automatically merged.
Reply With Quote
  #6    
Old June 23rd, 2010, 02:59 PM
giradialkia's Avatar
giradialkia
Community Supporter
 
Join Date: Apr 2009
Location: Ireland
Age: 20
Gender: Male
Nature: Timid
Send a message via Windows Live Messenger to giradialkia
Excellent work. I'm already hacking Emerald so I wont try it, but it's brilliant if it works.
__________________

This one's called 'Red', and it's actually kinda Pokémon themed, so have a listen! Check out the links below for more stuff, if you like this!



This is the Doctor
This is my Soundcloud
This is my bandcamp

My Pokémon Y character is the same as my username. If you see me as a Passerby let me know! I tend to get a lot of Passerby requests and I often wonder if it's people from this site.
Reply With Quote
  #7    
Old June 24th, 2010, 04:14 AM
Orinjmate's Avatar
Orinjmate
The Orinj of the Mate
 
Join Date: Jun 2010
Location: England
Gender: Male
Nature: Calm
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.
__________________
Currently working on a new hack named Hollow.
Pokemon Sky SD Creator
Reply With Quote
  #8    
Old June 24th, 2010, 05:12 PM
Chaos Rush's Avatar
Chaos Rush
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
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
__________________

The Chaos Emerald ROM Base (it's gonna take awhile)

DS-style 64x64 Pokémon Sprite Resource NOW COMPLETED
Custom Sugimori-style Pokémon Sprite Resource IN PROGRESS


Non-Pokémon hacks I support:
Sonic Classic Heroes
Sonic 3 Complete
Reply With Quote
  #9    
Old June 27th, 2010, 12:15 AM
xGGxToiZ's Avatar
xGGxToiZ
>.//:SO HOT:\\.<
 
Join Date: Mar 2010
Location: We're now near the Tin Tower! . xD
Age: 18
Gender: Male
Nature: Modest
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
__________________


JOHTO ELITE FOUR


. . .


Last edited by xGGxToiZ; June 27th, 2010 at 02:44 AM.
Reply With Quote
  #10    
Old June 27th, 2010, 08:53 AM
vediel
Beginning Trainer
 
Join Date: May 2010
Gender: Male
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 ^ ^
Reply With Quote
  #11    
Old June 27th, 2010, 09:10 AM
Full Metal's Avatar
Full Metal
C(++) Developer.
Community Supporter
 
Join Date: Jan 2008
Location: In my mind.
Age: 18
Gender: Male
Nature: Timid
Send a message via Windows Live Messenger to Full Metal
Quote:
Originally Posted by xGGxToiZ View Post
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
Code:
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:
Code:
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)
__________________

★ full metal.

I like to push it,
and push it,
until my luck is over.
Reply With Quote
  #12    
Old June 27th, 2010, 10:49 AM
altariaking's Avatar
altariaking
Needs NO VMs...
 
Join Date: Dec 2009
Location: Scotland, Lesmahagow
Age: 39
Gender: Male
Nature: Naive
Send a message via Windows Live Messenger to altariaking
Quote:
Originally Posted by xGGxToiZ View Post
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.
Quote:
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]
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
__________________
http://www.pokecommunity.com/member.php?u=253113
Reply With Quote
  #13    
Old June 27th, 2010, 09:11 PM
Shiny Quagsire's Avatar
Shiny Quagsire
Unexpectedly Gone until Aug 13
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 16
Gender: Male
Nature: Jolly
Wow, never expected this to happen!
Anyways, glad this came into the R&D!

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


Stupid browser sent it twice...
__________________




Last edited by Shiny Quagsire; June 27th, 2010 at 09:13 PM. Reason: Your double post has been automatically merged.
Reply With Quote
  #14    
Old June 28th, 2010, 02:09 AM
Flandre Scarlet's Avatar
Flandre Scarlet
Free your mind.
Community Supporter
 
Join Date: Feb 2008
Location: Australia
Age: 18
Gender: Male
Nature: Adamant
I tried it with trainers, unfortunately it doesn't work. I'm researching into it more, though.
__________________
Reply With Quote
  #15    
Old June 28th, 2010, 07:09 AM
Shiny Quagsire's Avatar
Shiny Quagsire
Unexpectedly Gone until Aug 13
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 16
Gender: Male
Nature: Jolly
Oh, quick reminder. you could also loop an animation by putting this instead:

Code:
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.
__________________




Last edited by Shiny Quagsire; June 28th, 2010 at 11:18 AM.
Reply With Quote
  #16    
Old June 29th, 2010, 05:31 AM
xGGxToiZ's Avatar
xGGxToiZ
>.//:SO HOT:\\.<
 
Join Date: Mar 2010
Location: We're now near the Tin Tower! . xD
Age: 18
Gender: Male
Nature: Modest
Quote:
Originally Posted by shiny quagsire View Post
Oh, quick reminder. you could also loop an animation by putting this instead:

Code:
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.

[bummer]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.[/bummer]

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

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


JOHTO ELITE FOUR


. . .

Reply With Quote
  #17    
Old June 29th, 2010, 06:29 AM
Shiny Quagsire's Avatar
Shiny Quagsire
Unexpectedly Gone until Aug 13
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 16
Gender: Male
Nature: Jolly
Maybe it goes to something else :\ I never did say it was for trainers.
__________________



Reply With Quote
  #18    
Old June 29th, 2010, 01:02 PM
Flandre Scarlet's Avatar
Flandre Scarlet
Free your mind.
Community Supporter
 
Join Date: Feb 2008
Location: Australia
Age: 18
Gender: Male
Nature: Adamant
Quote:
Originally Posted by shiny quagsire View Post
Oh, quick reminder. you could also loop an animation by putting this instead:

Code:
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.

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.
__________________
Reply With Quote
  #19    
Old June 29th, 2010, 01:19 PM
Shiny Quagsire's Avatar
Shiny Quagsire
Unexpectedly Gone until Aug 13
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 16
Gender: Male
Nature: Jolly
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.
__________________



Reply With Quote
  #20    
Old June 29th, 2010, 03:15 PM
daigonite's Avatar
daigonite
Ninjas Against Bottomless Pits
Community Supporter
 
Join Date: Feb 2009
Location: With the Birds
Age: 21
Gender: Female
Nature: Impish
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
__________________

Last edited by daigonite; June 29th, 2010 at 03:28 PM.
Reply With Quote
  #21    
Old June 29th, 2010, 04:59 PM
Shiny Quagsire's Avatar
Shiny Quagsire
Unexpectedly Gone until Aug 13
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 16
Gender: Male
Nature: Jolly
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
__________________



Reply With Quote
  #22    
Old June 29th, 2010, 06:28 PM
sir.euge's Avatar
sir.euge
Bunchies Back!
 
Join Date: Jun 2009
Gender: Male
Nature: Naughty
Send a message via Yahoo to sir.euge
Wow now someone can make all of them animated and then upload their ips patch for all of us! Yay
__________________
Reply With Quote
  #23    
Old June 29th, 2010, 06:36 PM
altariaking's Avatar
altariaking
Needs NO VMs...
 
Join Date: Dec 2009
Location: Scotland, Lesmahagow
Age: 39
Gender: Male
Nature: Naive
Send a message via Windows Live Messenger to altariaking
Quote:
Originally Posted by sir.euge View Post
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?
__________________
http://www.pokecommunity.com/member.php?u=253113
Reply With Quote
  #24    
Old June 29th, 2010, 07:27 PM
Shiny Quagsire's Avatar
Shiny Quagsire
Unexpectedly Gone until Aug 13
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 16
Gender: Male
Nature: Jolly
Quote:
Originally Posted by altariaking View Post


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.
__________________



Reply With Quote
  #25    
Old June 29th, 2010, 08:01 PM
xGGxToiZ's Avatar
xGGxToiZ
>.//:SO HOT:\\.<
 
Join Date: Mar 2010
Location: We're now near the Tin Tower! . xD
Age: 18
Gender: Male
Nature: Modest
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!
__________________


JOHTO ELITE FOUR


. . .

Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 05:57 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.